Ubuntu: OpenVPN: The VPN connection to … because of invalid VPN secrets


I am 3 days into using Linux. I set up an OpenVPN connection following the instructions set out by: https://www.goldenfrog.com/support/vyprvpn/vpn-setup/linux/openvpn

OpenVPN installation went smoothly. The problem arose when I tried to connect. After setting up the connection:

  1. I went to the connections are and selected my VPN.
  2. The error message I get is
    The VPN connection to "My VPN" because of invalid VPN secrets.

  3. There are no additional prompt or areas to input commands. The dialog box disappears after sometime.

Now my computer is ancient (the reason I installed ubuntu at first) so I don't have a wireless adapter. I'm connecting via an ethernet cable but I notice that the VPN connection when it is attempting a connection looks like its attempting to connect to the VPN over Wi-Fi. The connected symbol changes from 2 arrows in opposite directions to the Wi-Fi symbol.

Other than that I'm not quite sure what else could be causing it. I've read that the problem lies with keyring issues but I don't get any prompts to access my keyring so it looks like the solution has to be in the initial set up.

How can I solve the VPN secrets error on 14.04 when connecting to the internet via an ethernet cable?


I'm not really that this is a bug really. Considering that it works for a majority of users Using openVPN and network manager.

Do you have the proper permissions of the key and certificate file? What happens if you run

openvpn --config nameofyourconfigfile.conf   

as root from the terminal? please paste the output here if it does not work. It should provide more debug information.

If it does work like that. Then you have permission problems on your key and or certificate file.


I've used openvpn successfully many times with it's companion, vpnc-scripts.

Once both of these packages are available, try connecting with the following:

  1. openconnect -b -u USER.NAME --force-dpd 60 --authgroup=default --script=/usr/share/vpnc-scripts/vpnc-script VPN.DOMAIN.TLD

This should also set up your routes correctly so that once you do successfully connect to the VPN, your computer will know how to communicate with the machines found there.


When connected to a VPN using vpnc-scripts default script as described, your computer will resolve all DNS queries using the DNS server provided by the VPN. This means that, when you go to Facebook.com, the VPN DNS server will respond, instead of your normally used server.


This was probably identified as confirmed bug. See https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/738849


Have you set a crt file. Under VPN settings you may need a certificate from your vpn server. You can usually download them from your provider.


This happens to me constantly.

The VPN works fine the first time, and fails with this message any other time.

I use this workaround:

sudo service network-manager restart  

And then try to connect again, and it works.

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