LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-27-2019, 12:16 PM   #1
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Rep: Reputation: 44
Slackware 14.2 and NordVPN howto


This is how I do it. Your mileage may vary, E&OE.

1 Download the config files intended for Raspberry Pi:
https://nordvpn.com/api/files/zip

2 Unpack them in /etc/openvpn
...this will give you 2 dirs, one with files for udp and one for tcp

3 make a file with your auth credentials, first line username, second line password. Put it somewhere and make it readable only by root.

4 go to the NordVPN website and find out which server is recommended for your location or choose one by some criteria which suits you

5 in /etc/openvpn do
'ln -s [path to config file you've chosen] nordvpn.conf'
NordVPN reccomends you use udp
For example:
'ln -s /etc/openvpn/ovpn_udp/uk123.nordvpn.com.udp.ovpn nordvpn.conf'

6 for the config file you've chosen, at the line that says 'auth-user-pass' add a space then put the path to your auth file from step 3

7 in /etc/rc.d make rc.openvpn executable

8 modify your /etc/resolv.conf to use the NordVPN DNS

# NordVPN ...
nameserver 103.86.96.100
nameserver 103.86.99.100

9 stop dhcp or whatever clobbering your resolv.conf ...
'chattr +i resolv.conf'


You can now start / stop NordVPN using the rc.openvpn initialisation file. I have it in rc.local[_shutdown] to automatically start / stop NordVPN when my Kodi box runs.
 
Old 04-27-2019, 02:01 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
You may want to look into openresolv as this allows you to change your DNS servers once connected to a VPN (so you don't get DNS leakage when connected to your VPN). I found this program when I setup PIA on my system and was able to get it to work on Slackware and updated the SlackBuild to allow it to work properly on our systems.
 
3 members found this post helpful.
Old 04-28-2019, 02:07 AM   #3
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by bassmadrigal View Post
You may want to look into openresolv as this allows you to change your DNS servers once connected to a VPN (so you don't get DNS leakage when connected to your VPN). I found this program when I setup PIA on my system and was able to get it to work on Slackware and updated the SlackBuild to allow it to work properly on our systems.
Maybe the emerging encrypted DNS protocols and tools will fix this ... and possibly make VPN less necessary for many use cases. It would appear to me that without encrypted DNS you're potentially still at the mercy of your router, and downstream ISP routers, unless you set VPN up on your router.
My use case for VPN is to get at stuff otherwise not available in UK.
My quick and dirty solution allows my setup to pass the online DNS leak tests I've tried, FWIW. My router is too dumb to have anything to do with IPv6.

Last edited by johnny23; 04-28-2019 at 02:15 AM.
 
Old 04-28-2019, 01:44 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by johnny23 View Post
Maybe the emerging encrypted DNS protocols and tools will fix this ... and possibly make VPN less necessary for many use cases. It would appear to me that without encrypted DNS you're potentially still at the mercy of your router, and downstream ISP routers, unless you set VPN up on your router.
My use case for VPN is to get at stuff otherwise not available in UK.
My quick and dirty solution allows my setup to pass the online DNS leak tests I've tried, FWIW. My router is too dumb to have anything to do with IPv6.
Normally your /etc/resolv.conf is set by DHCP, which will typically add your router as the primary nameserver. Your router will typically have your ISP's nameservers provided by DHCP from the ISP.

openresolv allows you to automatically add the specified nameservers above the ones listed in /etc/resolv.conf. However, it only adds them and doesn't remove the defaults, so if those added nameservers are not working, it will work its way down the list until it finds one that does work, which could be the one provided by your router.
 
Old 04-29-2019, 03:04 AM   #5
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by bassmadrigal View Post
Normally your /etc/resolv.conf is set by DHCP, which will typically add your router as the primary nameserver. Your router will typically have your ISP's nameservers provided by DHCP from the ISP.
Exactly why step 9, resolv.conf becomes immutable and attempts to change it fail so, yes, follow my steps all the way to the end.
 
Old 04-29-2019, 12:45 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by johnny23 View Post
Exactly why step 9, resolv.conf becomes immutable and attempts to change it fail so, yes, follow my steps all the way to the end.
I don't want to connect to these DNS servers when I'm not connected to VPN, so I would prefer it to only be changed when I am connected. I guess not everyone has this desire. That was the only reason I had suggested using openresolv. It allows your resolv.conf to only be changed when connected to VPN and otherwise, it'll use the values provided by your DHCP server.
 
Old 04-30-2019, 04:10 PM   #7
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
Haven't used Nord so I don't know what they do exactly, however some vpn ops may NAT port 53 to their own server.
If you run into one of those it won't matter where you point resolv.conf except if you point to forwarder which only reads /etc/hosts file.
Maybe you could forward over :443 with TLS that's what google seems to be pushing recently, but it depends on the endpoint I guess.
 
Old 05-12-2019, 04:43 AM   #8
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 44
On Slackware, just do it my way then go to the VPN testing pages online and see.
 
Old 10-26-2020, 07:43 AM   #9
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 44
NordVPN app

The NordVPN app is the way to go now (Slackbuilds). http://dvc.org.uk/wp/?p=108
 
Old 10-26-2020, 02:25 PM   #10
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,221

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
What's up with the versioning, their download page has the latest RPM as 1.0.0-1 (which is here), versus 3.8.4 on SBo, or 3.8.5 on their CentOS packages for x86_64.

Last edited by drgibbon; 10-26-2020 at 02:29 PM.
 
Old 10-28-2020, 03:45 AM   #11
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by drgibbon View Post
What's up with the versioning, their download page has the latest RPM as 1.0.0-1 (which is here), versus 3.8.4 on SBo, or 3.8.5 on their CentOS packages for x86_64.
RPM packages have their own versioning. They are not relevant to Slackware.
 
Old 07-09-2021, 03:10 AM   #12
desty
LQ Newbie
 
Registered: Jul 2021
Posts: 2

Rep: Reputation: Disabled
Is the guide in the first post still applicable? the linked file is no longer available. I've installed nordvpn from slackbuilds as suggested by johnny23 but get "Please check your internet connection and try again" error when attempting to connect (after running nordvpnd) so apparently some additional steps are required.
Thanks
 
Old 07-09-2021, 06:09 PM   #13
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
The latest post advises to move to the app on SBo.

Alternatively you could set it up via Network Manager (nm) and the nm-applet.
For this you'll need to install the nm-openvpn plugin from SBo (slackbuilds.org/../NetworkManager-openvpn/)

Download the vpn config file you like to use and load into nm:
right-click nm-applet icon; choose 'Edit Connections'
press '+'; on drop-down list go to the very bottom: 'VPN', 'Import a saved VPN configuration'
and load your vpn-file after 'create'; add Nord-user login data; save new connection.

Start vpn by left-clicking nm-applet icon , go to 'vpn' and tick checkbox for connection of choice.
Icon should change to one with a lock-symbol
(on current, xfce)

hth

EDIT: on current the plugin is present; todays' Changelog:
Quote:
xap/NetworkManager-openvpn-1.8.14-x86_64-1.txz: Upgraded.

Last edited by brobr; 07-09-2021 at 06:18 PM.
 
1 members found this post helpful.
Old 07-09-2021, 08:10 PM   #14
johnny23
Member
 
Registered: Aug 2009
Location: Lapu-Lapu City, Philippines
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by desty View Post
Is the guide in the first post still applicable? the linked file is no longer available. I've installed nordvpn from slackbuilds as suggested by johnny23 but get "Please check your internet connection and try again" error when attempting to connect (after running nordvpnd) so apparently some additional steps are required.
Thanks
The Slackbuild doesn't track the frequent releases of the bug-fixed versions of the NordVPN app. With tweaking the Slackbuild works with the later releases, the lockfile directory was changed a few revisions ago for instance. The NordVPN app works fine for what I want to do with it but equally you could configure OpenVPN in a more Slackware-esq way and not use the app. Maybe another blog post when Slackware 15 lands.
 
Old 07-10-2021, 02:56 AM   #15
desty
LQ Newbie
 
Registered: Jul 2021
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by brobr View Post
The latest post advises to move to the app on SBo.
Quote:
Originally Posted by johnny23 View Post
The NordVPN app works fine for what I want to do with it
Thanks guys I do have the nordvpn app installed it just isn't working right now. Do you have any thoughts on how to fix the "Please check your internet connection and try again" error I'm getting? Nothing has been tinkered with or set up I've just installed the app and run nordvpnd, nordvpn c
 
  


Reply

Tags
nordvpn, slackware, vpn



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NordVPN DNS leak on Mint 18.2 mr.travo Linux - Networking 2 01-16-2018 04:57 PM
nordVPN leak DNS test faild dmatija Linux - Networking 1 10-09-2017 06:56 PM
[SOLVED] problem with iptables and NordVPN/OpenVPN gone_bush Linux - Networking 1 04-27-2017 07:14 PM
LXer: NordVPN for Android LXer Syndicated Linux News 0 09-06-2016 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration