Created
September 17, 2016 16:15
-
-
Save anorm/e9145799d7cd0b91776f88d9dbb1d54a to your computer and use it in GitHub Desktop.
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 | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
WAN=enp0s3 | |
LAN=enp0s8 | |
iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE | |
iptables -A FORWARD -i $WAN -o $LAN -m state --state RELATED,ESTABLISHED -j ACCEPT | |
iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment