IP Tables Essentials

Linux Logo

IP Tables Essentials

Add Masquerade for outbound traffic on eth0

sudo iptables -t nat -A  POSTROUTING -o eth0 -j MASQUERADE

Save IP Tables Rules

sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

Install Rules on Boot

sudo nano /etc/rc.local

add above exit 0

iptables-restore < /etc/iptables.ipv4.nat
,