Ubuntu – cannot import saved openVPN configuration file in Ubuntu 16.04 LTS

16.04ltsnetwork-manageropenvpn

I am trying to import a .ovpn file from the network manager.
Here are the steps I follow.

Network Manager → VPN Connections → configure VPN

This opens the Network Connections dialogue.
Then,

Add → import saved vpn configuration → choose .ovpn file

This should load my .ovpn configuration, but instead I get a prompt saying

ERROR: plugin does not support import capability.

I can still use VPN using the command

sudo openvpn --config ~/openvpn/xxx.conf

is this a bug that needs to be filed?

Best Answer

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.