请求没有到达我自己的域名服务器

我想处理我自己的域的DNS请求。
例如我有域名dnsrequest.me和名称服务器指向我的服务器178.62.242.84 (whois证实这一点)。

所以当有人第一次请求DNS请求dnsrequest.me时,dns请求应该到达178.62.242.84对吗? 但事实并非如此。

我的服务器正在侦听端口port 53上的DNS请求,当我直接向服务器发送请求时,它确实工作。 以下请求到达我的服务器。

 dig @178.62.242.84 -t ANY dnsrequest.me 

当我执行nslookup时,没有任何东西到达我的服务器

 bash-4.3$ nslookup dnsrequest.me ;; Got SERVFAIL reply from 8.8.8.8, trying next server Server: 8.8.8.8 Address: 8.8.8.8#53 ** server can't find dnsrequest.me: NXDOMAIN 

看来你的DNS胶水有错误。 当我在.me authorative DNS服务器上查询dnsrequest.me时,它们会返回一个IP而不是名称:

 mtak@frisbee:~$ dig -t ns dnsrequest.me @89.188.44.44 ; <<>> DiG 9.9.5-3-Ubuntu <<>> -t ns dnsrequest.me @89.188.44.44 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50716 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;dnsrequest.me. IN NS ;; AUTHORITY SECTION: dnsrequest.me. 86400 IN NS 178.62.242.84. <<IP address not allowed here dnsrequest.me. 86400 IN NS 178.62.242.83. <<IP address not allowed here ;; Query time: 3 msec ;; SERVER: 89.188.44.44#53(89.188.44.44) ;; WHEN: Mon Oct 13 16:53:30 CEST 2014 ;; MSG SIZE rcvd: 96 

但是,根据RFC 1035 ,NS查询的结果应该是主机名/ fqdn(所以是Alogging)。 这条logging可以指向一个特定的IP地址,如下所示:

 mtak@frisbee:~$ dig -t ns mtak.nl @194.146.106.42 ; <<>> DiG 9.9.5-3-Ubuntu <<>> -t ns mtak.nl @194.146.106.42 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24256 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;mtak.nl. IN NS ;; AUTHORITY SECTION: mtak.nl. 7200 IN NS ns0.transip.net. < NS records (to hostnames) mtak.nl. 7200 IN NS ns1.transip.nl. < NS records (to hostnames) mtak.nl. 7200 IN NS ns2.transip.eu. < NS records (to hostnames) ;; ADDITIONAL SECTION: ns1.transip.nl. 7200 IN A 80.69.69.69 < A records (to IP address) ns1.transip.nl. 7200 IN AAAA 2a01:7c8:b::53 ;; Query time: 22 msec ;; SERVER: 194.146.106.42#53(194.146.106.42) ;; WHEN: Mon Oct 13 16:55:17 CEST 2014 ;; MSG SIZE rcvd: 163 

最好联系您的注册商,让他们为您更新logging。 configuration应该是这样的:

 dnsrequest.me. IN NS ns1.dnsrequest.me. dnsrequest.me. IN NS ns2.dnsrequest.me. ns1.dnsrequest.me. IN A 178.62.242.83 ns2.dnsrequest.me. IN A 178.62.242.84