OpenVPN does not connect via network manager plugin

11,138

Solution 1

I know this post is old, but I'm leaving this in case anyone's having same issue with me.

I was having same issue with the OP (can connect via command line but cant connect using network manager), and I noticed that the config was not loading TLS key correctly. I fixed this issue by storing the TLS-Crypt static key separately.

  1. Create a file with static key. The key is in .ovpn file and it starts with < tls-crypt > and ends with < /tls-crypt >.

  2. Tell network manager where to find the key by setting in VPN(openvpn) - Advanced - TLS Settings - Mode to TLC-Crypt.

  3. Set Key file to the file you just created.

I havent tested it myself, but you can probably do the same with TLS-Auth.

Solution 2

One year later ...

I was having problems with an OpenVPN connection exported from PfSense. It was working fine on the command line but not from NetworkManager. As it turns out the TLS authentication was, indeed, the problem. In my case, after importing the connection i had to manually set the key direction to 1 inside advanced settings dialog. I leave this here in case someone else gets the same problem (or if I ever forget and google it some time later :J).

Share:
11,138

Related videos on Youtube

Torbatschow
Author by

Torbatschow

Updated on September 18, 2022

Comments

  • Torbatschow
    Torbatschow over 1 year

    I am trying to connect to my OpenVPN server via the network manager plugin (network-manager-openvpn), after importing the ovpn config file. However, I receive a time-out error:

    $ grep VPN /var/log/syslog
    Oct  1 11:56:05 packer NetworkManager[997]: <info> Starting VPN service 'openvpn'...
    Oct  1 11:56:05 packer NetworkManager[997]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 4700
    Oct  1 11:56:05 packer NetworkManager[997]: <info> VPN service 'openvpn' appeared; activating connections
    Oct  1 11:56:05 packer NetworkManager[997]: <info> VPN plugin state changed: starting (3)
    Oct  1 11:56:05 packer NetworkManager[997]: <info> VPN connection 'vpnt' (Connect) reply received.
    Oct  1 11:56:05 packer nm-openvpn[4703]: OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec  1 2014
    Oct  1 11:56:46 packer NetworkManager[997]: <warn> VPN connection 'vpnt' (IP Config Get) timeout exceeded.
    Oct  1 11:56:51 packer NetworkManager[997]: <info> VPN service 'openvpn' disappeared
    

    connecting via the console

    sudo openvpn --config .openvpn/vpnt.ovpn
    

    works perfectly well.

    I have no idea what I am missing -- and grateful for any ideas. :)

  • Torbatschow
    Torbatschow almost 4 years
    thx a bunch! :)