Nord VPN wrong DNS on PureOS killing web connection

I ran into a very similar problem as the user in this thread: PureOS not able to connect to internet, accept through Tor Browser

After my battery died and rebooting I was completely unable to connect to the internet, even though I was connected to my wifi router. I discovered that Nord VPN was pointing at the wrong DNS, exactly like in the thread. However, by this time I had already tried to uninstall Nord.

I then attempted to reinstall Nord, but upon installation, none of the CLI commands worked. Therefore I cannot use their built-in command to update the DNS.

After that, I tried to update the DNS manually by following this tutorial: https://support.nordvpn.com/Connectivity/Linux/1134945702/Change-your-DNS-servers-on-Linux.htm

However, I could not become root user as my boot password for PureOS wasn’t recognized.

I am totally stuck and looking for help. Thanks in advance!

These may be two different passwords.

If you are using an encrypted root partition (are you?) then there is the passphrase to unlock the encrypted partition. This is solicited very early on in the boot process. That is a completely different password as compared with the password to become root (which is the login password for whichever user you are logged in as).

It may help to specify what hardware we are talking about. Librem laptop? Librem phone? Something else?

I am on a Librem 14 laptop. No, I am not running an encrypted partition. I’m just on the default settings for PureOS and PureBoot.

Sorry, I meant to reply directly to your response.

OK, so can you log in at all and if so do you know the username and password to do that?

I would always defer to @Irvinewade, but it might help all of us if you were to enumerate the steps you are taking. It is unclear me, and I see others asking questions that come to my mind.

In the meantime, my experience with VPNs is that the client will add its nameserver to /etc/resolv.conf when one logs into whatever service is being used. After that, if something untoward happens, e.g. a coredump, the nameserver data might be left behind and one cannot connect to anything. Then, the user has to manually delete the entries.

I have had this happen to me, though not on NordVPN. While I have never used NordVPN, a friend of mine does and this also happened to him, though not on Linux. We had to reset his DNS settings before things started working again.

Maybe what you want to do is not put NordVPN’s entries into resolv.conf, but let it use the DHCP default until you connect via its client. Then you should see one.

Yes, I know my login credentials. When booting up my computer I have two login steps.

  1. Unlocking the disk
  2. Logging into my user profile

However, when I try to access su in the terminal neither password works.

Let’s see if I can recall the steps…

First, upon learning Nord was the issue, but before realizing that I should update the DNS I decided to uninstall Nord.

Then I attempted to access su in the terminal to change the DNS using /etc/resolv.conf, but my password didn’t work.

Upon further research, I learned that there is a command in Nord to change the DNS (second link in my OP). So I tried to reinstall Nord. However, once reinstalled none of the nord commands worked. (nord: command not found)

Here is where I am stuck.

I’m not exactly sure how to do this. I’m relatively new to linux.

Try this: do a sudo su and use your login credentials.

Your description of steps is still a bit vague to me; I guess I was looking for some more specifics. Anyway…

I think what @irvinewade and @Dwaff are getting at is that you should us ‘sudo’ rather than ‘su’. The former allows you to use your user’s password; the latter requires the root password. You can check to make sure your user name is a member of the sudo group in /etc/group. If it is not, you may be stuck with ‘su’ to add yourself, unless the gurus here have other ideas. (And switch what follows from ‘sudo’ to ‘su’.)

I use ‘vi’ from my olden days to do edits like this. I do not want to put those instructions in here, so I hope I have this right and it will help you. Assuming you are using gnome and running from a command line in a terminal, first backup the resolv.conf, so you can recover what you have:

sudo cp /etc/resolv.conf /etc/resolv.bak

You will have to enter your user password, not root’s.

sudo gedit /etc/resolv.conf 

Unless you want to use a specific, public DNS server, delete the IPv4 entries and save. (Do not put NordVPN’s in here. To my knowledge, VPN providers do not generally make their DNS servers available publicly. That is why you may not be able to resolve anything.) Then try to connect to your wifi and then to NordVPN. I hope things will work.

If things work like other VPNs, as I mentioned in my previous post, the NordVPN client will create the needed entry in resolv.conf for its DNS. When you disconnect, this entry should disappear. (I am not sure how the NordVPN client behaves. Mine has a permanent kill, so I never disconnect my VPN client itself.)

Good luck.

OK, so you are using an encrypted partition!?!?

But, no matter, because I think we are closer to the problem now.

If you need to execute a command as root then

sudo whatever-the-command-is

and you will be prompted for your password.

If you need a login shell running as root then

sudo -i

You can’t out of the box do anything that requires root‍’s password because the root account is disabled, so best to ignore the su command. Refer: Expired root account