Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS entries are sticking after disconnecting from NordVPN #26

Closed
dbolger opened this issue May 21, 2023 · 8 comments
Closed

DNS entries are sticking after disconnecting from NordVPN #26

dbolger opened this issue May 21, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@dbolger
Copy link

dbolger commented May 21, 2023

I have a static nameserver defined in /etc/dhcpcd.conf that is being overwritten and not being returned to /etc/resolv.conf after disconnecting from NordVPN.

Before connecting to NordVPN:

# Generated by resolvconf
nameserver 192.168.50.13

After connecting to NordVPN:

# Generated by NordVPN
nameserver 103.86.96.100
nameserver 103.86.99.100

After disconnecting from NordVPN:

# Generated by resolvconf
nameserver 103.86.96.100
nameserver 103.86.99.100
@dbolger
Copy link
Author

dbolger commented May 21, 2023

Ah, I just noticed that Arch Linux isn't on the list of supported distros.

Is Arch support coming in the future?

Edit: #3, I'm blind

@EmilijusS EmilijusS added the bug Something isn't working label May 23, 2023
@EmilijusS
Copy link
Contributor

Hello and thank you for reporting an issue. I couldn't reproduce it on Ubuntu and unfortunately we do not officially support Arch, so we aren't going to investigate this issue further at this time.

On the other hand we gladly accept community contributions and if a Pull Request with the fix would be created we could merge it.

@saucecode
Copy link

Since this is appears as a top search result, I now share how I fixed this on my arch machine.

After disconnecting with nordvpn d and DNS requests stopped working.

/etc/resolv.conf still showed the NordVPN name servers. The command resolvectl also confirms that those nameservers are still loaded.

I manually edited /etc/resolvconf adding 1.1.1.1 and 8.8.8.8, then ran sudo systemctl restart systemd-resolved

Confirmed that the changes are reflected when running resolvectl.

@pyro12
Copy link

pyro12 commented Jun 10, 2024

Greetings. I'm also on Arch. I sometimes use Nord and sometimes use PIA VPN's. Pretty sure this issue started with 3.13.18-1 for me, but I can't be certain as I hadn't used PIA for awhile. When I tried to use PIA today, it wouldn't connect and gave the error, "could not resolve DNS settings."

My resolv.conf was stuck on

# Generated by NordVPN
nameserver 103.86.96.100
nameserver 103.86.99.100

even when nord was disconnected. Also, my resolv.conf had been rendered immutable. I checked, and it IS NOT a symlink to /run/NetworkManager/resolv.conf. Pretty sure PIA wanted to make its own changes to /etc/resolv.conf and couldn't.

lsattr /etc/resolv.conf

if there's an 'i' in the output then it is immutable. (something like ------i---------- /etc/resolv.conf)

sudo chattr -i /etc/resolv.conf

to remove the 'i' attribute

All seems well again. I DID NOT like having to do this. I can understand nord taking control of that file while connected, but it should release it and change it back when disconnected - especially if the kill switch is disabled - which it was for me:

$ nordvpn settings
Technology: NORDLYNX
Firewall: disabled
Firewall Mark: 0xe1f1
Routing: enabled
Analytics: enabled
Kill Switch: disabled
Threat Protection Lite: disabled
Notify: enabled
Auto-connect: disabled
IPv6: disabled
Meshnet: disabled
DNS: disabled
LAN Discovery: disabled
Allowlisted subnets:
        10.42.0.0/24

Maybe I'm wrong and this isn't nord refusing to give back control, but an immutable file whose first line is #Generated by NordVPN makes me think nord did this.

@mariusSincovici
Copy link
Contributor

Hi, thanks for updates.
If the file contains # Generated by NordVPN that means it was modified by the NordVPN app and they should be cleared at disconnect.
Unfortunately we cannot reproduce this on our side, but we'll try to add some more checks for this case in the upcoming releases, maybe it will prevent this.

Do you know by any chance is the daemon crashed or was killed before this?

@pyro12
Copy link

pyro12 commented Jun 19, 2024

@mariusSincovici

I am positive that I disconnected with 'nordvpn d' so I would think that it was running. I also connected/disconnected a few times while trying to fix the issue.

@keliramu
Copy link
Contributor

Hi, there are improvements in handling/recovering resolv.conf check this commit. To be released with next version v3.18.3 soon.

@keliramu
Copy link
Contributor

keliramu commented Jul 1, 2024

Closing this issue now.

@keliramu keliramu closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants