[Bug 1938810] Re: Reverse lookup of 127.0.0.1 does not work

Nick Anderson 1938810 at bugs.launchpad.net
Fri Jun 23 16:33:15 UTC 2023


Indeed, I do not see this behavior any longer.

```
$ dig -x 127.0.0.1

; <<>> DiG 9.18.12-0ubuntu0.22.04.2-Ubuntu <<>> -x 127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12678
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1.0.0.127.in-addr.arpa.                IN      PTR

;; ANSWER SECTION:
1.0.0.127.in-addr.arpa. 0       IN      PTR     localhost.
1.0.0.127.in-addr.arpa. 0       IN      PTR     kubernetes.docker.internal.

;; Query time: 3 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Fri Jun 23 11:29:26 CDT 2023
;; MSG SIZE  rcvd: 114

$ lsb_release -rd
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
```

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1938810

Title:
  Reverse lookup of 127.0.0.1 does not work

Status in systemd package in Ubuntu:
  Fix Released

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.127.in-addr.arpa.                IN      PTR

  ;; Query time: 0 msec
  ;; SERVER: 127.0.0.53#53(127.0.0.53)
  ;; 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.127.in-addr.arpa.                IN      PTR

  ;; ANSWER SECTION:
  1.0.0.127.in-addr.arpa. 10800   IN      PTR     localhost.

  ;; Query time: 3 msec
  ;; SERVER: 127.0.0.1#53(127.0.0.1)
  ;; 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.4-4ubuntu3.11 500
          500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
   *** 245.4-4ubuntu3.7 100
          100 /var/lib/dpkg/status
       245.4-4ubuntu3 500
          500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
       237-3ubuntu10.50 500
          500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages

  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1938810/+subscriptions




More information about the foundations-bugs mailing list