i ran across your post, even though it was posted a few months ago, if you haven't found a solution, here's what worked for me... i have the basic port forwarding iptables arguments as follows (btw, eth0 is internet nic);
iptables -F -t nat
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
now for port forwarding i am using;
iptables -t nat -A PREROUTING -p TCP --dport 5901 -j DNAT --to-destination 10.0.0.100:5901
ofcourse, change the type of protocol you're using to either tcp or udp, the port number to be forwarded and the ip address local to your lan:local port number.... i am using rh9 box as router/dhcp server (no squid) and everything works perfect for me...hopefully this will help you out...
Last edited by maze_fire; 09-15-2004 at 12:28 PM.
|