Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Last active July 25, 2019 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasgoll/2a929afa21f94d0e08d8c158149f4bf5 to your computer and use it in GitHub Desktop.
Save dasgoll/2a929afa21f94d0e08d8c158149f4bf5 to your computer and use it in GitHub Desktop.
OpenVPN - VPN Split Tunneling
Sometimes, it helps to route just some traffic over a VPN.
It doesn’t make sense to add a lot of latency to your vpn if you don’t need it. This only works if you have your own OpenVPN server.
Simply comment out the redirect-gateway def1 statement in your openvpn server.conf file.
and on the client, just put in the following line:
route 12.12.12.0 255.255.255.0 vpn_gateway
Obviously this routes only the 12.12.12.0 subnet out the vpn connection and everything out your non vpn connection.
It’s really quite handy. This is called Split-Tunneling by the way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment