Google DNSサーバーが自分で信頼できる回答を返さない理由[閉じる]

Google DNSサーバーが自分で信頼できる回答を返さない理由[閉じる]

Google DNSサーバーが自分のドメインに信頼できる回答を返さないのはなぜですか?

Redhat Linux 5.1でnslookupBind digDNS v4.9.7を使用しています。

テスト

/etc/resolv.conf:

nameserver 0
search home

/etc/named.boot:

...
options         forward-only query-log
forwarders      192.168.1.1 203.12.160.35 203.12.160.36 203.12.160.37
...

「dns.google.com」のIPアドレスを照会します(私のDNSサーバーを使用)。

[root@r51 ~]$ date && nslookup dns.google.com
Sat Jan 13 22:34:31 EST 2024
Server:  r51
Address:  0.0.0.0

Non-authoritative answer:
Name:    dns.google.com
Addresses:  8.8.4.4, 8.8.8.8

[root@r51 ~]$
[root@r51 ~]$ date && dig dns.google.com
Sat Jan 13 22:36:15 EST 2024

; <<>> DiG 2.2 <<>> dns.google.com
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr rd ra; Ques: 1, Ans: 2, Auth: 0, Addit: 0
;; QUESTIONS:
;;      dns.google.com, type = A, class = IN

;; ANSWERS:
dns.google.com. 210     A       8.8.8.8
dns.google.com. 210     A       8.8.4.4

;; Total query time: 15 msec
;; FROM: r51 to SERVER: default -- 0.0.0.0
;; WHEN: Sat Jan 13 22:36:15 2024
;; MSG SIZE  sent: 32  rcvd: 64

[root@r51 ~]$

「dns.google.com」のIPアドレスを照会します(「dns.google.com」を使用)。

[root@r51 ~]$ date && nslookup dns.google.com 8.8.8.8
Sat Jan 13 22:36:20 EST 2024
Server:  dns.google
Address:  8.8.8.8

Non-authoritative answer:
Name:    dns.google.com
Addresses:  8.8.4.4, 8.8.8.8

[root@r51 ~]$
[root@r51 ~]$ date && dig @8.8.8.8 dns.google.com
Sat Jan 13 22:36:42 EST 2024

; <<>> DiG 2.2 <<>> @8.8.8.8 dns.google.com
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
;; flags: qr rd ra; Ques: 1, Ans: 2, Auth: 0, Addit: 0
;; QUESTIONS:
;;      dns.google.com, type = A, class = IN

;; ANSWERS:
dns.google.com. 900     A       8.8.8.8
dns.google.com. 900     A       8.8.4.4

;; Total query time: 12 msec
;; FROM: r51 to SERVER: 8.8.8.8
;; WHEN: Sat Jan 13 22:36:42 2024
;; MSG SIZE  sent: 32  rcvd: 64

[root@r51 ttya3 22:36:42 /]$

結果

予想される内容(例:8.8.8.8に対するクエリ):

Auth: 1

実際:

Non-authoritative answer

Auth: 0

ベストアンサー1

@muruのコメントのおかげでうまくいかないのは、8.8.8.8と8.8.4.4(dns.google.com)が信頼できるネームサーバーではないからです。

ドメインの特権ネームサーバーは、ドメインのSOAレコードを照会し、その後のDNSクエリで元のネームサーバー(レコードに割り当てられている)を参照サーバーとして使用することによって取得できます。

nslookup -type=soa dns.google.com

dig soa dns.google.com

SOAクエリ出力の例:

[root@r51 ~]$ nslookup -type=soa dns.google.com
Server:  r51
Address:  0.0.0.0

Authoritative answers can be found from:
google.com
        origin = ns1.google.com
        mail addr = dns-admin.google.com
        serial = 598133582
        refresh = 900 (15 mins)
        retry   = 900 (15 mins)
        expire  = 1800 (30 mins)
        minimum ttl = 60 (1 min)
[root@r51 ~]$
[root@r51 ~]$ dig soa dns.google.com

; <<>> DiG 2.2 <<>> soa dns.google.com
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr rd ra; Ques: 1, Ans: 0, Auth: 1, Addit: 0
;; QUESTIONS:
;;      dns.google.com, type = SOA, class = IN

;; AUTHORITY RECORDS:
google.com.     60      SOA     ns1.google.com. dns-admin.google.com. (
                        597792727       ; serial
                        900     ; refresh (15 mins)
                        900     ; retry (15 mins)
                        1800    ; expire (30 mins)
                        60 )    ; minimum (1 min)

;; Total query time: 108 msec
;; FROM: r51 to SERVER: default -- 0.0.0.0
;; WHEN: Sun Dec 31 10:08:09 2023
;; MSG SIZE  sent: 32  rcvd: 82

[root@r51 ~]$

上記のSOAクエリは、特権サーバーが「ns1.google.com」にあることを示しています。

「dns.google.com」のIPアドレスを照会します(特権ネームサーバーを使用)。

[root@r51 ~]$ nslookup dns.google.com ns1.google.com
Server:  ns1.google.com
Address:  216.239.32.10

Name:    dns.google.com
Addresses:  8.8.4.4, 8.8.8.8

[root@r51 ~]$
[root@r51 ~]$ dig @ns1.google.com dns.google.com

; <<>> DiG 2.2 <<>> @ns1.google.com dns.google.com
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
;; flags: qr aa rd; Ques: 1, Ans: 2, Auth: 0, Addit: 0
;; QUESTIONS:
;;      dns.google.com, type = A, class = IN

;; ANSWERS:
dns.google.com. 900     A       8.8.4.4
dns.google.com. 900     A       8.8.8.8

;; Total query time: 113 msec
;; FROM: r51 to SERVER: ns1.google.com  216.239.32.10
;; WHEN: Sat Jan 13 23:54:03 2024
;; MSG SIZE  sent: 32  rcvd: 64

[root@r51 ~]$

上記のように応答にnslookup表示されなくなります。Non-authoritative answer

dig出力の場合、Auth値(この場合Auth: 0)は権限を表します。部分情報は印刷されません(名前サーバーが情報を提供しない可能性があります)。ただし、権限フラグ/ビットは実際に設定されます(例aa:)flags: qr aa rd

おすすめ記事