domain-name-system – 解决Windows自动附加DNS后缀的问题

在我的工作场所,我们的IT部门负责管理DNS服务器.我的部门在网站上工作很多,并且访问我们需要将某些域映射到这些服务器的登台服务器.我个人只是编辑我的主机文件,但我们的团队有点大,我不能每次都去每台机器并编辑他们的主机文件.

所以我的解决方案是拥有一个简单的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 PC的搜索域.

您没有详细说明您正在运行的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 举报,一经查实,本站将立刻删除。

相关推荐


html5中section的用法
span标签和p标签的区别
jsp文件和html文件的区别是什么
span标签和div的区别
html颜色代码表大全
span标签的作用是什么
dhtml的主要组成部分包括什么
html编辑器哪个软件好用
span标签属于什么样式标签
html文件乱码怎么办
html怎么读取json文件
html文件打开乱码怎么恢复原状
html怎么链接外部css
html文件怎么保存到本地
html怎么链接css文件
html和css怎么连接
html和css怎么关联
html文件怎么保存到一个站点
html文件怎么写
html出现乱码怎么解决