Full Version: how to setup internet connection sharing on Debian ( masquerading iptables rules )
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You will need to use iptables to allow internet connection sharing. This guide assumes you have both network cards, and also assumes that "eth0" is your WAN (or the network connection where the internet is coming in from), and that eth1 is connected to the local network that you wish to share the internet to

Quote:iptables -F
iptables -X

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A OUTPUT -o eth0 -j ACCEPT

iptables -A POSTROUTING -t nat -o eth1 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
Reference URL's