Unbound DNS doesn't resolve names for un-named hosts

Started by talmage, August 15, 2024, 07:29:55 PM

Previous topic - Next topic
Please help me fix this problem: Unbound DNS won't resolve a name when the DNS query comes from a host without a name.

Unbound DNS works just fine when a DNS query comes from a host with a name.

All hosts on my network get an IP address from ISC DHCPv4, which is configured to not deny unknown hosts. ISC DHCPv4 gives each known host the same name each time they ask for a lease.  It recognizes a host by its MAC address.

Here's an example of dig's output on a host with no name:


talmage@otis:~$ !dig
dig www.onespeeddave.com
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> www.onespeeddave.com
;; global options: +cmd
;; no servers could be reached


Here's an example of dig's output for the same query on a host with a name:


talmage@minerva:~$ dig www.onespeeddave.com

; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> www.onespeeddave.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47178
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
www.onespeeddave.com.   2002    IN      A       192.168.1.99

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Aug 15 13:21:35 EDT 2024
;; MSG SIZE  rcvd: 65


Here is an example of the logging output of ISC DHCPv4 when a host without a name makes a DNS query:


2024-08-15T13:27:05-04:00 Notice unbound [34306:0] notice: remote address is ip4 192.168.1.205 port 56220 (len 16)
2024-08-15T13:27:05-04:00 Notice unbound [34306:0] notice: sendmsg failed: Invalid argument
2024-08-15T13:27:05-04:00 Notice unbound [34306:3] notice: remote address is ip4 192.168.1.205 port 53927 (len 16)
2024-08-15T13:27:05-04:00 Informational unbound [34306:0] info: send_udp over interface: 192.168.1.1
2024-08-15T13:27:05-04:00 Notice unbound [34306:3] notice: sendmsg failed: Invalid argument
2024-08-15T13:27:05-04:00 Informational unbound [34306:0] info: 192.168.1.205 www.onespeeddave.com. AAAA IN NOERROR 0.000000 1 38



I'm running OPNsense 24.1.5_3-amd64.

Could you try a "dig @192.168.1.1 www.onespeeddave.com" on both hosts?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

The output is nearly the same as above.  The only difference is that each host reports that it found one server.

From the host without a name:


talmage@otis:~$ dig @192.168.1.1 www.onespeeddave.com
;; communications error to 192.168.1.1#53: timed out
;; communications error to 192.168.1.1#53: timed out
;; communications error to 192.168.1.1#53: timed out

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> @192.168.1.1 www.onespeeddave.com
; (1 server found)
;; global options: +cmd
;; no servers could be reached


From the host with a name:


talmage@minerva:~$ dig @192.168.1.1 www.onespeeddave.com

; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> @192.168.1.1 www.onespeeddave.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15615
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;www.onespeeddave.com.          IN      A

;; ANSWER SECTION:
www.onespeeddave.com.   3600    IN      A       192.168.1.99

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Thu Aug 15 15:53:38 EDT 2024
;; MSG SIZE  rcvd: 65

On a whim, I booted the live version of OPNsense 24.7.  Its DNS served both my named hosts and my unnamed hosts.

After fiddling with my 24.1 installation's firewall rules and Unbound DNS configuration for most of a day, I gave up, upgraded to 24.7, and set up DHCP for my various hosts again.