Created
May 20, 2013 04:42
-
-
Save guerrerocarlos/5610465 to your computer and use it in GitHub Desktop.
Enable VPS internet sharing by VPN
This file contains hidden or 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 -t nat -F POSTROUTING | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo iptables-save | sudo tee /etc/iptables.sav | |
iptables-restore < /etc/iptables.sav | |
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" | |
add to /etc/sysctl.conf: | |
net.ipv4.ip_forward=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment