#1137014 netcfg: Wrong hostname and domain detection (very wrong)

#1137014#5
Date:
2026-05-18 16:00:05 UTC
From:
To:
Dear Maintainer,

First, this is not new, the issue must have appeared 1 or 2 years ago. I
never took the time to investigate it until now. Also, for context, I
run the debian installer very often, in a QEMU local VM, for test
purposes. So this issue has been bugging me for 1 or 2 years.

The issue, summarized in this log extract:

```
Using DNS to try and obtain default hostname
Getting default hostname from rDNS lookup of autoconfigured address 10.0.2.15
Hostname found: 10.0.2.15
10.0.2.15 is a valid FQDN
We have a real FQDN
Preseeding domain as well: 0.2.15
```

How it translates in the Debian Installer interface now: D-I gives me a
default hostname "10", and then a default Domain name "0.2.15".

I'm surprised nobody opened this bug report before me, am I alone with
this issue?

Thanks,

Arnaud

#1137014#10
Date:
2026-05-18 16:12:28 UTC
From:
To:
 >

[snip]

 >

Never saw that issue in the last two years.

Note that I use Libvirt, which internally uses Qemu.

What Qemu command do you use to start the guest?

#1137014#15
Date:
2026-05-18 16:21:15 UTC
From:
To:

My Qemu command:

kvm

#1137014#20
Date:
2026-05-18 16:33:46 UTC
From:
To:
[1] https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
#1137014#25
Date:
2026-05-19 16:20:43 UTC
From:
To:
What does the configured DNS-server reply for a PTR query for
15.2.0.10.in-addr.arpa? Does it say NXDOMAIN? Does it maybe deliver
"10.0.2.15"?

Greetings
Marc

#1137014#30
Date:
2026-05-23 07:18:12 UTC
From:
To:
Yes, same issue (I use the testing image).

I'm not sure about the command I should run, I'm not good at DNS.

So, here is some output of commands that I run from within my
just-installed Debian testing VM

```

root@debianvm:~# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state
UP group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
    altname enp0s4
    altname enx525400123456
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute ens4
       valid_lft 85967sec preferred_lft 85967sec
    inet6 fec0::5054:ff:fe12:3456/64 scope site dynamic mngtmpaddr
noprefixroute 
       valid_lft 86156sec preferred_lft 14156sec
    inet6 fec0::7b49:c113:709b:6924/64 scope site temporary dynamic 
       valid_lft 86156sec preferred_lft 14156sec
    inet6 fe80::5054:ff:fe12:3456/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


root@debianvm:~# dig -x 10.0.2.15

; <<>> DiG 9.20.22-1-Debian <<>> -x 10.0.2.15
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33548
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
15.2.0.10.in-addr.arpa.    0    IN    PTR    10.0.2.15.

;; Query time: 4 msec
;; SERVER: 10.0.2.3#53(10.0.2.3) (UDP)
;; WHEN: Sat May 23 03:13:21 EDT 2026
;; MSG SIZE  rcvd: 74


root@debianvm:~# dig -x 15.2.0.10.in-addr.arpa

; <<>> DiG 9.20.22-1-Debian <<>> -x 15.2.0.10.in-addr.arpa
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 26098
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

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

;; Query time: 1036 msec
;; SERVER: 10.0.2.3#53(10.0.2.3) (UDP)
;; WHEN: Sat May 23 03:14:48 EDT 2026
;; MSG SIZE  rcvd: 64


root@debianvm:~# dig 15.2.0.10.in-addr.arpa

; <<>> DiG 9.20.22-1-Debian <<>> 15.2.0.10.in-addr.arpa
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 8092
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

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

;; AUTHORITY SECTION:
10.in-addr.arpa.    7137    IN    SOA    localhost. nobody.invalid. 1
3600 1200 604800 10800

;; Query time: 4 msec
;; SERVER: 10.0.2.3#53(10.0.2.3) (UDP)
;; WHEN: Sat May 23 03:15:21 EDT 2026
;; MSG SIZE  rcvd: 110


root@debianvm:~# nslookup 15.2.0.10.in-addr.arpa
Server:        10.0.2.3
Address:    10.0.2.3#53

** server can't find 15.2.0.10.in-addr.arpa: NXDOMAIN

```

Is there anything useful here? Please tell me if I should run other
commands. Thanks!

Arnaud

#1137014#35
Date:
2026-05-23 07:59:51 UTC
From:
To:
(...)
As Marc suspected, "10.0.2.15" is the reverse DNS name returned by your
DNS server for IP address 10.0.2.15. So netcfg is correct, but the
reverse DNS configured in your DNS server is wrong. At best, netcfg may
discard the invalid reverse DNS.