1

On Ubuntu 16.04 REVERSE lookups to a local DNS/DHCP bind9 server on the local network are SUCCESSFUL, while on the other hand, on Ubuntu 18.04 (and higher) the REVERSE lookups FAIL. All systems are using systemd-resolved, as shown below.

Any thoughts on how to get reverse lookups WORKING on 18.04+ ?

ubuntu@u1604dv1:~$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 27 May  3 19:22 /etc/resolv.conf -> /run/resolvconf/resolv.conf

ubuntu@u1604dv1:~$ cat /etc/resolv.conf
nameserver 127.0.1.1
search attlocal.net urdomain1.com urdomain2.com gns1.urdomain1.com

ubuntu@u1604dv1:~$ cat /etc/systemd/resolved.conf
[Resolve]
DNS=10.209.53.2 172.29.108.2
#FallbackDNS=
Domains=urdomain1.com urdomain2.com gns1.urdomain1.com
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=no
#Cache=yes
#DNSStubListener=udp

ubuntu@u1604dv1:~$ 

ubuntu@u1604dv1:~$ nslookup ora73c10
Server:     127.0.1.1
Address:    127.0.1.1#53

Name:   ora73c10.urdomain1.com
Address: 10.209.53.10

ubuntu@u1604dv1:~$ nslookup 10.209.53.10
Server:     127.0.1.1
Address:    127.0.1.1#53

10.53.209.10.in-addr.arpa   name = ora73c10.urdomain1.com.

ubuntu@u1604dv1:~$ sudo service systemd-resolved status
[sudo] password for ubuntu: 
● systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-resolved.service.d
           └─resolvconf.conf
   Active: active (running) since Sun 2020-05-03 19:22:39 CDT; 1h 14min ago
     Docs: man:systemd-resolved.service(8)
 Main PID: 1873 (systemd-resolve)
   Status: "Processing requests..."
    Tasks: 1
   Memory: 616.0K
      CPU: 20ms
   CGroup: /system.slice/systemd-resolved.service
           └─1873 /lib/systemd/systemd-resolved

May 03 19:22:39 u1604dv1 systemd[1]: Stopped Network Name Resolution.
May 03 19:22:39 u1604dv1 systemd[1]: Starting Network Name Resolution...
May 03 19:22:39 u1604dv1 systemd-resolved[1873]: Positive Trust Anchors:
May 03 19:22:39 u1604dv1 systemd-resolved[1873]: . IN DS    19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
May 03 19:22:39 u1604dv1 systemd-resolved[1873]: Negative trust anchors: 10.in-addr.arpa 16.172.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
May 03 19:22:39 u1604dv1 systemd-resolved[1873]: Using system hostname 'u1604dv1'.
May 03 19:22:39 u1604dv1 systemd[1]: Started Network Name Resolution.
ubuntu@u1604dv1:~$ dig ora73c10.urdomain1.com

; <<>> DiG 9.10.3-P4-Ubuntu <<>> ora73c10.urdomain1.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14001
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ora73c10.urdomain1.com.        IN  A

;; ANSWER SECTION:
ora73c10.urdomain1.com. 3600    IN  A   10.209.53.10

;; AUTHORITY SECTION:
urdomain1.com.      86400   IN  NS  afns1.urdomain1.com.

;; ADDITIONAL SECTION:
afns1.urdomain1.com.    86400   IN  A   10.209.53.2

;; Query time: 7 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Sun May 03 20:37:39 CDT 2020
;; MSG SIZE  rcvd: 103

ubuntu@u1604dv1:~$ 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

On Ubuntu 18.04 using systemd-resolved I get this:

ubuntu@u1804dv1:~$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 37 May  3 20:28 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf

ubuntu@u1804dv1:~$ cat /etc/resolv.conf
nameserver 127.0.0.53
options edns0
search urdomain1.com urdomain2.com gns1.urdomain1.com attlocal.net

ubuntu@u1804dv1:~$ cat /etc/systemd/resolved.conf
[Resolve]
DNS=10.209.53.2 172.29.108.2
#FallbackDNS=
Domains=urdomain1.com urdomain2.com gns1.urdomain1.com
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=no
#Cache=yes
#DNSStubListener=udp

