Created
December 4, 2012 11:28
-
-
Save wulfgarpro/4202874 to your computer and use it in GitHub Desktop.
Shell script to route my wlan0 via eth0
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/bash | |
iptables --flush | |
iptables --table nat --flush | |
iptables --delete-chain | |
iptables --table nat --delete-chain | |
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE | |
iptables --append FORWARD --in-interface eth0 -j ACCEPT | |
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