Cannot resolve .local domain

I have just upgraded from Fedora 32 to Fedora 34 and am having an issue resolving a domain with a .local suffix:

$ dig mongodb-staging.staging.svc.cluster.local

; <<>> DiG 9.16.18-RH <<>> mongodb-staging.staging.svc.cluster.local
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 24723
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;mongodb-staging.staging.svc.cluster.local. IN A

;; Query time: 1 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Jul 16 15:50:13 BST 2021
;; MSG SIZE  rcvd: 70

But if I specify the dns server, it works:

$ dig @172.20.0.10 mongodb-staging.staging.svc.cluster.local

; <<>> DiG 9.16.18-RH <<>> @172.20.0.10 mongodb-staging.staging.svc.cluster.local
; (1 server found)
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43408
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 0f522d0868549f8f (echoed)
;; QUESTION SECTION:
;mongodb-staging.staging.svc.cluster.local. IN A

;; ANSWER SECTION:
mongodb-staging.staging.svc.cluster.local. 5 IN	A 172.20.17.157

;; Query time: 22 msec
;; SERVER: 172.20.0.10#53(172.20.0.10)
;; WHEN: Fri Jul 16 15:49:21 BST 2021
;; MSG SIZE  rcvd: 139

Any help with this is appreciated.

2 Likes

There was a fundamental change between how dns is resolved between fedora 32 & 34.

What you are seeing is related to that since f34 now looks at the local cache/server before it tries to do a resolve from an internet dns server. I am not a dns guru but some searches on this forum can guide you to a resolution, or others with more experience may answer.

If you look closely at /etc/resolv.conf you will find it is now a symlink (on a new install) and thus does not directly give the nameserver you would expect. I do not have that symlink on my primary host since I upgraded from f33 and it did not replace my already existing /etc/resolv.conf file.

On my newly installed F34 VM I find that /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf and that does not have the same content as the host which was upgraded from F33 since I still have the original /etc/resolv.conf there.

2 Likes

The .local domain is reserved for mDNS:
https://en.wikipedia.org/wiki/Multicast_DNS

If you intend to use mDNS, follow this instruction:
https://discussion.fedoraproject.org/t/avahi-cant-accessible-from-my-mobile-phone/75518/2?u=vgaetera

Otherwise change the domain to something else, like .lan, .corp, .home, etc.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.