You are not logged in.
Pages: 1
Hi,
I had previously set up DNS according to the Network Manager and it had been working fine, but recently I met issues with DNS. After some troubleshooting, I found that it appears to be a problem with dnsmasq.
Here is the previous /etc/resolv.conf
# Generated by NetworkManager
nameserver 127.0.0.1
options edns0 trust-adit can't work now. It can ping IP address successfully, but cannot domain.
I have edited it as follows:
# Generated by NetworkManager
nameserver 1.1.1.1
options edns0 trust-adEverything is ok. This seems like just a temporary workaround. What went wrong? How should I thoroughly fix it?
Thanks!
Last edited by koko271 (2023-03-15 13:28:32)
Offline
I found that it appears to be a problem with dnsmasq.
Based on what?
ss -tulpen
resolvectl status
ps aux | grep -E '(resolv|dns)'Offline
I found that it appears to be a problem with dnsmasq.
Based on what?
ss -tulpen resolvectl status ps aux | grep -E '(resolv|dns)'
Because it seems that dnsmasq did not automatically start as described in the wiki.
This is dig output when setting 127.0.0.1:
> dig
;; communications error to 127.0.0.1#53: timed out
;; communications error to 127.0.0.1#53: timed out
;; communications error to 127.0.0.1#53: timed out
; <<>> DiG 9.18.12 <<>>
;; global options: +cmd
;; no servers could be reachedHere is required output when setting 127.0.0.1:https://0x0.st/H-KE.txt
Last edited by koko271 (2023-03-15 07:57:43)
Offline
resolved isn't running, dnsmasq is (apparently started by NM) and something (likely dnsmasq) started by NM is listening on 127.0.0.1:53
Seeing kate, did you add any https://wiki.archlinux.org/title/Networ … figuration or attemt https://wiki.archlinux.org/title/NetworkManager#DNSSEC
Did you https://wiki.archlinux.org/title/Networ … NS_servers ?
(See the blue note!)
Offline
resolved isn't running, dnsmasq is (apparently started by NM) and something (likely dnsmasq) started by NM is listening on 127.0.0.1:53
Seeing kate, did you add any https://wiki.archlinux.org/title/Networ … figuration or attemt https://wiki.archlinux.org/title/NetworkManager#DNSSEC
Did you https://wiki.archlinux.org/title/Networ … NS_servers ?
(See the blue note!)
Sorry, I've corrected it. Yes, I change the cache size, like the example on wiki.
Last edited by koko271 (2023-03-15 08:03:50)
Offline
The cache size won't be the issue here, it's more like dnsmasq will probably not ask on to a proper DNS server.
head -c -0 /etc/NetworkManager/dnsmasq.d/*Offline
The cache size won't be the issue here, it's more like dnsmasq will probably not ask on to a proper DNS server.
head -c -0 /etc/NetworkManager/dnsmasq.d/*
The output is
cache-size = 1000Offline
NM somehow needs to communicate a DNS server for dnsmasq to ask back on, I'd expect that to happen through a config file in /etc/NetworkManager/dnsmasq.d/ and be fed by NMs own DNS configuration.
Since there's no backing DNS server configured for dnsmasq, ite cannot resolve any domains.
=> Please elaborate on your NM DNS configuration, esp. wrt https://wiki.archlinux.org/title/Networ … NS_servers
Offline
NM somehow needs to communicate a DNS server for dnsmasq to ask back on, I'd expect that to happen through a config file in /etc/NetworkManager/dnsmasq.d/ and be fed by NMs own DNS configuration.
Since there's no backing DNS server configured for dnsmasq, ite cannot resolve any domains.=> Please elaborate on your NM DNS configuration, esp. wrt https://wiki.archlinux.org/title/Networ … NS_servers
I didn't customize anything, just like wiki. There is no dns-servers.conf.
/etc/NetworkManager/conf.d/dns.conf
[main]
dns=dnsmasqOffline
Assuming you simply don't get a DNS via dhcp, add "servers=1.1.1.1,8.8.8.8" w/ https://wiki.archlinux.org/title/Networ … NS_servers
Offline
Assuming you simply don't get a DNS via dhcp, add "servers=1.1.1.1,8.8.8.8" w/ https://wiki.archlinux.org/title/Networ … NS_servers
Everything is ok now. Thanks!
Last edited by koko271 (2023-03-15 13:23:55)
Offline
What's the resulting /etc/resolv.conf written by NM?
Does NM still start dnsmasq?
Edit: in doubt juse configure dnsmasq yourself, https://wiki.archlinux.org/title/Dnsmas … forwarding
Obviously use /etc/NetworkManager/dnsmasq.d/dnsmasq.conf
Edit #2: so what was the failing drill test about?
Last edited by seth (2023-03-15 13:24:52)
Offline
NM somehow needs to communicate a DNS server for dnsmasq to ask back on, I'd expect that to happen through a config file in /etc/NetworkManager/dnsmasq.d/ and be fed by NMs own DNS configuration.
NetworkManager and dnsmasq communicate via dbus. Here's the default command line, dnsmasq is started with:
/usr/bin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.0.1 --cache-size=400 --clear-on-reload --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.dOffline
What's the resulting /etc/resolv.conf written by NM?
Does NM still start dnsmasq?Edit: in doubt juse configure dnsmasq yourself, https://wiki.archlinux.org/title/Dnsmas … forwarding
Obviously use /etc/NetworkManager/dnsmasq.d/dnsmasq.conf
I forget to change resolv.conf back to 127.0.0.1, everything is working fine now. Thanks
Offline
Pages: 1