domain-name-system – 为什么我的DNS服务器没有转发?

domain-name-system – 为什么我的DNS服务器没有转发?,第1张

概述我有这样设置绑定: //// named.conf//// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS// server as a caching only nameserver (as a localhost DNS resolver only).//// See /usr/share 我有这样设置绑定:
//// named.conf//// ProvIDed by Red Hat bind package to configure the ISC BIND named(8) DNS// server as a caching only nameserver (as a localhost DNS resolver only).//// See /usr/share/doc/bind*/sample/ for example named configuration files.//options {        Listen-on port 53 { any; };#       Listen-on-v6 port 53 { ::1; };        directory       "/var/named";        forwarders      { 10.90.0.135; 10.90.0.174; };        dump-file       "/var/named/data/cache_dump.db";        statistics-file "/var/named/data/named_stats.txt";        memstatistics-file "/var/named/data/named_mem_stats.txt";        allow-query     { any; };        recursion yes;        dnssec-enable yes;        dnssec-valIDation yes;        dnssec-lookasIDe auto;        /* Path to ISC DLV key */        bindkeys-file "/etc/named.iscdlv.key";        managed-keys-directory "/var/named/dynamic";};logging {        channel default_deBUG {                file "data/named.run";                severity dynamic;        };};zone "." IN {        type hint;        file "named.ca";};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";zone "appletop.local" IN {        type master;        file "appletop.local";        allow-update { none; };};

但它没有前进?

如果我只是将DNS服务器地址放在另一台机器上的resolv.conf中,我会得到正确的查找,因此DNS服务器必须能够为我解析,但如果我再将其他机器指向此处,则无法解析名称.

怎么了?

在MadHatter建议更改后:

现在它开始但挂在挖掘痕迹上并且不转发 – 为什么我看不到下面的转发器地址?

[root@ns1 ~]# Ping www.yahoo.com^C[root@ns1 ~]# cd /etc/[root@ns1 etc]# cp named.conf named.conf.last[root@ns1 etc]# vi named.conf[root@ns1 etc]# /etc/init.d/named reloadReloading named-sdb:                                       [  OK  ][root@ns1 etc]# service named stopStopPing named: .                                          [  OK  ][root@ns1 etc]# /etc/init.d/named startStarting named:                                            [  OK  ][root@ns1 etc]# nslookup www.yahoo.com;; connection timed out; trying next originServer:         10.138.10.30Address:        10.138.10.30#53** server can't find www.yahoo.com: NXDOMAIN

并挖掘跟踪:

[root@ns1 etc]# dig +trace www.yahoo.com; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6_4.6 <<>> +trace www.yahoo.com;; global options: +cmd.                       518400  IN      NS      E.ROOT-SERVERS.NET..                       518400  IN      NS      M.ROOT-SERVERS.NET..                       518400  IN      NS      I.ROOT-SERVERS.NET..                       518400  IN      NS      F.ROOT-SERVERS.NET..                       518400  IN      NS      G.ROOT-SERVERS.NET..                       518400  IN      NS      K.ROOT-SERVERS.NET..                       518400  IN      NS      B.ROOT-SERVERS.NET..                       518400  IN      NS      A.ROOT-SERVERS.NET..                       518400  IN      NS      C.ROOT-SERVERS.NET..                       518400  IN      NS      L.ROOT-SERVERS.NET..                       518400  IN      NS      J.ROOT-SERVERS.NET..                       518400  IN      NS      H.ROOT-SERVERS.NET..                       518400  IN      NS      D.ROOT-SERVERS.NET.

我的整个文件现在看起来像这样 – 什么不对?

options {         Listen-on port 53 { any; }; #       Listen-on-v6 port 53 { ::1; };         directory       "/var/named";         dump-file       "/var/named/data/cache_dump.db";         statistics-file "/var/named/data/named_stats.txt";         memstatistics-file "/var/named/data/named_mem_stats.txt";         allow-query     { any; };         recursion yes;         dnssec-enable yes;         dnssec-valIDation yes;         dnssec-lookasIDe auto;         /* Path to ISC DLV key */         bindkeys-file "/etc/named.iscdlv.key";         managed-keys-directory "/var/named/dynamic"; }; logging {         channel default_deBUG {                 file "data/named.run";                 severity dynamic;         }; }; zone "." IN {         type forward;         forward first;         forwarders { 10.90.0.135;                      10.90.0.174;                    } ; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; zone "appletop.local" IN {         type master;         file "appletop.local";         allow-update { none; }; };
解决方法 你告诉它使用什么转发器,但不知道何时使用它们.如果你想让它用于一切,而不是
zone "." IN {        type hint;        file "named.ca";};

尝试

zone "." {        type forward;        forward first;        forwarders { 10.90.0.135;                     10.90.0.174;                   } ;} ;

编辑:好的,请尝试上面的代码.我不明白你的意思是“先尝试在当地解决”,但是;你说你希望它转发.

总结

以上是内存溢出为你收集整理的domain-name-system – 为什么我的DNS服务器没有转发?全部内容,希望文章能够帮你解决domain-name-system – 为什么我的DNS服务器没有转发?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1130485.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存