Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Always accept loopback traffic
- $IPTABLES -A INPUT -i lo -j ACCEPT
- # Allow established connections
- $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
- # fowarding
- $IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
- # Allow outgoing connections from the LAN side.
- $IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT
- # Masquerade.
- $IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- # Enable routing.
- echo 1 > /proc/sys/net/ipv4/ip_forward
Advertisement
Add Comment
Please, Sign In to add comment