cannot import saved openVPN configuration file in Ubuntu 16.04 LTS

I know this is an old question but since I still couldn't find an (easy) answer I want to help others (and future me).

Use this

sudo nmcli connection import type openvpn file FILE_NAME

offcourse replace FILE_NAME with the full path to your file name

This will tell you exactly what's wrong with the file and which lines you should edit/delete.

After you edited the file with the recommendations the command gave you. You can import the file.


On commenting out the following line with #, I was able to successfully import the VPN config:

#route remote_host 255.255.255.255 net_gateway default

Others have reported that commenting out, or removing, this line works for them as well per bug #606365 in launchpad in spite of this being a valid argument.

That said, while I'm able to successfully connect to the VPN, I'm not able to hit any host over the VPN. On trying to manually set these values using the network manager GUI, I see that only numerical IP addresses are accepted. String values like remote_host or net_gateway cannot be entered via the GUI.

I've also had success importing the same .OVPN file without any modification in Fedora 23, Windows 10 (using Viscosity), OS X El Capitan (using Viscosity) and earlier versions of Ubuntu. Something is definitely broken in 16.04.


worked for me:

sudo apt install network-manager-openvpn-gnome