IP forwarding

Ricardo J. Méndez mendezster at gmail.com
Thu Aug 4 03:37:43 CEST 2005


I've got a network setup where the internal router is a Linux box
running iptables.  External interface is eth0, internal eth1.  I'm
attempting to forward an external IP address (say, to an
internal machine.

The rule I added is:

iptables -t nat -A PREROUTING -d -p tcp --dport 80 -j DNAT

However, attempting to 

telnet 80

does not work.  It's clear that the rule is being applied, because the
web server running on the external machine is not responding unless I
telnet from the router itself, but unfortunately I'm not getting into either.  Attempting to

telnet 80

does work as expected.

What am I missing?  Any pointers are welcome.  Thanks,

Ricardo J. Méndez

More information about the netfilter mailing list