If I query a name server a record it is authoritative for it seems the answer does not get DNSSEC validated:
$ dig cloudflare.com @ns3.cloudflare.com
; <<>> DiG 9.16.22-Debian <<>> cloudflare.com @ns3.cloudflare.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28361
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;cloudflare.com. IN A
;; ANSWER SECTION:
cloudflare.com. 300 IN A 104.16.133.229
cloudflare.com. 300 IN A 104.16.132.229
;; Query time: 3 msec
;; SERVER: 162.159.0.33#53(162.159.0.33)
;; WHEN: Sat Nov 20 15:29:00 CET 2021
;; MSG SIZE rcvd: 75
There is no "ad" flag returned, hence the answer is not DNSSEC validated. If I ask a non-authoritative server the same query, an "ad" flag is returned:
$ dig cloudflare.com @1.1.1.1
; <<>> DiG 9.16.22-Debian <<>> cloudflare.com @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23361
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;cloudflare.com. IN A
;; ANSWER SECTION:
cloudflare.com. 145 IN A 104.16.132.229
cloudflare.com. 145 IN A 104.16.133.229
;; Query time: 3 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Sat Nov 20 15:35:35 CET 2021
;; MSG SIZE rcvd: 75
Could you please tell me:
- Is this a correct and well defined behavior?
- What is the reason no validation is done?
- Could I change this behavior with
ISC bind9
in the configuration? How?
(If this behavior is intentional one should never configure a name server to use its own name server software to resolve, because for some client software it makes a difference whether an answer gets validated or not: I was wondering why SSHFP
records did not work doing ssh -o VerifyHostKeyDNS <host>
from the name server itself).