Page 4 of 7

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 11:25 am
by asqwerth
fehlix wrote: Tue Nov 09, 2021 7:15 am In case manually restarting nordvpn would help, as mentioned already,
here a password less auto(re-)start of nordvpn daemon:

* first enable password less (re-)start of NordVPN daemon:
run this in terminal:

Code: Select all

echo "%users ALL=(root) NOPASSWD: /etc/init.d/nordvpn" | sudo sh -c 'umask 0337; tee /etc/sudoers.d/nordvpn'
* next add an autostart entry for Xfce with delay, e.g. of 5 sec:
Within Session&Startup add new Entry:
Name: NordVPN
Comment: Restart NordVPN
Command:

Code: Select all

sh -c "pidof -q nordvpnd && exit; test  -f /etc/init.d/nordvpn && sleep 5 && sudo /etc/init.d/nordvpn restart"
Note: you can add further commands semicolon separated like the one you have shown, e.g.
e.g. to add "nordvpn c"

Code: Select all

sh -c "pidof -q nordvpnd && exit; test  -f /etc/init.d/nordvpn && sleep 5 && sudo /etc/init.d/nordvpn restart; nordvpn c"
Works here for both inits: SysVinit and systemd.
+++EDIT+++; adjusted autostart command
@fehlix can the first command be reversed if Nordvpn issues an update that works again? I'll be more comfortable testing this knowing how to reverse it.

For now, I made a launcher that runs a script with the simple sysV command to start the service. Terminal pops up, I enter password, then I run command to connect.

I don't connect with vpn all the time (e.g my wireless printer/scanner doesn't work with vpn on).

[Added] also, is the nordvpn deb file for MX21 the same as that for MX19? I have the 3.11 file in MX21 but had cleared the caches of my MX19 installs already.

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 11:52 am
by fehlix
asqwerth wrote: Tue Nov 09, 2021 11:25 am
fehlix wrote: Tue Nov 09, 2021 7:15 am In case manually restarting nordvpn would help, as mentioned already,
here a password less auto(re-)start of nordvpn daemon:

* first enable password less (re-)start of NordVPN daemon:
run this in terminal:

Code: Select all

echo "%users ALL=(root) NOPASSWD: /etc/init.d/nordvpn" | sudo sh -c 'umask 0337; tee /etc/sudoers.d/nordvpn'
* next add an autostart entry for Xfce with delay, e.g. of 5 sec:
Within Session&Startup add new Entry:
Name: NordVPN
Comment: Restart NordVPN
Command:

Code: Select all

sh -c "pidof -q nordvpnd && exit; test  -f /etc/init.d/nordvpn && sleep 5 && sudo /etc/init.d/nordvpn restart"
Note: you can add further commands semicolon separated like the one you have shown, e.g.
e.g. to add "nordvpn c"

Code: Select all

sh -c "pidof -q nordvpnd && exit; test  -f /etc/init.d/nordvpn && sleep 5 && sudo /etc/init.d/nordvpn restart; nordvpn c"
Works here for both inits: SysVinit and systemd.
+++EDIT+++; adjusted autostart command
@fehlix can the first command be reversed if Nordvpn issues an update that works again? I'll be more comfortable testing this knowing how to reverse it.

For now, I made a launcher that runs a script with the simple sysV command to start the service. Terminal pops up, I enter password, then I run command to connect.

I don't connect with vpn all the time (e.g my wireless printer/scanner doesn't work with vpn on).

[Added] also, is the nordvpn deb file for MX21 the same as that for MX19? I have the 3.11 file in MX21 but had cleared the caches of my MX19 installs already.
The shown session autostart for NordVPN contains a check whether nordvpnd is running, and if daemon is running would not do anything,indicated by this code snipplet:

Code: Select all

pidof -q nordvpnd && exit;
The deb-packages for buster (MX19) and bullseye (MX21) are identical:

Code: Select all

apt policy nordvpn | head

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

nordvpn:
  Installed: 3.12.0-1
  Candidate: 3.12.0-1
  Version table:
 *** 3.12.0-1 500
        500 https://repo.nordvpn.com/deb/nordvpn/debian stable/main amd64 Packages
        100 /var/lib/dpkg/status
     3.11.0-1 500
        500 https://repo.nordvpn.com/deb/nordvpn/debian stable/main amd64 Packages
     3.10.0-1 500

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 11:57 am
by asqwerth
Sorry, @fehlix , I meant the command that seems to add nordvpn to sudoers file (I'm not exactly sure what it does but when I see "sudoers" I sit up). That looks like something I only want on a temporary basis. I can always remove the autostart entry.

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 11:58 am
by fehlix
asqwerth wrote: Tue Nov 09, 2021 11:25 am @fehlix can the first command be reversed if Nordvpn issues an update that works again? I'll be more comfortable testing this knowing how to reverse it.
If you refer with "first command" to adding the password less sudoers entry:
To revert: just remove the sudoers file:

Code: Select all

sudo rm /etc/sudoers.d/nordvpn

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 12:21 pm
by fehlix
asqwerth wrote: Tue Nov 09, 2021 11:57 am Sorry, @fehlix , I meant the command that seems to add nordvpn to sudoers file (I'm not exactly sure what it does but when I see "sudoers" I sit up). That looks like something I only want on a temporary basis. I can always remove the autostart entry.
to add: The autostart would require to start nordvpn daemon with elevated rights, so using sudo password less is the simplest to achieve this within autostart and without a password prompt.
The line:

Code: Select all

%users ALL=(root) NOPASSWD: /etc/init.d/nordvpn
means all user can start/stop nordvpn deamon,
Surely, this can be "hardened" to only allowing e.g. to start/restart for a specific user,
but would required a further helper script.
This "fix" would only be needed, until NordVPN get fixed somehow by it's own.
Alternative if a GUI password prompt is desired:
Do replace within the autostart entry "sudo" with "pkexec"
So the autostart command line would look like:

Code: Select all

sh -c "pidof -q nordvpnd && exit; test  -f /etc/init.d/nordvpn && sleep 5 && pkexec /etc/init.d/nordvpn restart"

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 12:41 pm
by asqwerth
Thanks, fehlix.

I'll try it tomorrow. It's late here and I've just sent a bug report to NordVPN support to complain about v3.12 on both MX and Arch. That way they can't claim it's only a sysV problem.

BTW, for anyone interested, this is my .desktop file (launcher) to run a script that only has "sudo service nordvpn start" in it.

Code: Select all

[Desktop Entry]
Version=1.0
Exec=/home/tuaz/.local/share/applications/nordvpn_restart.sh
Icon=ndisgtk
Type=Application
Categories=Network;Plasma;KDE;XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;
OnlyShowIn=XFCE;KDE
Terminal=true
StartupNotify=true
X-XfceHelpPage=preferences
Name[en_US]=Nordvpn_Restart
Name=Nordvpn_Restart
Comment[en_US]=
Comment=restart nord svc
It does require password but since I don't enable VPN all the time, I could live with it the past few days.

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Tue Nov 09, 2021 1:24 pm
by Cristobal
asqwerth wrote: Tue Nov 09, 2021 9:37 am
May I ask if you just emailed them at their support email?
I sent them an email on last Saturday, explaining that their app would work with sysvinit if restarted and that their developers should look into it.
asqwerth wrote: Tue Nov 09, 2021 9:37 am And at least in MX running under sysV, it does connect once you restart the service. So the claim that their application doesn't work with sysV just isn't true.
I know, Nordvpn customer service's answer are always a bit off to me... The response usually arrives the day after and seems automated (as if they got it from a customer relationship management software).

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Wed Nov 10, 2021 1:34 am
by asqwerth
Cristobal wrote: Tue Nov 09, 2021 1:24 pm
I sent them an email on last Saturday, explaining that their app would work with sysvinit if restarted and that their developers should look into it.
....
I know, Nordvpn customer service's answer are always a bit off to me... The response usually arrives the day after and seems automated (as if they got it from a customer relationship management software).
I quoted their response to you and said it can't be true since I've had issues with their package running in Arch (systemd) since version 3.11. Gave them a link to the Arch AUR showing many users having issues since 3.11, and said that at least in MX sysV, I could restart service and get it working, which I haven't been able to do in Arch.

Let's see their response to that.

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Fri Nov 12, 2021 5:35 am
by venik212
Is there a compelling reason to "upgrade"? Version 3.10 seems to work just fine, although now it is unknown to MX Package manager, because I uploaded it using NordVPN's instructions-- wget... etc.

Re: NordVPN today update Version 3.12.0 not work in SysVinit

Posted: Fri Nov 12, 2021 6:39 am
by fehlix
venik212 wrote: Fri Nov 12, 2021 5:35 am Is there a compelling reason to "upgrade"? Version 3.10 seems to work just fine, although now it is unknown to MX Package manager, because I uploaded it using NordVPN's instructions-- wget... etc.
I've no idea about changes in the different versions.
Would you post the instructions you followed. Esp. I'm interested in this statement "now it is unknown to MX Package", so I like to reproduce by using your instructions.