Skip to content

Instantly share code, notes, and snippets.

@levnovikov
Created March 5, 2015 09:39
Show Gist options
  • Save levnovikov/a042b99f608c75ee52f7 to your computer and use it in GitHub Desktop.
Save levnovikov/a042b99f608c75ee52f7 to your computer and use it in GitHub Desktop.
iptables+openvpn
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 192.168.0.0/16 -d 192.168.0.0/16 -j SNAT --to-source 192.168.104.25
-A POSTROUTING -s 192.168.0.0/16 ! -d 192.168.0.0/16 -o eth0 -j SNAT --to-source xx.xx.xx.xx
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment