Last active
October 6, 2017 21:36
-
-
Save volure/95e506b61cf874f92677 to your computer and use it in GitHub Desktop.
BASH: iptables router over openvpn
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
iptables -t nat -A POSTROUTING -j MASQUERADE | |
iptables -I INPUT -s 10.0.0.0/8 -j ACCEPT | |
iptables -I FORWARD -s 10.0.0.0/8 -j ACCEPT | |
iptables -I FORWARD -d 10.0.0.0/8 -j ACCEPT | |
#sysctl -w net.ipv4.ip_forward=1 | |
iptables -I INPUT -i tun+ -j ACCEPT | |
iptables -I FORWARD -i tun+ -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment