我正在尝试创建一个家庭自动化系统,它可以在我工作的白天照看我的狗。我在这个项目中的目标是学习一些关于 DNS、文件服务和 RaspberryPi 的知识。
我的硬件设置是这样的:
我想使用 bubby.com 作为域名。这在我从我的 digital ocean 服务器查询时有效。但是,如果我从我的笔记本电脑上尝试,我会得到一个不同的 ip。
来自 digital ocean 实例的测试:
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 设置(从网络偏好设置中检索): 名称服务器 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
日期 && dig 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 从 digital ocean 服务器中挖掘 hubby.com
约会 && dig 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 查找
日期 && 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
最佳答案
查看笔记本电脑的 dig
输出,注意 AUTHORITY: 0
。这样做的原因是因为这个答案不是来自您的 Digital Ocean 实例(我已经从几个不同的位置进行了测试,并且我总是得到与您从实例本身进行测试时得到的结果相同的结果),而是来自其他一些 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
这次您应该会得到相同的结果。
https://stackoverflow.com/questions/39050737/
相关文章:
android - Titanium SDK 5.4.0.GA 在 Android 平台的控制台上显
amazon-web-services - 您如何动态授予 AWS Lambda 函数访问资源的权限
android - 使用带参数的字符串资源 (strings.xml) 时出现问题
android - 滚动距离 - 无障碍服务 ACTION_SCROLL_FORWARD?
git - bitbucket - 看不到 merge 分支的提交
office365 - outlook.com rest api 不正确的组织者电子邮件