You are not logged in.

#1 2017-02-02 14:58:23

gnunn
Member
Registered: 2013-10-21
Posts: 96

[Solved] OpenVPN failing to connect

My company is switching VPNs to OpenVPN and I'm trying to get it working in Arch with NetworkManager without much success. The company provides a networkmanager configuration and a pem file, when I try connecting it prompts me for my password but then fails with "failed to activate network". Looking at journalctl I see the following for NetworkManager:

Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9161] manager: (tun1): new Tun device (/org/freedesktop/NetworkManager/Devices/7)
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9185] device (tun1): state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9208] keyfile: add connection in-memory (5c3b8841-2ff1-44d7-94c6-4946d7e00cd4,"tun1")
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9214] device (tun1): state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9222] device (tun1): Activation: starting connection 'tun1' (5c3b8841-2ff1-44d7-94c6-4946d7e00cd4)
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9278] device (tun1): state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9288] device (tun1): state change: prepare -> config (reason 'none') [40 50 0]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9297] device (tun1): state change: config -> ip-config (reason 'none') [50 70 0]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9300] device (tun1): state change: ip-config -> ip-check (reason 'none') [70 80 0]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9304] device (tun1): state change: ip-check -> secondaries (reason 'none') [80 90 0]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9306] device (tun1): state change: secondaries -> activated (reason 'none') [90 100 0]
Feb 02 09:34:35 gnunn-macbook NetworkManager[756]: <info>  [1486046075.9385] device (tun1): Activation: successful, device activated.
Feb 02 09:36:12 gnunn-macbook NetworkManager[756]: <info>  [1486046172.7408] device (tun1): state change: activated -> unmanaged (reason 'unmanaged') [100 10 3]
Feb 02 09:45:15 gnunn-macbook NetworkManager[756]: <info>  [1486046715.9467] audit: op="connection-activate" uuid="f281b867-85e1-4979-8adf-ad9fac216a7c" name="Work VPN" pid=4574 uid=1000 result="success"
Feb 02 09:45:15 gnunn-macbook NetworkManager[756]: <info>  [1486046715.9503] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: Started the VPN service, PID 4580
Feb 02 09:45:15 gnunn-macbook NetworkManager[756]: <info>  [1486046715.9539] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: Saw the service appear; activating connection
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6120] keyfile: update /etc/NetworkManager/system-connections/RDU2.ovpn (f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN")
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6255] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN plugin: state changed: starting (3)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6255] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN connection: (ConnectInteractive) reply received
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: tls-remote (2.4.0)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: Use --help for more information.
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <warn>  [1486046726.6289] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN plugin: failed: connect-failed (1)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <warn>  [1486046726.6290] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN plugin: failed: connect-failed (1)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6290] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN plugin: state changed: stopping (5)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6290] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN plugin: state changed: stopped (6)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6299] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN plugin: state change reason: unknown (0)
Feb 02 09:45:26 gnunn-macbook NetworkManager[756]: <info>  [1486046726.6307] vpn-connection[0x1fd44a0,f281b867-85e1-4979-8adf-ad9fac216a7c,"Work VPN",0]: VPN service disappeared

I looked at invoking OpenVPN directly, but I'm not sure what to do with the pem file in terms of the available options. If I try using it with the --cert option it complains about needing the CA, do I need to extract that out from the pem file?

Last edited by gnunn (2017-02-03 13:44:00)

Offline

#2 2017-02-03 13:43:39

gnunn
Member
Registered: 2013-10-21
Posts: 96

Re: [Solved] OpenVPN failing to connect

openvpn 2.4.0 broken NetworkManager as they removed an option, downgrading openvpn solves the issue for me.

Offline

Board footer

Powered by FluxBB