You are not logged in.

#1 2019-08-03 08:21:18

maxgiggs
Member
Registered: 2014-06-05
Posts: 32

nordvpn-bin: Autoconnect not working

As in the subject... Anyone else having this issue?

Offline

#2 2019-08-08 10:17:20

archifer
Member
Registered: 2019-07-08
Posts: 22

Re: nordvpn-bin: Autoconnect not working

Sometimes it happens after kernel upgrade. Remove NordVPN along with system folder.

sudo pacman -R nordvpn-bin

sudo rm -r /var/lib/nordvpn

Then install it.

sudo pacman -U /path/to/package

sudo systemctl enable nordvpnd.service

sudo systemctl start nordvpnd.service

nordvpn c

nordvpn set autoconnect on

sudo systemctl restart nordvpnd.service

After that logout and login back it should get back to normal.

Offline

#3 2019-08-08 21:47:41

maxgiggs
Member
Registered: 2014-06-05
Posts: 32

Re: nordvpn-bin: Autoconnect not working

I had already tried to reinstall the package in the past without success. Interestingly, your exact sequence of commands worked only once.

By inspecting the log, it seems that the nordvpn daemon don't connect because of this:

 [Error] failed to renew token: can't find gateway 

Last edited by maxgiggs (2019-08-09 07:52:24)

Offline

#4 2019-08-12 09:35:16

progreen
Member
Registered: 2019-08-05
Posts: 2

Re: nordvpn-bin: Autoconnect not working

I was also having this issue,

I think the problem is that the daemon is not waiting for network-onlne.target before attempting to connect. On my system, network-online.target was never reached even once the network had connected.

I fixed it with the following 2 steps:

Add 'Wants=network-online.target' to the [Unit] section of the nordvpnd.service file.

Enable the relevant networkd-wait-online.service service file. For me this was NetworkManager-networkd-wait-online.service. Ref: https://www.freedesktop.org/wiki/Softwa … orkTarget/

Now NetworkManager triggers the network-online.target when it has connected and only then does nordvpnd.service attempt the VPN connection.

Last edited by progreen (2019-08-12 13:25:36)

Offline

#5 2019-08-15 18:45:01

archifer
Member
Registered: 2019-07-08
Posts: 22

Re: nordvpn-bin: Autoconnect not working

progreen wrote:

I was also having this issue,

I think the problem is that the daemon is not waiting for network-onlne.target before attempting to connect. On my system, network-online.target was never reached even once the network had connected.

I fixed it with the following 2 steps:

Add 'Wants=network-online.target' to the [Unit] section of the nordvpnd.service file.

Enable the relevant networkd-wait-online.service service file. For me this was NetworkManager-networkd-wait-online.service. Ref: https://www.freedesktop.org/wiki/Softwa … orkTarget/

Now NetworkManager triggers the network-online.target when it has connected and only then does nordvpnd.service attempt the VPN connection.

Nice one. It actually helped me too.

Offline

#6 2019-08-15 18:48:52

archifer
Member
Registered: 2019-07-08
Posts: 22

Re: nordvpn-bin: Autoconnect not working

maxgiggs wrote:

I had already tried to reinstall the package in the past without success. Interestingly, your exact sequence of commands worked only once.

By inspecting the log, it seems that the nordvpn daemon don't connect because of this:

 [Error] failed to renew token: can't find gateway 

Yup that issue can fixed as stated above, I'll give you a quick workaround, do the following:

sudo nano '/etc/systemd/system/default.target.wants/nordvpnd.service'

add under *After*

Wants=network-online.target

then

sudo systemctl enable nordvpnd.service
sudo systemctl start nordvpnd.service
sudo systemctl restart nordvpnd.service

Last edited by archifer (2019-08-15 18:50:04)

Offline

#7 2019-08-15 18:51:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,147
Website

Re: nordvpn-bin: Autoconnect not working

archifer wrote:
sudo systemctl enable nordvpnd.service
sudo systemctl start nordvpnd.service
sudo systemctl restart nordvpnd.service

This is unnecessary.

systemctl daemon-reload && systemctl enable --now $service

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2019-08-15 19:17:24

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,866
Website

Re: nordvpn-bin: Autoconnect not working

Slight OT, but does this VPN provider offer you a standard ovpn profile?  Why not just use openvpn?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2019-08-16 10:32:57

progreen
Member
Registered: 2019-08-05
Posts: 2

Re: nordvpn-bin: Autoconnect not working

graysky wrote:

Slight OT, but does this VPN provider offer you a standard ovpn profile?  Why not just use openvpn?

From what I can gather the nordvpn daemon just runs an openvpn command  (interestingly it contains its own openvpn binary at /var/lib/nordvpn/openvpn) and configures iptables in the background to configure the VPN connection. The main advantage for me is being able to switch VPN server locations quickly with a short command.

Offline

#10 2019-08-16 21:30:37

archifer
Member
Registered: 2019-07-08
Posts: 22

Re: nordvpn-bin: Autoconnect not working

graysky wrote:

Slight OT, but does this VPN provider offer you a standard ovpn profile?  Why not just use openvpn?

Yes it actually does have that possibility but it has really handy and quick commands for the terminal for example just type *nordvpn c Sweden* and it connects you to the fastest server in Sweden so you don't have to search for it manually and NordVPN has like 5k servers to choose so terminal really comes in handy.

Offline

Board footer

Powered by FluxBB