Domain-Name-System

綁定 DNS 問題

  • February 2, 2015

我已經為我的網站 winpack.cf 設置了綁定 DNS 伺服器,但似乎出了點問題:mxtoolbox 顯示“在 2 個名稱伺服器超時或非權威響應後查找失敗”…

我有 Ubuntu 14.04,我認為配置中最奇怪的可能是一個問題(儘管我認為它不應該)是名稱伺服器和主網站的 IP 相同。(意味著我在同一台電腦上配置了 Apache 和 Bind)

我已經配置了適當的膠水記錄,我確定

我在 BIND 上的區域配置文件是:

;
; BIND data file for winpack.cf
;
$TTL    604800
@   IN  SOA winpack.cf. winpackjason.outlook.com. (
            2015020201     ; Serial
              7200     ; Refresh
              7200     ; Retry
           2419200     ; Expire
            900 )      ; Negative Cache TTL
       IN      A       2.84.10.240
;
@   IN  NS  ns.winpack.cf.
ns  IN  A   2.84.10.240
@   IN  A   2.84.10.240
@   IN  MX  10  winpack.cf.
@   IN  TXT "v=spf1 mx a -all"
www IN  CNAME   winpack.cf.

“dig +trace +additional winpack.cf”的輸出:

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> +trace +additional winpack.cf
;; global options: +cmd
.           507723  IN  NS  h.root-servers.net.
.           507723  IN  NS  j.root-servers.net.
.           507723  IN  NS  a.root-servers.net.
.           507723  IN  NS  d.root-servers.net.
.           507723  IN  NS  b.root-servers.net.
.           507723  IN  NS  i.root-servers.net.
.           507723  IN  NS  k.root-servers.net.
.           507723  IN  NS  m.root-servers.net.
.           507723  IN  NS  c.root-servers.net.
.           507723  IN  NS  e.root-servers.net.
.           507723  IN  NS  f.root-servers.net.
.           507723  IN  NS  g.root-servers.net.
.           507723  IN  NS  l.root-servers.net.
.           517962  IN  RRSIG   NS 8 0 518400 20150212170000 20150202160000 16665 . SXORQYP2YP2riKiIF0pe0pokD5MIv8cFrT2plo/SXnRFapBFq7nQmpaf 1wMOO984I/N2Y7eu2J+mix98u0wRhLOWCj2/5ST45426escF9TPdzgtx yooBoF7yerydPKV/ou/oNvJBegIpOiYFpNamHtOV3/96ChZXWjTWRz/X PJU=
a.root-servers.net. 587253  IN  A   198.41.0.4
a.root-servers.net. 604362  IN  AAAA    2001:503:ba3e::2:30
b.root-servers.net. 95501   IN  A   192.228.79.201
b.root-servers.net. 555723  IN  AAAA    2001:500:84::b
c.root-servers.net. 368668  IN  A   192.33.4.12
c.root-servers.net. 604363  IN  AAAA    2001:500:2::c
d.root-servers.net. 80383   IN  A   199.7.91.13
d.root-servers.net. 604363  IN  AAAA    2001:500:2d::d
e.root-servers.net. 80385   IN  A   192.203.230.10
f.root-servers.net. 80387   IN  A   192.5.5.241
f.root-servers.net. 604362  IN  AAAA    2001:500:2f::f
g.root-servers.net. 80384   IN  A   192.112.36.4
h.root-servers.net. 80389   IN  A   128.63.2.53
h.root-servers.net. 604362  IN  AAAA    2001:500:1::803f:235
i.root-servers.net. 135814  IN  A   192.36.148.17
i.root-servers.net. 604362  IN  AAAA    2001:7fe::53
j.root-servers.net. 76216   IN  A   192.58.128.30
j.root-servers.net. 604363  IN  AAAA    2001:503:c27::2:30
k.root-servers.net. 76216   IN  A   193.0.14.129
k.root-servers.net. 604362  IN  AAAA    2001:7fd::1
l.root-servers.net. 76216   IN  A   199.7.83.42
l.root-servers.net. 604363  IN  AAAA    2001:500:3::42
m.root-servers.net. 1655    IN  A   202.12.27.33
m.root-servers.net. 70832   IN  AAAA    2001:dc3::35
;; Received 913 bytes from 127.0.1.1#53(127.0.1.1) in 56 ms

cf.         172800  IN  NS  a.ns.cf.
cf.         172800  IN  NS  b.ns.cf.
cf.         172800  IN  NS  c.ns.cf.
cf.         172800  IN  NS  d.ns.cf.
cf.         86400   IN  NSEC    cg. NS RRSIG NSEC
cf.         86400   IN  RRSIG   NSEC 8 1 86400 20150212170000 20150202160000 16665 . u1+7qdhGOIXsZ/xweAE8o1y1/H0JHCeGj+U74Hxzmft8z7fSOmdB2YO8 czo2g4al/sjmit+ViNnChzZ8nDRXSuFfXfytINyO79WqDz7yb/Q77Fxr XLVXiWOhgI3bnb/zfXlosmKh1zPhKMFa496vGzbaqPuSwj5ML2zMIw93 mTE=
a.ns.cf.        172800  IN  A   185.21.168.17
b.ns.cf.        172800  IN  A   185.21.169.17
c.ns.cf.        172800  IN  A   185.21.170.17
d.ns.cf.        172800  IN  A   185.21.171.17
a.ns.cf.        172800  IN  AAAA    2a04:1b00:4::1
b.ns.cf.        172800  IN  AAAA    2a04:1b00:5::1
c.ns.cf.        172800  IN  AAAA    2a04:1b00:6::1
d.ns.cf.        172800  IN  AAAA    2a04:1b00:7::1
;; Received 465 bytes from 192.203.230.10#53(e.root-servers.net) in 62 ms

winpack.cf.     300 IN  NS  ns.winpack.cf.
winpack.cf.     300 IN  NS  ns2.winpack.cf.
ns.winpack.cf.      7200    IN  A   2.84.10.240
ns2.winpack.cf.     7200    IN  A   2.84.10.239
dig: couldn't get address for 'ns.winpack.cf': no more

(不要考慮名稱伺服器 ns2:它不起作用

2.84.10.240不響應 dns 查詢(錯誤的 ip、主機關閉或被防火牆阻止)

$ dig @2.84.10.240 www.winpack.cf

; <<>> DiG 9.8.3-P1 <<>> @2.84.10.240 www.winpack.cf
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

如果主機已啟動且 IP 地址正確,請確保在 udp 和 tcp 協議上都允許埠 53 上的傳入流量

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