Domain-Name-System

如何在沒有 NS 記錄的域中包含 DNS A 記錄?

  • August 21, 2019

今天我看到一個包含 DNS A記錄但沒有 DNS NS記錄的域。如何在沒有NS名稱伺服器的情況下創建****A記錄?

範例域是:frankstudios.com

探勘 A 記錄

root@ubuntu:~# dig @8.8.8.8 -t A frankstudios.com

; <<>> DiG 9.11.3-1ubuntu1.8-Ubuntu <<>> @8.8.8.8 -t A frankstudios.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28479
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;frankstudios.com.              IN      A

;; ANSWER SECTION:
frankstudios.com.       299     IN      A       207.148.248.143

;; Query time: 98 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Aug 21 11:16:02 UTC 2019
;; MSG SIZE  rcvd: 61

探勘 NS 記錄

root@ubuntu:~# dig @8.8.8.8 -t NS frankstudios.com

; <<>> DiG 9.11.3-1ubuntu1.8-Ubuntu <<>> @8.8.8.8 -t NS frankstudios.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14126
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;frankstudios.com.              IN      NS

;; AUTHORITY SECTION:
frankstudios.com.       299     IN      SOA     ns.buydomains.com. hostmaster.buydomains.com. 2015031114 86400 7200 604800 300

;; Query time: 91 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Aug 21 11:17:00 UTC 2019
;; MSG SIZE  rcvd: 106

儘管 DNS 區域應該包括 NS 記錄(因為只有區域內數據是權威的,並且它是 RFC 1034

$$ 1035 $$$$ 2 $$) 域的名稱伺服器是通過遵循註冊商在頂級域中設置的粘合記錄來發現的。 因此,在實踐中,域和所有其他記錄將在區域本身沒有 NS 記錄的情況下正常工作。

您可以在 whois 記錄和+tracedig 選項中輕鬆看到這一點

dig +trace frankstudios.com.@8.8.4.4 :
.           68508   IN  NS  m.root-servers.net.
.           68508   IN  NS  b.root-servers.net.
.           68508   IN  NS  e.root-servers.net.
.           68508   IN  NS  i.root-servers.net.
.           68508   IN  NS  d.root-servers.net.
.           68508   IN  NS  a.root-servers.net.
.           68508   IN  NS  f.root-servers.net.
.           68508   IN  NS  k.root-servers.net.
.           68508   IN  NS  j.root-servers.net.
.           68508   IN  NS  h.root-servers.net.
.           68508   IN  NS  l.root-servers.net.
.           68508   IN  NS  c.root-servers.net.
.           68508   IN  NS  g.root-servers.net.
;; Received 228 bytes from 8.8.4.4#53(8.8.4.4) in 5 ms

com.            172800  IN  NS  a.gtld-servers.net.
com.            172800  IN  NS  e.gtld-servers.net.
com.            172800  IN  NS  f.gtld-servers.net.
com.            172800  IN  NS  k.gtld-servers.net.
com.            172800  IN  NS  c.gtld-servers.net.
com.            172800  IN  NS  i.gtld-servers.net.
com.            172800  IN  NS  j.gtld-servers.net.
com.            172800  IN  NS  h.gtld-servers.net.
com.            172800  IN  NS  l.gtld-servers.net.
com.            172800  IN  NS  b.gtld-servers.net.
com.            172800  IN  NS  d.gtld-servers.net.
com.            172800  IN  NS  g.gtld-servers.net.
com.            172800  IN  NS  m.gtld-servers.net.
;; Received 494 bytes from 199.9.14.201#53(199.9.14.201) in 75 ms

frankstudios.com.   172800  IN  NS  ns.buydomains.com.               <===== GLUE
frankstudios.com.   172800  IN  NS  this-domain-for-sale.com.        <===== GLUE
;; Received 129 bytes from 192.5.6.30#53(192.5.6.30) in 1829 ms

frankstudios.com.   300 IN  A   207.148.248.143
;; Received 50 bytes from 52.20.26.87#53(52.20.26.87) in 22 ms

$$ 2 $$: https://www.rfc-editor.org/rfc/rfc1035)

引用自:https://serverfault.com/questions/980132