Debian 6 Internet connection sharing aka IP masquerade not working
- by Rautamiekka
The problem: the computers [Xbox 360 and a Kubuntu 12.04.1 laptop] can't access Internet through a recently-installed desktopless Debian 6 laptop (which is wirelessly connected to a WLAN station) but addresses are successfully given by dnsmasq.
The attempts:
1.1) /etc/dnsmaq.conf conffed according to http://wiki.debian.org/HowTo/dnsmasq: add lines
interface=eth0
dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
1.2) Follow http://www.cyberciti.biz/faq/rhel-fedora-linux-internet-connection-sharing-howto/ and use their script to setup iptables.
2) Follow the Ubuntu Internet Gateway Method (iptables) at https://help.ubuntu.com/community/Internet/ConnectionSharing recommended and which worked at Share internet in Linux.
The Debian laptop was rebooted many times and between each attempt, with and without the script auto-executing via /etc/rc.local.
While adding the iptables-restore command to that file I disabled the script.