You are not logged in or registered. Please login or register to use the full functionality of this board...
Linuxcat.org
how to setup internet connection sharing on Debian ( masquerading iptables rules ) - Printable Version

+- Linuxcat.org (https://www.linuxcat.org)
+-- Forum: Linux Guides and Troubleshooting (/forumdisplay.php?fid=1)
+--- Forum: Linux Guides (/forumdisplay.php?fid=2)
+--- Thread: how to setup internet connection sharing on Debian ( masquerading iptables rules ) (/showthread.php?tid=64)



how to setup internet connection sharing on Debian ( masquerading iptables rules ) - knifebunny - 06-26-2013 06:37 PM

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