This solutions works for me for ages:
1) delete defaultroute on your vpn client machine
2) add static host routes for every single vpn endpoint
Example:
ip route add your.vpn.server.ip/32 via ip.of.gate.way dev eth0
3) use vpn providers dns with update-resov-conf script to prevent dns leaks
Keep in mind that you are not be able to resolve anything unless you are connected to vpn. To get around this you may need to:
- replace fqhn in openvpn configuration by their according IPs
or:
- edit /etc/hosts and add according entry
This way full internet access is only available while vpn is successfully connected. As soon as vpn is off or fails to connect there will be no access (including DNS) but to hosts having host routes (which are required to connect to tunnel).