Reverse lookup of 127.0.0.1 does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I expected a reverse lookup of 127.0.0.1 to return localhost, instead it returned nothing.
```
root:~# dig -x 127.0.0.1
; <<>> DiG 9.16.1-Ubuntu <<>> -x 127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60017
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1.0.0.
;; Query time: 0 msec
;; SERVER: 127.0.0.
;; WHEN: Tue Aug 03 09:25:20 CDT 2021
;; MSG SIZE rcvd: 51
```
If I explicitly lookup using 127.0.0.1 instead of the default 127.0.0.53, I do get a record as expected.
```
root:~# dig -x 127.0.0.1 @127.0.0.1
; <<>> DiG 9.16.1-Ubuntu <<>> -x 127.0.0.1 @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51602
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;1.0.0.
;; ANSWER SECTION:
1.0.0.127.
;; Query time: 3 msec
;; SERVER: 127.0.0.
;; WHEN: Tue Aug 03 09:25:15 CDT 2021
;; MSG SIZE rcvd: 74
```
I have an entry in /etc/hosts.
```
root:~# grep 127.0.0.1 /etc/hosts
127.0.0.1 localhost
```
Looks like unbound which seems to work as expected is running on 127.0.0.1:53, and systemd-resolv which is not working is on 127.0.0.53:53.
```
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1839/unbound
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 1511/systemd-resolv
```
I am running 20.04.2:
```
root:~# lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04
```
With systemd version 245.4-4ubuntu3.7
```
root@:~# apt-cache policy systemd
systemd:
Installed: 245.4-4ubuntu3.7
Candidate: 245.4-4ubuntu3.11
Version table:
245.
500 http://
500 http://
*** 245.4-4ubuntu3.7 100
100 /var/lib/
245.4-4ubuntu3 500
500 http://
237-
500 http://
```
This appears to be fixed in newer releases.