我正在尝试创建一个家庭自动化系统,在我工作的白天观察我的狗。我对这个项目的目标是学习一些关于DNS,文件服务和RaspberryPi的知识。
我的硬件设置如下:
我想使用bubby.com作为域名。当我从我的数字海洋服务器查询时,这个工作。但是,如果我从笔记本电脑上试用,我会收到不同的IP。
来自数字海洋实例的测试:
bubby.com的nslookup
nslookup bubby.com
Server: x.x.x.x
Address: x.x.x.x#53
Name: bubby.com
Address: y.y.y.y
(据我所知,1和2是正确的)
来自macbook的测试
wifi的DNS设置(从网络偏好设备中检索): nameservers x.x.x.x,8.8.8.8
bubby.com的nslookup
nslookup bubby.com
Server: x.x.x.x
Address: x.x.x.x#53
Non-authoritative answer:
Name: bubby.com
Address: 216.21.239.197
有人可以帮我解释为什么我从显示不同地址的同一dns服务器获得不同的结果,即使服务器/地址对于DNS服务器是正确的吗?
更新1:重新测试nslookup
日期&& nslookup bubby.com
Sat Aug 20 05:57:01 PDT 2016
Server: x.x.x.x
Address: x.x.x.x#53
Non-authoritative answer:
Name: bubby.com
Address: 216.21.239.197
从笔记本电脑挖掘bubby.com 日期&&挖掘bubby.com @ 192.241.227.149
Sat Aug 20 06:06:27 PDT 2016
; <<>> DiG 9.8.3-P1 <<>> bubby.com @x.x.x.x
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18813
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;bubby.com. IN A
;; ANSWER SECTION:
bubby.com. 3600 IN A 216.21.239.197
;; Query time: 132 msec
;; SERVER: x.x.x.x#53(x.x.x.x)
;; WHEN: Sat Aug 20 06:06:27 2016
;; MSG SIZE rcvd: 43
使用dns从数字海洋服务器挖掘hubby.com 日期&amp;&amp;挖掘bubby.com @ x.x.x.x
Sat Aug 20 13:12:36 UTC 2016
; <<>> DiG 9.8.1-P1 <<>> bubby.com @x.x.x.x
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38404
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;bubby.com. IN A
;; ANSWER SECTION:
bubby.com. 604800 IN A y.y.y.y
;; AUTHORITY SECTION:
bubby.com. 604800 IN NS ns.bubby.com.
;; ADDITIONAL SECTION:
ns.bubby.com. 604800 IN A y.y.y.y
;; Query time: 2 msec
;; SERVER: x.x.x.x#53(x.x.x.x)
;; WHEN: Sat Aug 20 13:12:36 2016
;; MSG SIZE rcvd: 76
更新2:在指定其他DNS服务器时从笔记本电脑进行DNS查找 日期&amp;&amp; nslookup ip.smartydns.com 87.117.205.40
Sat Aug 20 09:12:09 PDT 2016
Server: 87.117.205.40
Address: 87.117.205.40#53
Non-authoritative answer:
Name: ip.smartydns.com
Address: 82.196.5.38
答案 0 :(得分:0)
查看笔记本电脑的dig
输出,请注意AUTHORITY: 0
。这样做的原因是因为这个答案不是来自你的数字海洋实例(我已经测试了几个不同的位置,我总是得到你从实例本身测试时得到的结果),但是来自其他一些DNS服务器这对bubby.com
不具有权威性。
最终的smartyDNS测试证实了这一点:您和互联网其他人(很可能是您的ISP或受感染的家庭路由器)之间的某人/某事正在充当'Transparent DNS proxy',拦截您的DNS查询和将它们重定向到自己的DNS服务器。
如果您想确定,因为可能只拦截了UDP / TCP端口53,您可以尝试将BIND更改为listen at some other port,然后通过dig
查询从数字Ocean实例和您的笔记本电脑进行测试那个新港口:
dig bubby.com @192.241.227.149 -p 5555
这次你应该得到相同的结果。