所以我的解决方案是拥有一个简单的DNS转发服务器.我想用dnsmasq.我将公司DNS域称为company.com,将我想要用于本地DNS的域称为mydomain.com
目前我正在运行DNS服务器,我正在使用argonath作为mydomain.com的子域.目前有两台机器连接,一台是名为pc115的Windows机箱,另一台是名为mithrandir的linux工作站.我的“sub dns”转发它无法回答的任何查询到company.com的DNS,这很好用. Linux工作站工作正常(例如,ping pc115工作).
但是在Windows机器上,我在ping mithrandir时遇到了麻烦.看起来是什么样的,Windows会自动在company.com上解决任何问题.因此,我的DNS获取它一无所知的mithrandir.company.com,并将其转发给更大的DNS.这是dnsmasq日志文件的相关部分(172.17.14.19是公司的DNS,10.10.31.15是我的):
May 12 15:07:52 dnsmasq[11970]: query[A] mithrandir.company.com from 10.10.31.15 May 12 15:07:52 dnsmasq[11970]: forwarded mithrandir.company.com to 172.17.14.19 May 12 15:07:52 dnsmasq[11970]: reply mithrandir.company.com is NXDOMAIN-IPv4 May 12 15:07:52 dnsmasq[11970]: query[AAAA] mithrandir.company.com from 10.10.31.15 May 12 15:07:52 dnsmasq[11970]: forwarded mithrandir.company.com to 172.17.14.19 May 12 15:07:52 dnsmasq[11970]: reply mithrandir.company.com is NXDOMAIN-IPv6 May 12 15:07:52 dnsmasq[11970]: query[A] mithrandir.com from 10.10.31.15 May 12 15:07:52 dnsmasq[11970]: forwarded mithrandir.com to 172.17.14.19 May 12 15:07:52 dnsmasq[11970]: reply mithrandir.com is NXDOMAIN-IPv4 May 12 15:07:52 dnsmasq[11970]: query[AAAA] mithrandir.com from 10.10.31.15 May 12 15:07:52 dnsmasq[11970]: forwarded mithrandir.com to 172.17.14.19 May 12 15:07:52 dnsmasq[11970]: reply mithrandir.com is NXDOMAIN-IPv6
你可以看到windows询问mithrandir.company.com,然后失败并尝试mithrandir.com.它永远不会尝试我的DNS知道如何解决的mithrandir.
除了更改首选DNS服务器之外,我无法真正摆脱Windows机器上的设置.
有什么方法可以解决这个问题吗?我真的不希望我的DNS回答company.com的事情,因为我没有域名并且与之无关.
解决方法
您没有详细说明您正在运行的Windows版本,但是对于Windows 7(从this SuperUser answer无耻地被盗):
- Go to Control Panel → Network and Internet → Network and Sharing Center.
- Click on Change Adapter Settings on the left side.
- Right-click on your network adapter (normally “Local Area Connection”) and select Properties.
- Select Internet Protocol version 4 (TCP/IPv4) and click on the Properties button.
- On the General tab,click on the Advanced… button.
- In the Append this DNS suffixes list,add the domains you want,like
google.com
.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。