Enable 1:1 NAT in Iptables

1:1 NAT maps a single Public IP Address to one of your computer within your local area network (LAN). Unlike port forwarding, 1:1 NAT forwards all ports from one external IP to one internal IP.

iptables -t nat -A POSTROUTING -o eth0 -s -j SNAT --to-source iptables -t nat -A PREROUTING -i eth0 -d -j DNAT --to-destination iptables -A FORWARD -s -j ACCEPT iptables -A FORWARD -d -j ACCEPT

Leave a Reply