在我做了上百万项研究之后,我仍然不确定这是对是错。请允许我问..。
我已经在Linux上绑定了DNS安装程序,Resolver安装程序可以先侦听本地主机,然后再监听其他本地主机。
我有一个域名,example.com,它有亚马逊的名字服务器。
在Linux上,我还为example.com提供了专区文件,并将其编写为
example.com. 86400 IN NS < local host name >当我命令
nslookup example.com它会回来的
Server: < local host ip >
Address: < local host ip >#53删除/禁用区域文件后
它将返回正确的信息
Server: < amazon ns ip >
Address: < amazon ns ip >#53我假设正确的设置是即使在区域文件存在时,dns也可以确定它的真名服务器在哪里。
你能指导我什么是不对的,我应该深入到哪里去?
发布于 2017-09-29 20:51:51
DNS查找工作的优先级在文件/etc/nsswitch.conf中定义。
如果搜索该文件,将发现行主机如下所示
cat /etc/nsswitch.conf | grep hosts
hosts: files dns因此,解析将首先在文件/etc/hosts中查找条目,然后检查DNS。DNS优先级在文件/etc/resolv.conf中定义。
因此,在您的/etc/resolv.conf中,您可能会有公共DNS条目。
https://serverfault.com/questions/876212
复制相似问题