Last active
June 17, 2016 14:17
-
-
Save zvakanaka/e88bde8f5a4432be36d28130c1dd09ad to your computer and use it in GitHub Desktop.
Script to run at reboot for Pi3 Access Point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo iptables --flush | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT | |
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT | |
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat" | |
sudo service dnsmasq restart | |
sleep 15 | |
sudo service dnsmasq restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment