- One routing traffic towards the VPN server IP address via your primary gateway (net_gateway)
- Second routing traffic to the whole world via the VPN tunnel (default route)
default dev venet0 scope link
So when OpenVPN establishes a connection to server it's unable to route traffic to VPN server via the existing network connection resulting a total outage of the network in the virtual server.
A solution to this would be adding a route to the VPN server via the virtual venet device. This can be done by adding a simple one line script with:
#!/bin/bash /sbin/ip route add VPN_SERVER_IP/32 dev venet0
and running this script automatically after the connection is established and routes are added by OpenVPN. Add this to your OpenVPN client config:
route-up /path/to/script_above.sh