Linux Netfilter discussions
 help / color / mirror / Atom feed
* IP Forwarding works on local port but not a remote port
@ 2010-02-05 15:47 Dan Daugherty
  2010-02-05 17:11 ` Покотиленко Костик
  0 siblings, 1 reply; 14+ messages in thread
From: Dan Daugherty @ 2010-02-05 15:47 UTC (permalink / raw)
  To: netfilter

Normally I wouldn't have a problem with this but I'm doing something a
bit different than I would normally do.
I have a RHEL5 server with one NIC that is being used as a router.  My
problem is that I can't seem to completely forward requests off of
this box using iptables.  If I specify a port redirection to a local
port, it works fine but when I specify forwarding that port to another
machine, it fails.  I think the request is being sent through but the
response isn't making it back to me.  I can have a clean iptables to
start and only need to execute one command to make the local forward
work and since I'm not technically using the machine as a gateway, I'm
not sure if all the INPUT, OUTPUT and FORWARD chain commands are
necessary.

10.117.1.205 is the server in question
10.117.1.203 is the server I am trying to forward to

Working command:
iptables -t nat -A PREROUTING -p tcp --dport 1524 -i eth0 -j DNAT --to
10.117.1.205:22

Using telnet to test:
telnet 10.117.1.205 1524
Trying 10.117.1.205...
Connected to -----------.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.3

Failing command:
iptables -t nat -A PREROUTING -p tcp --dport 1524 -i eth0 -j DNAT --to
10.117.1.203:1524

Telnet never completes:
telnet 10.117.1.205 1524
Trying 10.117.1.205...


Any help is appreciated.

Thanks,
Dan

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-02-05 21:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-05 15:47 IP Forwarding works on local port but not a remote port Dan Daugherty
2010-02-05 17:11 ` Покотиленко Костик
2010-02-05 18:16   ` Dan Daugherty
     [not found]   ` <81ed8b881002051013n5f020a3fladfda4a5f33aa625@mail.gmail.com>
2010-02-05 18:24     ` Покотиленко Костик
2010-02-05 19:14       ` Dan Daugherty
2010-02-05 19:37         ` Christoph Paasch
2010-02-05 19:50         ` Покотиленко Костик
2010-02-05 20:01           ` Dan Daugherty
2010-02-05 20:04             ` Dan Daugherty
2010-02-05 20:46               ` Dan Daugherty
2010-02-05 21:10                 ` Christoph Paasch
2010-02-05 20:53               ` Покотиленко Костик
2010-02-05 20:51             ` Christoph Paasch
2010-02-05 20:52             ` Покотиленко Костик

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox