You are not logged in.

#1 2017-09-30 20:55:56

the-thinkpad-guy
Member
Registered: 2017-09-30
Posts: 8

nm-applet can't connect with OpenVPN

Hello, I'm having trouble with Network Manager and OpenVPN. I have an client.ovpn configuration file that works just fine when I run "openvpn client.ovpn" as root, but it does not connect whatsoever when I try to connect with nm-applet.

Here is the journalctl output:

Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5290] audit: op="connection-activate" uuid="060a6748-cc05-4cbf-a1e1-8a4b6784b16d" name="Home VPN" pid=913 uid=1000 result="success"
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5334] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: Started the VPN service, PID 1711
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5413] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: Saw the service appear; activating connection
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5495] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN plugin: state changed: starting (3)
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5496] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN connection: (ConnectInteractive) reply received
Sep 30 13:50:36 thinkpad nm-openvpn[1714]: Options error: If you use one of --cert or --key, you must use them both
Sep 30 13:50:36 thinkpad nm-openvpn[1714]: Use --help for more information.
Sep 30 13:50:36 thinkpad NetworkManager[631]: <warn>  [1506804636.5570] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN plugin: failed: connect-failed (1)
Sep 30 13:50:36 thinkpad NetworkManager[631]: <warn>  [1506804636.5578] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN plugin: failed: connect-failed (1)
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5579] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN plugin: state changed: stopping (5)
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5579] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN plugin: state changed: stopped (6)
Sep 30 13:50:36 thinkpad NetworkManager[631]: <info>  [1506804636.5600] vpn-connection[0x5638d882f2e0,060a6748-cc05-4cbf-a1e1-8a4b6784b16d,"Home VPN",0]: VPN service disappeared

I thought perhaps it had something to with the fact that I'm using i3, so that maybe nm-applet isn't being started with root privileges? nm-applet sarts with i3 in my i3 config file.

I tried "killall nm-applet" and then run "nm-applet" as root, but even this is not connecting to OpenVPN either?

Any suggestions? Thank you in advance

Offline

#2 2017-10-01 06:54:44

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: nm-applet can't connect with OpenVPN

sudo pacman -S  openvpn NetworkManager-openvpn

Also You can use command line:

$ cd /vpnfolder

$ sudo openvpn --config file.openvpn


--= [ |<!55 ]=--

Offline

#3 2017-10-03 23:32:47

e2.gal
Member
Registered: 2011-08-16
Posts: 6

Re: nm-applet can't connect with OpenVPN

Having this problem too on a standard Mate install.
Apparently nm-connection-editor isn't saving the key preferences. I tried to set a keyfile for the connection, but when I clicked save, it's not saved by nm-connection-editor.

Edit:
I'm on Mate 1.18.0 with OpenVPN 2.4.3 and networkmanager-openvpn 1.8.0-1.
Also, the command line program works normally (thanks brainfucksec!)

Last edited by e2.gal (2017-10-04 15:31:08)

Offline

#4 2017-10-05 20:37:09

the-thinkpad-guy
Member
Registered: 2017-09-30
Posts: 8

Re: nm-applet can't connect with OpenVPN

brainfucksec wrote:

sudo pacman -S  openvpn NetworkManager-openvpn

Also You can use command line:

$ cd /vpnfolder

$ sudo openvpn --config file.openvpn

I already have all the required packages installed and connecting to the VPN via CLI works fine, the problem is with the nm-applet


e2.gal wrote:

Having this problem too on a standard Mate install.
Apparently nm-connection-editor isn't saving the key preferences. I tried to set a keyfile for the connection, but when I clicked save, it's not saved by nm-connection-editor.

Edit:
I'm on Mate 1.18.0 with OpenVPN 2.4.3 and networkmanager-openvpn 1.8.0-1.
Also, the command line program works normally (thanks brainfucksec!)


Yes, this is exactly the problem. I realized that nm-applet isn't saving the configuration properly. For instance, I load my .ovpn file (which works correctly via CLI) with nm-applet and it appears to load the configuration, but when I go to edit the connection with nm-applet afterwards none of the configuration was actually saved properly. Definitely a bug, since the same process with nm-applet works fine on my other Debian machine.

Offline

Board footer

Powered by FluxBB