ubuntu@u1804dv1:~$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 37 May  3 20:28 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf

ubuntu@u1804dv1:~$ nslookup 10.209.53.10
** server can't find 10.53.209.10.in-addr.arpa: NXDOMAIN

ubuntu@u1804dv1:~$ sudo service systemd-resolved status
[sudo] password for ubuntu: 
● systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-05-03 20:28:33 CDT; 8min ago
     Docs: man:systemd-resolved.service(8)
           https://www.freedesktop.org/wiki/Software/systemd/resolved
           https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
           https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
 Main PID: 2735 (systemd-resolve)
   Status: "Processing requests..."
    Tasks: 1 (limit: 4664)
   CGroup: /system.slice/systemd-resolved.service
           └─2735 /lib/systemd/systemd-resolved

May 03 20:28:33 u1804dv1 systemd[1]: Stopped Network Name Resolution.
May 03 20:28:33 u1804dv1 systemd[1]: Starting Network Name Resolution...
May 03 20:28:33 u1804dv1 systemd-resolved[2735]: Positive Trust Anchors:
May 03 20:28:33 u1804dv1 systemd-resolved[2735]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
May 03 20:28:33 u1804dv1 systemd-resolved[2735]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
May 03 20:28:33 u1804dv1 systemd-resolved[2735]: Negative trust anchors: 10.in-addr.arpa 16.172.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
May 03 20:28:33 u1804dv1 systemd-resolved[2735]: Using system hostname 'u1804dv1'.
May 03 20:28:33 u1804dv1 systemd[1]: Started Network Name Resolution.
May 03 20:28:54 u1804dv1 systemd-resolved[2735]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
May 03 20:36:04 u1804dv1 systemd-resolved[2735]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
ubuntu@u1804dv1:~$ dig ora73c10.urdomain1.com

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> ora73c10.urdomain1.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19276
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;ora73c10.urdomain1.com.        IN  A

;; ANSWER SECTION:
ora73c10.urdomain1.com. 3054    IN  A   10.209.53.10

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun May 03 20:37:49 CDT 2020
;; MSG SIZE  rcvd: 67

ubuntu@u1804dv1:~$ 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5
  • Please provide the version of systemd in both OS systemctl --version.
    – binarysta
    May 4, 2020 at 2:04
  • Sorry I missed your comment previously. Thanks for the help! The versions are: 16.04 systemd 229 and for 18.04 systemd 237.
    – gstanden
    May 4, 2020 at 4:18
  • If you're still interested in tracking down the issue, please advise if both of your systemd upstream DNS servers (i.e. 10.209.53.2 and 172.29.108.2) know how to perform forwards and reverse lookups for the hostname/address in question. May 6, 2020 at 8:32
  • Thanks, yes if I logon to 10.209.53.2 or 172.29.108.2 the forward and reverse lookups work fine. Also, you can see from my solution below that adding the nameservers to the resolv.conf enables reverse lookups to be successfully completed.
    – gstanden
    May 6, 2020 at 16:26
  • ubuntu@afns1:~$ nslookup 10.209.53.13 Server: 10.209.53.2 Address: 10.209.53.2#53 13.53.209.10.in-addr.arpa name = ora73c10.urdomain1.com. ubuntu@afns1:~$
    – gstanden
    May 6, 2020 at 16:29

1 Answer 1

1

The manual of systemd-resolved.service say:

Address lookups (reverse lookups) are routed similarly to multi-label names, with the exception that addresses from the link-local address range are never routed to unicast DNS and are only resolved using LLMNR and MulticastDNS (when enabled).

So reverse lookup to local (unicast) DNS will only work if both LLMNR and MulticastDNS are disabled:

$ cat /etc/systemd/resolved.conf.d/enable-local-reverse-lookup.conf
[Resolve]
MulticastDNS=no
LLMNR=no
1
  • thank you so much for this answer!! Works perfectly of course!
    – gstanden
    Apr 27, 2022 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .