Skip to content

Instantly share code, notes, and snippets.

@dizz
Created June 7, 2012 11:38
Show Gist options
  • Save dizz/2888339 to your computer and use it in GitHub Desktop.
Save dizz/2888339 to your computer and use it in GitHub Desktop.
setup NAT
#!/bin/sh
PUB=eth0
PRIV=eth1
/sbin/iptables --table nat --append POSTROUTING --out-interface $PUB -j MASQUERADE
/sbin/iptables --append FORWARD --in-interface $PRIV -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment