Ubuntu – How to create a vpn over another vpn

networkingvpn

I am in a network that for accessing internet we must connect to vpn. also there exist another service for special bandwith for some users. So for accessing this service I must create another vpn. But when I try to connect this vpn, the connection of vpn server disconnected. Is there a way to create a vpn over another vpn -two vpn over

Best Answer

From my testing NetworkManager (using nmcli) only supports one VPN connection at a time. You will need to write a script that manually invokes openvpn and place it in /etc/NetworkManager/dispatcher.d/. The script will need to query networkmanager to see if your other VPN connection has been made.

I wrote a script that automatically starts my VPN connection under certain conditions, maybe you can use it as a starting place.

Also, keep a close watch on your routing table. If you start a VPN while connected to another one, it could redirect traffic from the first VPN, disrupting both VPN connections.

Related Question