Skip to content

Instantly share code, notes, and snippets.

@b-ggs
Created September 6, 2019 12:42
Show Gist options
  • Save b-ggs/b4bce313d4f91534d21dfec85b96b49d to your computer and use it in GitHub Desktop.
Save b-ggs/b4bce313d4f91534d21dfec85b96b49d to your computer and use it in GitHub Desktop.
OpenVPN split tunnel with kylemanna/docker-openvpn
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_genconfig -N -d -e "route-nopull" -e "route <IP OR SUBNET YOU WANT TO ROUTE TO> 255.255.255.0" -u udp://<VPN SERVER>

In client config, add the following line:

route <IP OR SUBNET YOU WANT TO ROUTE TO> 255.255.255.0 vpn_gateway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment