Hi All,
based on the man of unbound.conf , the "Answers for local zones are authoritative DNS answers."
Yet, I got the following:
# dig engine.localdomain
; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.5 <<>> engine.localdomain
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29750
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;engine.localdomain. IN A
;; ANSWER SECTION:
engine.localdomain. 3600 IN A 192.168.1.2
;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sun Jun 13 23:09:02 EEST 2021
;; MSG SIZE rcvd: 63
The machine has static dhcp entry and as per host_entries.conf I got the following:
root@opnsense:/var/unbound # grep -E 'local-zone|engine' host_entries.conf
local-zone: "localdomain" transparent
local-data-ptr: "192.168.1.2 engine.localdomain"
local-data: "engine.localdomain IN A 192.168.1.2"
root@opnsense:/var/unbound #
The whole problem comes from the moment where
dig +noall +answer engine.localdomain ANY
is not returning anything.
How can I make unbound return authoritative answers for "localdomain" zone ?