Created
July 21, 2015 06:30
-
-
Save vik-y/cc9d7f01c4a02292933f to your computer and use it in GitHub Desktop.
A code for forwarding
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
modprobe iptable_nat | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE #Forward on this interface | |
iptables -A FORWARD -i wlan0 -j ACCEPT #Tells to accept all connections coming on wlan0 | |
# Works completely fine - Need to test it on OpenVPN | |
# Here the interface which has internet is eth0 | |
# Need to understand POSTROUTING nad MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment