I have a laptop running Ubuntu 12.04 (still waiting for the 14.04.1)
I have set an openvpn network with the network manager.
If the vpn drops the network manager set back its route through the available network interface and the packet are routed through the other networks.
I there a simple way to avoid that ?
After some testing :
A VPN gateway can have many different addresses, you can check that using command
If it is the case, each new request to establish a VPN will use randomly one IP in the address pool. To not change the IP filter at each new connection, one can use the DNS name of the gateway;
iptables will set one rule for each IP.
second rule will looks like
sudo iptables -A OUTPUT -d your_vpn_gateway_dns_name -j ACCEPT