I have a test environment where I have one linux box acting as the NAT box. From the NAT box I am able to access port 222 (The "internal" linux box) with no problem.
If I try to access port 222 via the "WAN" IP address of the NAT box I cannot get through.
NAT box:
eth0 10.0.0.3 (connected to internal machine network)
eth1 172.17.64.202 ("WAN" IP address)
Internal box:
eth1 10.0.0.1
I have tried using the following commands which do not work for me:
Code:
iptables -t nat -A PREROUTING -p TCP -i eth1 -d 172.17.64.202 --dport 222 -j DNAT --to-destination 10.0.0.1:222
Code:
iptables -A POSTROUTING -t nat -o eth1 -j MASQUERADE
This command reports 1
Code:
cat /proc/sys/net/ipv4/ip_forward
I am using SuSE 10 and have the firewall shut off for now. Can anybody tell me what I'm doing wrong?