| To: | netfilter@lists.netfilter.org |
|---|---|
| Subject: | redirect 127.0.0.1:25 -> 127.0.0.1:2000 |
| From: | Alex Tang <altitude@funkware.com> |
| Date: | Fri, 18 May 2007 15:36:19 -0700 |
| Delivered-to: | sp-com-lists@consult.net |
| Delivered-to: | netfilter-list1@securepoint.com |
| List-archive: | </pipermail/netfilter> |
| List-help: | <mailto:netfilter-request@lists.netfilter.org?subject=help> |
| List-id: | General discussion and user questions <netfilter.lists.netfilter.org> |
| List-post: | <mailto:netfilter@lists.netfilter.org> |
| List-subscribe: | <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe> |
| List-unsubscribe: | <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe> |
| Sender: | netfilter-bounces@lists.netfilter.org |
| User-agent: | Thunderbird 2.0.0.0 (Windows/20070326) |
Hi folks.I'm using a nat PREROUTING rule to forward all connections from port 25 to port 2000. This works fine for all addresses except for localhost. the rule i'm using is: "-A PREROUTING -p tcp -m tcp --dport 25 -j REDIRECT --to-ports 2000" (CentOS4, kernel 2.6.9-55, iptables-1.2.11) For example, on my machine: foobar.example.comIf i telnet from any machine other than foobar.example.com to foobar.example.com:25, the connection is redirected properly to foobar.example.com:2000. However, if i telnet from foobar.example.com to localhost:25, i get a connection refused. Telnetting to from foobar.example.com to localhost:2000 works fine (as expected) Telnetting from foobar.example.com to foobar.example.com:25 also does not work. I know that you can't do prerouting from localhost -> some.other.host (or vice versa), but i thought localhost->localhost would work. Am i screwing up the rule? Should I add another rule? Or am i just SOL. Thanks. ...alex... |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | iptables and poptop, Tiron Adrian |
|---|---|
| Next by Date: | Re: redirect 127.0.0.1:25 -> 127.0.0.1:2000, Alex Tang |
| Previous by Thread: | iptables and poptop, Tiron Adrian |
| Next by Thread: | Re: redirect 127.0.0.1:25 -> 127.0.0.1:2000, Alex Tang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |