Install NordVPN on Qubes OS

Hello,
I wanted to install nordvpn on qube os but I had no succeed.

I followed the instruction based on this blog post:

First I created a vm called service:Nordvpn based on fedora. Then I installed nordvpn by entering this command in service:Nordvpn terminal:
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)

Then I entered this command:
sudo usermod -aG nordvpn $USER

and after rebooting I opened the terminal again and entered this command:
nordvpn login

but from here nothing happened. Would you please help me?

I entered those command based on nordvpn instruction here:

I get this error when I enter “nordvpn login” command in VM terminal

bash: nordvpn: command not found…

You installed it in an AppVM which won’t make it persistent. If you want packages to be persistent, you need to install them in TemplateVMs.

Well, clearly you didn’t because in that guide there’s no mention of installing proprietary vpn clients.


Method 1

Follow the guide that you linked (Using Mullvad VPN in Qubes | Micah Lee), which tells you to download the .conf (or .ovpn) files from the vpn website (in case of nordvpn: OpenVPN configuration files | NordVPN)

Method 2

If you want to use the nordvpn client, you need to install in a TemplateVM (for example debian-11, then create an AppVM, create bind-dirs and make the nordvpn configuration file persistent (/var/lib/nordvpn/data/settings.dat). In the AppVM:

$ sudo mkdir -p /rw/config/qubes-bind-dirs.d
$ echo "binds+=( '/var/lib/nordvpn' )" | sudo tee -a /rw/config/qubes-bind-dirs.d/50_user.conf
$ sudo poweroff

Then start the AppVM again, login with nordvpn login and then it should persist.

Method 3 (NOT recommended)

Otherwise you can create a StandaloneVM, install nordvpn there and use it normally, just be aware that this approach is less than ideal and NOT recommended since everything will be persistent.

qvm-create --standalone -t TEMPLATE -l red --prop provides_network=true --prop netvm=sys-firewall sys-nordpvn

(change TEMPLATE with the template you want to use, like debian-11 for example)


This topic has been covered multiple times and a solution for your problem already exists. Please use the search button: Search results for 'nordvpn' - Qubes OS Forum

2 Likes

Thanks for your help. I always do search and maybe I read that article more than 5-6 times but as I’m new to working with linux command I have no way to ask for help.

I was able to setup nordvpn finally with your help. Just couldn’t make it automatically connected.

Now, let’s make this VPN automatically connect whenever it boots up. Open a terminal in vpn-mullvad (click Qubes, Service: vpn-mullvad, vpn-mullvad: Terminal), and run:

from here I was stuck maybe because I don’t use the correct name of my vpn.

Mullvad is the name of a vpn provider, you should’ve called it sys-nordvpn, but the name of the vm doesn’t matter.

For the autoconnect question: you didn’t mention which method you followed.

If you followed 2 or 3: nordvpn set autoconnect on
You can also add the two-letter country code after on if you want to always autoconnect to a specific country.

This approach should not be used with NordVPN, as it would lead to a leak if the VPN stops running (the killswitch state does not matter).

ProtonVPN and Mullvad do not have this problem. IVPN has the same problem as Nord, but their next release will fix it.