Is it possible to connect more VPN networks at once via Network Manager?

I am running Ubuntu 12.04.1 LTS.

For now I am only able to switch between preconfigured VPN connections. It`s quite annoying as I need to be connected to two or more VPN networks simultaneously.

For example on Windows OpenVPN clients, it is possible.


With 12.10 (network-manager 0.9.6), you can connect to multiple VPNs using the network settings:

  • System settings (gnome-control-center)
  • Network
  • Select each VPN and set it to "on".

You can also use the nmcli tool; see http://cweiske.de/tagebuch/networkmanager-vpn.htm for more information.

  • 4
    This causes my first VPN connection get dropped. As @Simon Déziel have mentioned this looks like to be a kind of bug. – frogatto Mar 16 '15 at 9:38
  • I think this only works if the VPN connections use different providers. e.g. not both Cisco vpnc connctions. I've even had cases where VPN using a given provider just broke and refused to reconnect until I rebooted when I tried this. – Adrian Feb 23 '16 at 17:17

This is a known limitation of network-manager-openvpn. You can subscribe to https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/671024 and mark the bug as affecting you.

As mentioned in the first comment, it is possible to connect to multiple VPNs but not via Network Manager.


It seems that what you want is not possible at the moment. There are a lot of bugs on this issue like this and it was assigned to upstream.

Even so, you can connect multiple vpns at once as described in this answer. You can write you own configuration file by reading "Manually configuring your connection" section in this Ubuntu help page.


You can't do it with Network Manager, but yes, using Network Manager and pptp.

Here is how I make it works in my case.

  1. Connect to the first VPN using Network Manager.
  2. Connect to the second VPN with command pon vpn2, use poff vpn2 to disconect the second VPN.

To make the command pon works, you will need to create the followed files in your system:

file /etc/ppp/peers/vpn2:

pty "pptp VPNIpAddress --nolaunchpppd"
name YourUsername
remotename PPTP
file /etc/ppp/options.pptp
ipparam vdc

file /etc/ppp/options.pptp:


Of course the content of these files is depends on your VPN servers.

In my case I also should to add the ip-up.d/ rules, to add the necessary routes.

file /etc/ppp/ip-up.d/vpn2

case "$PPP_REMOTE" in
        route add ....
        route add ....

Don't forget: sudo chmod +x /etc/ppp/ip-up.d/vpn2

Also you will need to edit the file /etc/ppp/chap-secrets and add there your credentials.

After this, connecting to VPN1 with Network Manager, run:

sudo pon vpn2

Check syslog if something goes wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.