You are not logged in.

#1 2021-06-20 20:00:43

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

[Solved] Network Manager DNS not working

When I ran `paru -Syyuu` (which I do every 5 hours or so to update) it gave me the warning `Packages not in the AUR: lib32-libnm-glib libnm-glib`. So I uninstalled them. I checked if they had any required packages, and they didn’t. They were orphans. However, when I rebooted my system NetworkManager doesn’t seem to interact with my DNS in any way. (Both of the packages haven’t been updated since Jan 2019 if I recall correctly). Is there any way to resolve this issue? Thank you!

Last edited by Mythbusters123 (2021-06-28 20:15:32)

Offline

#2 2021-06-20 20:45:17

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

Bump

Offline

#3 2021-06-20 21:11:27

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] Network Manager DNS not working


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2021-06-20 21:13:09

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

Also if anyone just has the .pkg.tar.xz file that would be enough

Offline

#5 2021-06-20 21:14:50

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

Sorry, I won’t in the future.

Offline

#6 2021-06-20 21:19:55

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

I found the archived package, I am going to install it and see the results

Offline

#7 2021-06-20 21:29:54

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

Update: Re-installing the packages did not fix anything.

Offline

#8 2021-06-20 21:39:03

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

More info that I forgot to supply: Its just the DNS resolver that is messed up, as i can ping 1.1.1.1 and 8.8.8.8 perfectly fine but not DuckDuckGo.com or ArchLinux.org

Offline

#9 2021-06-20 22:21:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

Mythbusters123 wrote:

Sorry, I won’t in the future.

https://www.merriam-webster.com/dictionary/irony
Unless somebody responded inbetween, please use the edit function to mend your post.

On topic:
https://www.merriam-webster.com/dictionary/coincidence

Then:

stat /etc/resolv.conf
cat /etc/resolv.conf
resolvectl status

https://wiki.archlinux.org/title/Systemd-resolved
https://wiki.archlinux.org/title/Networ … management

And if the problem remains, please post your system journal.

Online

#10 2021-06-20 22:49:10

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

For your list of commands (it says resolv.conf was modified but that is because NetworkManager rewrites it on every start of the application): http://ix.io/3qBm
For the system journal: http://ix.io/3qBl

Sorry if the system journal is long, I just did journalctl -b as I dont really know the correct switches.
Also sorry for being stupid on the forums.

Just any help would be appreciated. This is probably me just being stupid and I hope I dont ruin your day too much.

Last edited by Mythbusters123 (2021-06-20 22:49:45)

Offline

#11 2021-06-21 05:53:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

dig google.com
dig @192.168.1.1
dig @8.8.8.8 google.com
nslookup google.com
drill google.com
cat /etc/nsswitch.conf

Online

#12 2021-06-22 01:48:37

ruobgvgt
Member
Registered: 2021-06-22
Posts: 2

Re: [Solved] Network Manager DNS not working

I kinda have the same issue. Since I get simmillar errors when I do `resolvectl status`. It seems to be some problem with systemd-resolved. I fixed it by stopping the systemd-resolved.service. However I don't know what is the cause of the issue.

Offline

#13 2021-06-22 06:03:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

What error? "Failed to get link data for blafoobar"?
That's not the cause for failing DNS resolution (hopefully…)

stat /etc/resolv.conf
cat /etc/resolv.conf
resolvectl status
sudo journalctl -b

And make sure to read and understand
https://wiki.archlinux.org/title/Systemd-resolved
https://wiki.archlinux.org/title/Networ … management

Online

#14 2021-06-22 15:15:06

definitio
Member
Registered: 2021-06-22
Posts: 2

Re: [Solved] Network Manager DNS not working

I have the same issue as ruobgvgt. DNS doesn't work until systemd-resolved.service restart after system upgrade. Everything works if I boot from yesterday snapshot.

❯ stat /etc/resolv.conf
  File: /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
  Size: 37              Blocks: 8          IO Block: 4096   symbolic link
Device: 1ah/26d Inode: 5384479     Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-04-20 15:33:47.962465242 +0300
Modify: 2020-10-04 16:07:25.870227998 +0300
Change: 2020-10-04 16:07:25.870227998 +0300
 Birth: 2020-10-04 16:07:25.870227998 +0300
❯ cat /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search lan

After boot:

❯ resolvectl status
Global
       Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (eno1)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
       DNS Servers: 10.10.1.1
        DNS Domain: lan

Link 3 (test)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (br-qemu)
Current Scopes: LLMNR/IPv6
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

After systemd-resolved.service restart:

❯ resolvectl status
Global
       Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (eno1)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.10.1.1
       DNS Servers: 10.10.1.1
        DNS Domain: lan

Link 3 (test)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (br-qemu)
Current Scopes: LLMNR/IPv6
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

❯ sudo journalctl -b

Offline

#15 2021-06-22 15:47:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

This doesn't seem to fit the pattern of the OP (for now) - as resolved selects the DNS before the SDDM session ends, do you have the same issue when booting the multi-user.target (ie. no SDDM login, 2nd link below)?

