Skip to content

Instantly share code, notes, and snippets.

@llazzaro
Created June 21, 2014 17:16
Show Gist options
  • Save llazzaro/3353a8add5d9f7fea918 to your computer and use it in GitHub Desktop.
Save llazzaro/3353a8add5d9f7fea918 to your computer and use it in GitHub Desktop.
Share Internet with Debian
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -F FORWARD
iptables -A FORWARD -j ACCEPT
apt-get install dnsmasq
printf " interface=eth0\ndhcp-range=192.168.10.10,192.168.10.19,4h" >> file.txt
/etc/init.d/dnsmasq restart
ifconfig eth0 192.168.10.1 netmask 255.255.255.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment