You are not logged in.

#1 2018-03-26 16:45:19

Xakep_SDK
Member
Registered: 2017-09-23
Posts: 61

NetworkManager openvpn stopped working

I can't connect to a openvpn server using networkmanager, but i can connect through terminal using `openvpn --config vpn.ovpn`.
`jounralctl -u NetworkManager -e` shows me this:

nm-openvpn[7114]: OpenVPN 2.4.5 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar  1 2018
nm-openvpn[7114]: library versions: OpenSSL 1.1.0g  2 Nov 2017, LZO 2.10
nm-openvpn[7114]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
nm-openvpn[7114]: TCP/UDP: Preserving recently used remote address: [AF_INET]IP_REMOVED
nm-openvpn[7114]: Attempting to establish TCP connection with [AF_INET]IP_REMOVED [nonblock]
nm-openvpn[7114]: TCP: connect to [AF_INET]IP_REMOVED failed: Connection refused
nm-openvpn[7114]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
nm-openvpn[7114]: SIGUSR1[connection failed(soft),init_instance] received, process restarting
nm-openvpn[7114]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
nm-openvpn[7114]: TCP/UDP: Preserving recently used remote address: [AF_INET]IP_REMOVED
nm-openvpn[7114]: Attempting to establish TCP connection with [AF_INET]IP_REMOVED [nonblock]
nm-openvpn[7114]: TCP: connect to [AF_INET]IP_REMOVED failed: Connection refused
nm-openvpn[7114]: SIGUSR1[connection failed(soft),init_instance] received, process restarting

Offline

#2 2018-03-26 18:19:29

lo1
Member
Registered: 2017-09-25
Posts: 584

Re: NetworkManager openvpn stopped working

As always, openvpn works best as a standalone solution.

Did you follow https://wiki.archlinux.org/index.php/Op … connection ? What does the dispatcher script looks like?

Also don't miss https://wiki.archlinux.org/index.php/Ne … stablished

Last edited by lo1 (2018-03-26 18:20:47)

Offline

#3 2018-03-26 23:29:41

gerdesj
Member
Registered: 2016-04-17
Posts: 13

Re: NetworkManager openvpn stopped working

lo1 wrote:

As always, openvpn works best as a standalone solution.

I disagree somewhat.  The problem is:

nm-openvpn[7114]: TCP: connect to [AF_INET]IP_REMOVED failed: Connection refused

That implies that the other end actively appears to refuse the connection (the problem may be local as well).  There are several good reasons for that, some of which include the server is using UDP, a different port, IP, or the OP is behind a MitM (unlikely) or the server is just plain down.  Screwing up a local firewall or one on between here and there will also have this effect.  I have found the NM plugin to work fine for several years on Arch, Gentoo, Ubuntu on quite a few systems (high double figures).  You can clearly see that it is working fine - it's spitting out a bloody log directly from OpenVPN itself that tells you as much as it can within reason.  Now, you do have to get the settings into the OVPN connection in NM properly and that's what we are missing here - does vpn.ovpn match all the settings in NM? Are we comparing apples and apples? 

Without any really useful info to work from, I'll mention that when I import an "Inline configurations" generated from a pfSense box running the OVPN server, I have to also set OpenVPN -> Advanced -> Key Direction -> Client (1) in NM (I generally use the qt-plasma frontend).

Offline

#4 2018-03-27 08:47:23

Xakep_SDK
Member
Registered: 2017-09-23
Posts: 61

Re: NetworkManager openvpn stopped working

It was working fine for a long time, but now it doesn't work. Also, i can't connect to a vpn from my smartphone, it stucks at `udp link remote [af_inet]ADDR_HERE`.
It may be mitm, because my gov. sucks and blocks everything.[censorship], but why i can connect from terminal?

Also, settings should be exact, i have imported that config using `Import from file` button.

Offline

Board footer

Powered by FluxBB