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



Question:

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?


Solution:1

On commenting out the following line, 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.


Solution:2

worked for me:

sudo apt install network-manager-openvpn-gnome  


Solution:3

Importing .ovpn profiles inside network manager has recently been improved, but there are still bugs and misleading error messages. Sometimes you can successfully import the .ovpn file by removing a single line that breaks the import procedure. In my case, I removed the line float 1 from my .ovpn file and the file has been imported successfully.


Solution:4

I am experiencing the same issue. It looks like a bug, according to this link: https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/606365


Solution:5

For me (Ubuntu 16.04.1 LTS), removing the section <extra-certs> worked.

Here is the ovpn file generated by a tunnel provider.

setenv USERNAME "user@provider.xx"  client  dev tun  remote host 1194 udp  remote host 1194 udp  remote host 443 tcp  remote host 1194 udp  remote host 1194 udp  remote host 1194 udp  remote host 1194 udp  remote host 1194 udp  remote-cert-tls server  comp-lzo no  auth SHA1  nobind  verb 3  sndbuf 0  rcvbuf 0  socket-flags TCP_NODELAY    <ca>  -----BEGIN CERTIFICATE-----  -----END CERTIFICATE-----  -----BEGIN CERTIFICATE-----  -----END CERTIFICATE-----  </ca>    <cert>  -----BEGIN CERTIFICATE-----  -----END CERTIFICATE-----  </cert>    <extra-certs>  -----BEGIN CERTIFICATE-----  -----END CERTIFICATE-----  </extra-certs>    <key>  -----BEGIN RSA PRIVATE KEY-----  -----END RSA PRIVATE KEY-----  </key>    key-direction 1  <tls-auth>  -----BEGIN OpenVPN Static key V1-----  -----END OpenVPN Static key V1-----  </tls-auth>  ## -----BEGIN RSA SIGNATURE-----  ## DIGEST:SHA1WithRSA  ## -----END RSA SIGNATURE-----  ## -----BEGIN CERTIFICATE-----  ## -----END CERTIFICATE-----  ## -----BEGIN CERTIFICATE-----  ## -----END CERTIFICATE-----  ## -----BEGIN CERTIFICATE-----  ## -----END CERTIFICATE-----  


Solution:6

I've found out that changing

remote REMOTE_SERVER 12345  

with

remote REMOTE_SERVER  port 12345  

Fixed the issue.


Solution:7

Its working :) from https://zorrovpn.com/howto/openvpn/ubuntu?lang=en

Open .ovpn file with a text editor.

And change lines that looks like

remote 11.2.2.2 443 tcp-client  

to

remote 11.2.2.2  port 443  proto tcp-client  

Then save .ovpn file and try again to import VPN connection.


Solution:8

In my case the following item caused the problem:

float 1  

After commenting it out, it worked:

#float 1  


Solution:9

  1. open your .ovpn file with any editor
  2. add # to the beginning of this line to comment it out

    route remote_host 255.255.255.255 net_gateway default

  3. Go to IPv4 settings > routes > Check the option “Use this connection only for resources on its network” > press OK > Save

Done!

This is just a wrap up of what worked for me on ubuntu 16.04 based on the other answers and comments here.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »