IP Forwarding works on local port but not a remote port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux