I have a computer and a laptop, both have 127.0.0.53 running as their DNS servers. One computer runs fine with the current DNS server, but the laptop gets a "Temporary failure in domain name resolution" error message. When I change the DNS server in /etc/resolv.conf to 8.8.8.8 it starts working again.
Why does the DNS server not work on one computer only?
Edit: I have confirmed that libnss_dns.so.2 is installed (I am using ubuntu).
I have followed this guide https://manpages.debian.org/bullseye/libnss-resolve/libnss_resolve.so.2.8.en.html and modified my nsswitch.conf from (without the comments)
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
I have changed changed the hosts line to
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
hosts: mymachines resolve [!UNAVAIL=return] files
myhostname dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
but I get the error when I ping google.com ping: google.com: Name or service not known
Edit2: I ran resolvectl on the laptop and got
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (wlo1)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (ipv6leakintrf0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: ::1
DNS Servers: ::1
DNS Domain: ~.
Edit3: it's working fine automagically after some updates.