Last active
May 31, 2016 18:40
-
-
Save JackDesBwa/b229cdce9a0bcf15383184560c78d398 to your computer and use it in GitHub Desktop.
Script to configure simple masquerade
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/sh | |
if [ _$1 == _ ] | |
then | |
echo "Usage: $0 <output_if>" | |
exit 1 | |
fi | |
sysctl -w net.ipv4.ip_forward=1 | |
iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment