Skip to content

Instantly share code, notes, and snippets.

@veapon
Last active December 18, 2015 12:09
Show Gist options
  • Save veapon/5780292 to your computer and use it in GitHub Desktop.
Save veapon/5780292 to your computer and use it in GitHub Desktop.
openvz&xen vps nat
openvz: iptables -t nat -A POSTROUTING -s 10.8.0.0/255.255.255.0 -j SNAT --to-source your-vps-ip
xen: iptables -t nat -A POSTROUTING -o eth0 -s 10.8.0.0/24 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment