40

I have installed 12.04 and setting up the OpenVPN via network manager. the network-manager-openvpn-gnome is installed, and I can open "configure VPN..." and see "Add VPN", however I can not save my settings. The "Save.." button is gray and "Apply to all users" is selected and gray too.

Is this a bug ?

1
  • 1
    I can't save my configuration either. I followed this tutorial and the save button was never enabled. ubuntugeek.com/… Any suggestions?
    – pllee
    Jun 5, 2012 at 2:54

10 Answers 10

27

One solution is to start:

nm-connection-editor

in the terminal. Terminal messages will tell you which entries of the connection are considered as invalid.

Source: https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/990765/comments/27

2
  • 2
    Well, that was interesting. On Ubuntu 14.04, leaving CA Certificate blank was valid; at some point since then (I upgraded straight to 16.04) a "No CA certificate is required" checkbox was added, that I never noticed, and I hadn't been able to edit the connection because it wasn't checked.
    – Izkata
    Feb 7, 2017 at 15:10
  • When started from the GUI, grep 'Cannot save connection' /var/log/syslog should also show the problem
    – mivk
    May 1, 2017 at 10:00
12

I ran into this issue with LUbuntu 18.04. To try to add my VPN from a ovpn file, I ran:

sudo nm-connection-editor

But when I tried to add from the existing ovpn file, the save icon was grayed out. I noticed on the command line I saw this error:

 Could not load editor VPN plugin for “org.freedesktop.NetworkManager.openvpn” (missing plugin file "/usr/lib/x86_64-linux-gnu/NetworkManager/libnm-vpn-plugin-openvpn-editor.so"

I was able to solve the problem by installing an additional package that was missing:

sudo apt-get install network-manager-openvpn-gnome
3
  • 1
    ... and for pptp: sudo apt-get install network-manager-pptp-gnome - these packages were missing in Ubuntu Budgie 18.04
    – pspahn
    Mar 15, 2019 at 16:15
  • 1
    This also worked for in on Xubuntu 19.10 Apr 2, 2020 at 15:41
  • This corrected the Issue for me on BackBox as well. It was built off of Ubuntu 22.04 (jammy) Feb 19, 2023 at 16:05
4

Read this thread. The problem originates from the security policy implemented in Ubuntu. You will be required to change this as described in the displayed thread.

The file is /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy, edit it with:

sudo -H gedit /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy

You need to change the action:

<action id="org.freedesktop.NetworkManager.settings.modify.own">
.
.
.
<allow_inactive>no</allow_inactive>

to read

<allow_inactive>auth_admin</allow_inactive>

or

<allow_inactive>yes</allow_inactive>

logout to activate.

2
  • 5
    Sounded good, this didn't work for me though. Oct 3, 2012 at 7:50
  • In Ubuntu 16.04, allow_inactive is already set to yes. Sep 4, 2018 at 5:37
3

As Enrique said in this post: https://askubuntu.com/a/143491/98277

Make sure these fields are populated:
    User Certificate
    CA certificate
    Private Key

Your Save button will work then.
3
  • Please note that the Network Manager applet doesn't support embedded certs in the .ovpn config file. So extract all <ca>BEGIN...</ca> and keys to dedicated .crt files, which you can link using ca /path/to/ca.crt and cert /path/to/id.crt etc. Dec 21, 2016 at 9:52
  • 3
    What about VPN networks that do not require a CA certificate? I have only been provided with gateway, username and password. Mar 12, 2018 at 8:04
  • Why isn't it automatically loading these fields from my ovpn file, which contains them???
    – Michael
    Jul 7, 2018 at 23:12
3

I know this is super old, but I recently ran into the same issue. And there is no actual answer here, just a bunch of things to try.

I have found the answer:

The Apply button is disabled if the current settings don't pass validation.

If you run nm-connection-editor by itself, then select your VPN connection, you will see an error that explains what can't be saved.

Correct those issues and the Apply button will become enabled.

In my case, I found that I didn't have a user name in the Identity > Authentication > User name field. Once I added my user name, the Apply button instantly enabled.

Hope this helps.

enter image description here

2
  • This was a very helpful clue toward resolving an issue that appeared a release or 2 ago. What I found is that my VPN connections (and any new ones I try to create for testing) always had the Save or Apply button disabled. That made changing passwords hard (though that can be worked around by running seahorse and editing the VPN password there).
    – nturner
    Jun 30, 2023 at 14:51
  • Anyway, for me (and maybe you) the issue was that the "interface name" (under Identity > Advanced... > Tunnel interface name) was not set by default, and apparently that fails validation now. Setting it to tun42, applying, and then making a no-op change to another field (so validation would run again and see the valid config) allowed me to apply changes again.
    – nturner
    Jun 30, 2023 at 14:58
1

Are you sure you need exactly OpenVPN? In case you need to have vpn connection only with login and password (no certificate needed) try using PPTP.

sudo apt-get install network-manager-pptp
sudo network-manager restart

Click to NetworkManager -> Configure VPN -> +Add -> Point-To-Point Tunneling Protocol (PPTP) in VPN section.

0

I had the same issue on Ubuntu Mate 16.10

Turns out it wouldn't work while connected from a Windows PC through xRDP. I tried it on the box locally and I was able to save the OpenVPN configuration and managed to connect.

TLDR: Disconnect from xRDP and try to save it locally

1
  • This was the solution for me :) Nice work!
    – user565538
    Jun 2, 2020 at 10:08