Online

#16 2021-06-22 16:33:25

definitio
Member
Registered: 2021-06-22
Posts: 2

Re: [Solved] Network Manager DNS not working

Yes, nothing changes without GUI.

Offline

#17 2021-06-23 10:20:46

ruobgvgt
Member
Registered: 2021-06-22
Posts: 2

Re: [Solved] Network Manager DNS not working

Just a quick update. Turns out it is some issue with systemd-resolved. I am not sure what is causing the issue and will look into it. I found out by changing my

/etc/nsswitch.conf

and moving

dns

in front of

resolve

in the hosts section.

drill google.com

worked as in the wiki it says it gets its name servers from

/etc/resolved.conf

directly.

resolvectl query google.com
google.com: resolve call failed: Network is down

This is what I get when I query using resolvctl. Any help on what is causing it?

Last edited by ruobgvgt (2021-06-23 10:23:53)

Offline

#18 2021-06-23 13:59:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

=> "resolvectl status" and see definitio's post - he's no "Current DNS Server" before restarting resolved.

Any help on what is causing it?

It would seem that adding complexity and more layers of abstraction and replacing concurrent reading file access with a sequential bus w/ 25s timeout do not in fact make things more reliable…
More seriously, I assume a race condition and bug in systemd-resolved
(Hopes it to be in the systematically broken approach that selects completely random servers in the DNS cascade to begin with…)

Online

#19 2021-06-28 13:40:02

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

I figured out what was the issue (kind of). First I reinstalled my system cause I was looking for a reason to clean it up anyway (I had a lot of bloated packages). I do dual boot Windows (this may not apply to everyone, just saying what happens with me) and whenever I would set the DNS server on Windows the same errors would happen Linux. I cannot currently test anything as I am away from my computer, but it should only be a couple hours from this post.

Offline

#20 2021-06-28 13:47:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

See 3rd link below

Online

#21 2021-06-28 13:58:42

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

I already think I have it disabled, but I will check it out.

Offline

#22 2021-06-28 20:15:09

Mythbusters123
Member
Registered: 2021-01-31
Posts: 14

Re: [Solved] Network Manager DNS not working

Thanks! That worked. Thank you!!!!!

Offline

#23 2024-05-27 23:09:46

bgmeulem
Member
Registered: 2024-05-27
Posts: 11

Re: [Solved] Network Manager DNS not working

Just wanted to notify that I ran into this exact issue, and @ruobgvgt's solution of moving

 dns 

in front of

resolve

in

/etc/nsswitch.conf

worked for me.

For future reference, this is what I did prior to it breaking.
1. Tried to install ProtonVPN according to the wiki (https://wiki.archlinux.org/title/ProtonVPN), including:
a. copying update-systemd-resolved (https://github.com/jonathanio/update-systemd-resolved) to `/etc/openvpn/scripts`
b. Disabling IPv6 by setting `net.ipv6.conf.all.disable_ipv6 = 1` in `/etc/sysctl.d/40-ipv6.conf`
2. Failed to get Proton working for a variety of reasons that seem irrelevant here (pip trying to install stuff systemwide, gtk fighting with my windowmanager, package conflicts), so I removed all Proton dependencies and used this install script (https://github.com/000Daniel/How-to-ins … otonVPN.sh) instead (I'm well aware that random third party install scripts are a big no-no, but I did read through the script and everything checks out). I kept all previous configurations in my .conf files though.
3. Got ProtonVPN working. Connected. Both VPN and Wi-Fi connection worked perfectly fine. Disconnected. Could not resolve domain names anymore. Ping 8.8.8.8 worked, ping google.com did not. Rebooting or restarting systemd-resolved.service did not improve the situation.

The following note from the Arch Wiki on OpenVPN (https://wiki.archlinux.org/title/OpenVP … tom_script) seems very relevant, but I'm still too much of a noob to fully understand what it means:
Note: Since systemd 229, systemd-networkd has exposed an API through DBus allowing management of DNS configuration on a per-link basis. Tools such as openresolv may not work reliably when /etc/resolv.conf is managed by systemd-resolved, and will not work at all if using resolve instead of dns in /etc/nsswitch.conf.

Last edited by bgmeulem (2024-05-27 23:24:42)

Offline

#24 2024-05-28 05:37:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,984

Re: [Solved] Network Manager DNS not working

That's not a "solution", your resolved configuration is somehow broken (possibly by "copying update-systemd-resolved", nb https://aur.archlinux.org/packages/open … d-resolved "needs polkit") and you "fixed" that by not using resolved (despite still running it… except if you've wedged resolved specific config despite not using it itfp)

Also don't necrobump.
Open a new thread and post your configuration and resolvectl status etc. there.

Online

#25 2024-05-28 10:18:25

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,085

Re: [Solved] Network Manager DNS not working

https://wiki.archlinux.org/title/Genera … bumping%22

bgmeulem, please start  a new thread as seth suggested.

Mod note : closing.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB