Created
January 16, 2014 02:48
-
-
Save oldsharp/8449021 to your computer and use it in GitHub Desktop.
iptables rules
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
#!/bin/sh | |
sudo iptables -A FORWARD -o eth0 -i wlan0 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT | |
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -t nat -F POSTROUTING | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment