OpenWrt Dnsmasq randomly resolves DHCP Leases hostnames

I have configured dnsmasq with dns-over-https via cloudflare (Issue happens even if disabled)

dnsmasq config

dhcp.cfg01411c=dnsmasq
dhcp.cfg01411c.domainneeded='1'
dhcp.cfg01411c.localise_queries='1'
dhcp.cfg01411c.rebind_protection='1'
dhcp.cfg01411c.rebind_localhost='1'
dhcp.cfg01411c.local='/lan/'
dhcp.cfg01411c.domain='lan'
dhcp.cfg01411c.expandhosts='1'
dhcp.cfg01411c.authoritative='1'
dhcp.cfg01411c.readethers='1'
dhcp.cfg01411c.leasefile='/tmp/dhcp.leases'
dhcp.cfg01411c.ednspacket_max='1232'
dhcp.cfg01411c.confdir='/tmp/dnsmasq.d'
dhcp.cfg01411c.localservice='1'
dhcp.cfg01411c.sequential_ip='1'
dhcp.cfg01411c.doh_backup_noresolv='-1'
dhcp.cfg01411c.noresolv='1'
dhcp.cfg01411c.doh_backup_server=''
dhcp.cfg01411c.server='/mask.icloud.com/' '/mask-h2.icloud.com/' '/use-application-dns.net/' '127.0.0.1#5333'

from any host if I try dig to resolve local hosts, works 1 of each 2/3 executions

root@OpenWrt:/mnt# dig pasillo-lights

; <<>> DiG 9.18.7 <<>> pasillo-lights
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55545
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: ee3d98fcc774d91901000000635d015e3a783cc6bbc57260 (good)
;; QUESTION SECTION:
;pasillo-lights.                        IN      A

;; AUTHORITY SECTION:
.                       4555    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2022102900 1800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sat Oct 29 10:33:02 UTC 2022
;; MSG SIZE  rcvd: 146

root@OpenWrt:/mnt# dig pasillo-lights

; <<>> DiG 9.18.7 <<>> pasillo-lights
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6085
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;pasillo-lights.                        IN      A

;; ANSWER SECTION:
pasillo-lights.         0       IN      A       13.1.1.132

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sat Oct 29 10:33:02 UTC 2022
;; MSG SIZE  rcvd: 59

Are you using 13.1.1.0 as your local IP range?
That is not a private IP range, those addresses belong to Xerox.

1 Like

you are right! anyway is this causing the issue? I don't think is related with the dns resolving issue

It is probably not related, but I am not sure... so, why not fix it one step at a time?