First page Back Continue Last page Summary Graphics
Masquerading 101
The following turns on masquerading for ppp0 and blocks incoming connections on ppp0.
- iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
- iptables -A INPUT -i ppp0 -m state --state NEW,INVALID -j DROP
- iptables -A FORWARD -i ppp0 -m state --state NEW,INVALID -j DROP
- sysctl -w net.ipv4.conf.all.rp_filter=1
- sysctl -w net.ipv4.ip_forward=1
Notes: