I've something strange with DNS servers : I can't resolve url.
The /etc/resolv.conf file seems to be managed by NetworkManager and points to 127.0.0.53 (looks good so far):
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
When I list the DNS server of the current connection with nmcli device connection wlp3s0 | grep DNS it shows me IP that contains DNS server that works, i.e. when I do dig google.com @IPNMCLI, I have a valid output (good so far):
$ nmcli device show wlp2s0 | grep IP4.DNS
IP4.DNS[1]: 132.XX.XX.XX
IP4.DNS[2]: 132.YY.YY.YY
$ dig google.com @132.YY.YY.YY
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> google.com @132.YY.YY.YY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37232
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 9
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 101 IN A 172.217.18.206
;; AUTHORITY SECTION:
google.com. 19122 IN NS ns2.google.com.
[...]
;; Query time: 3 msec
;; SERVER: 132.YY.YY.YY#53(132.YY.YY.YY)
;; WHEN: Tue Jan 28 14:49:39 CET 2020
;; MSG SIZE rcvd: 303
BUT, when I try to run dig google.com @127.0.0.53, a request is sent, but the answer has an error SERVFAIL:
dig google.com @127.0.0.53
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> google.com @127.0.0.53
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 59952
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com. IN A
;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Jan 28 14:26:37 CET 2020
;; MSG SIZE rcvd: 39
Any idea what's wrong, and why NetworkManager's local DNS server is not working?
Thanks.