iptables nat port forwarding..
I have a VM running on CentOS6, and i'm attempting to forward port 222 on the host, to 22 on the guest. The guest has an IP of 184.108.40.206, and the host has an IP of 10.1.1.6.
I've added the following to the nat table.
-A PREROUTING -p tcp -m tcp -i eth0 -d 10.1.1.6 --dport 222 -j DNAT --to-destination 192.168.122.200:22
And the following to the filter table
-A INPUT -p tcp --dport 222 -j ACCEPT
But i get a connection refused error when i attempt to conenct to port 222 on the host.
This should work.. what the heck am i doing wrong?
Last edited by Gangrif; 09-13-2011 at 03:26 PM.