Saturday, April 20, 2013

IP Tables Port Redirection

PublicIP(NAT BOX):5001

PrivateIP:5001

iptables -t nat -I PREROUTING --src 0/0 --dst PrivateIP -p tcp --dport 5001 -j REDIRECT --to-ports 5001

iptables -I FORWARD -p tcp -d PrivateIP --dport 5001 -i eth0 -j ACCEPT

No comments:

Post a Comment