Cannot Ping 8.8.8.8 after Disconnecting from NordVPN?

One time after I suspended my computer while nordvpn was running, I discovered that I could no longer connect to the internet (using ping 8.8.8.8), and Discord and browsers likewise won’t load anything.

Connecting to nordvpn solves these issues, but there are some applications for which I wouldn’t like to use VPN for. Killswitch is not enabled in nordvpn settings.

NetworkManager was restarted, but this doesn’t have any effect.

This is the /etc/resol.conf (while not connected to nordvpn):

# Generated by NetworkManager
nameserver 1.1.1.1
nameserver 8.8.8.8

How can I connect to the internet while not using nordvpn again?

How do you connect with this VPN provider? Probably, the route weren’t set back after the connection dropped when the system was suspended. Either complain with the provider that their program doesn’t exit correctly, or disconnect the VPN and then suspend.

A quick-fix would be rebooting. However, resetting your routing table should also work:

sudo ip route flush table main
sudo systemctl restart NetworkManager

(Hopefully that clears the routing table and puts the default settings for you network.)

Restarts do work, but this solution didn’t :slight_smile:

Yeah, it was a long shot. I still think it has something to do with the routing table. Before the suspension, the routing table included the entry that all traffic should be routed over VPN. Then after waking up, the connection failed (probably a timeout) but the route stays so that still all traffic is to be routed via VPN which doesn’t exist anymore.

Did you also restart NetworkManager? (Or are you using a different network service like systemd-networkd?)

I’m running vanilla Manjaro KDE.

I have no idea what it runs under the hood :slight_smile:

So pretty sure that’s NetworkManager.

No issue here with my primary Network Manager/OpenVPN config under xfce (Unstable). I could not duplicate your issue with the CLI either (nordvpn-bin 3.10.0_1-1) My settings for the CLI are:

nordvpn settings                                                    [127]
Technology: NordLynx
Firewall: enabled
Kill Switch: disabled
CyberSec: disabled
Notify: enabled
Auto-connect: disabled
IPv6: disabled
DNS: disabled

Here are my settings (same version of nordvpn as yours):

sarah@MidnightStarSign:~/Desktop$ nordvpn settings                                   
Technology: NordLynx
Firewall: enabled
Kill Switch: disabled
CyberSec: disabled
Notify: enabled
Auto-connect: disabled
IPv6: disabled
DNS: 8.8.8.8
Whitelisted subnets:
192.168.1.0/24

I think there may be some problem with your configuration. The difference is that I am using the VPN provided DNS when connected to the VPN and my router config forces OpenDNS when not connected for the entire network. It shows clean that way when leaktested. I have also added dns-priority=-1 to the ipv4 setting section to my .ovpn files.

connected to Nord via OpenVPN:
# Generated by NetworkManager
nameserver 103.86.96.100
nameserver 103.86.99.100

not connected to VPN:
# Generated by NetworkManager
nameserver 192.168.1.1

Do you need static DNS servers or is this just your preference?

If you don’t need static DNS, I’d change your network settings so that your DNS servers are set dynamically.

Then, I’d test by switching your vpn on and off to see if that makes any difference.

1 Like

How can I switch back to dynamicly provided DNS?

From what I recall I did that to solve some other problem with a (much) older version of nordvpn.

Easiest way would be checking your Wired/WiFi settings on the Network properties in your Desktop Environment (At least Gnome provides a way to do this).

On the adapter settings, there should be a section for IPv4. Look up for the DNS settings. There should be a toggle or something to switch from static to automatic and viceversa.

You may need just to remove the Static DNS settings. Again, that depends on your desktop environment.

Apart from this issue. Why do you use a VPN but still send all your DNS queries intentionally unencrypted to Cloudflare and Google? What’s the purpose of the VPN?

Set it back to automatic via KDE connection manager, but when nordvpn disconnects it still leaves resol.conf the same and can no longer access the internet.

sarah@MidnightStarSign:~$ nordvpn connect
Connecting to United States #9236 (us9236.nordvpn.com)
You are connected to United States #9236 (us9236.nordvpn.com)!
sarah@MidnightStarSign:~$ cat /etc/resolv.conf
# Generated by NordVPN
nameserver 8.8.8.8
sarah@MidnightStarSign:~$ nordvpn d
You are disconnected from NordVPN.
How would you rate your connection quality on a scale from 1 (poor) to 5 (excellent)? Ty
pe 'nordvpn rate [1-5]'.
sarah@MidnightStarSign:~$ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
sarah@MidnightStarSign:~$ PING
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6075ms

Ok, I see two things here:

  1. Looks like you have that google DNS statically assigned on your NordVPN configuration. If you compare with @jrichard326‘s settings, you shouldn’t need to do that under normal circumstances.

  2. When not connected to the VPN, assuming you set up your network adapter properly to get the IP address and DNS settings automatically, then most likely there is an issue coming from your ISP device (either like the Internal DHCP server not properly set up to deliver DNS settings or not enabled at all)

That would explain why that DNS server persists in the resolv.conf file after disconnecting from the VPN.

In that case, I’d recommend you give a call to your ISP so they would be able to assist in troubleshooting from their end.