Skip to content

Instantly share code, notes, and snippets.

@JackDesBwa
Last active May 31, 2016 18:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Script to configure simple masquerade
#!/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