Score:0

ubuntu 20.04 systemd-resolved cannot resolve .local zone

us flag

On a Ubuntu 20.04 AWS EC2 instance, an application need to resolve .local zone. It is a private zone, created in Route53, accessible only from the VPC. From a CentOS 7 instance (without systemd-resolved) it is resolved without problems. The problem is on the Ubuntu instance (with systemd-resolved installed by default):

$ nslookup kafka.local
Server:         127.0.0.53
Address:        127.0.0.53#53

** server can't find kafka.local: SERVFAIL

$ dig kafka.local

; <<>> DiG 9.16.1-Ubuntu <<>> kafka.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: 23891
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;kafka.local.                   IN      A

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Jun 15 08:50:54 UTC 2021
;; MSG SIZE  rcvd: 40

$ dig kafka.local @10.0.0.2

; <<>> DiG 9.16.1-Ubuntu <<>> kafka.local @10.0.0.2
;; 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: 4188
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;kafka.local.                   IN      A

;; ANSWER SECTION:
kafka.local.            60      IN      A       10.0.0.57

;; Query time: 4 msec
;; SERVER: 10.0.0.2#53(10.0.0.2)
;; WHEN: Tue Jun 15 08:52:28 UTC 2021
;; MSG SIZE  rcvd: 56

$ cat /etc/resolv.conf

nameserver 127.0.0.53
options edns0 trust-ad
search ec2.internal

$ systemd-resolve --status
Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 2 (ens5)
      Current Scopes: DNS
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: 10.0.0.2
         DNS Servers: 10.0.0.2
          DNS Domain: ec2.internal

Is there any possible configuration to make systemd-resolved to resolve this .local zone correctly?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.