0

I had a similar problem with creating an openvpn connection in the gnome network manager.

I discovered that it expects you to enter a password in the "Private Key Password:" field. If your openvpn server doesn't require a password, then you need to click on the tiny little icon on the right side of the "Private Key Password:" field and select "The password is not required". You will then be able to click the "Save" button.

0

The question was asked almost 8 years ago, now Ubuntu 19 is available, but there is still a mess with VPN GUI in Linux world. I have recently tested different distributions, and here are the results.

Below are problems that you might experience:

  1. OpenVPN GUI doesn't let you create a connection without certificate even when you need only username/password authentication (GNOME Network Manager).
  2. PPTP GUI doesn't have fields (!) for entering gateway address, username and password (GNOME Network Manager installed in Lubuntu).
  3. PPTP connection can be created but doesn't work.
  4. PPTP connection can be created, but doesn't work if started from tray icon, only works if started from Network Settings dialog box (Mint Cinnamon 19.3).
  5. By default there is no GUI for managing VPN connections (Lubuntu).

You can, of course, like me, try adding different repos, play with different versions of those GUIs, debug connections, etc.

I found that only in KDE VPN GUI is reliable. Connection manager in current MX Linux (19.1) works fine.

But in case you have GUI problem I suggest you go reliable way - create connection without GUI. This requires minimal time and is pretty simple. Example is taken from this manual.

Create connection file /etc/ppp/peers/your_connection_name, with this contents:

pty "pptp your_vpn_hostname --nolaunchpppd --debug"
name your_username
password your_password
remotename PPTP
require-mppe-128
require-mschap-v2
refuse-eap
refuse-pap
refuse-chap
refuse-mschap
noauth
debug
persist
maxfail 0
defaultroute
replacedefaultroute
usepeerdns

You might want to secure it with chmod as described in the article. To start connection use sudo pon your_connection_name, and sudo poff your_connection_name to stop. You can check connection status with ip a, monitor connection progress with watch 'ip a | grep ppp', or check statistics with pppstats.

You might find some more complex and probably more correct ways of defining VPN connection without GUI, but this one is very simple and straightforward - just what typical GUI user is looking for.

0

After running it on the terminal while trying to get Cisco OpenConnect working in Ubuntu 21.10 it showed error:

Could not load editor VPN plugin for “org.freedesktop.NetworkManager.openconnect”

and I managed to fix it by installing:

sudo apt install network-manager-openconnect-gnome

I had previously only installed network-manager-openconnect.

Without the -gnome package, the VPN tab was missing entirely, and I couldn't enter the mandatory "Gateway" field.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .