我在公司网络的子网中有一个 dns 服务器,当它无法解析时,我想告诉它转发到主 dns 服务器
这是我的文件:
//
// 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; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
forwarders { 10.90.0.135; 10.90.0.174; };
forward first;
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 服务器 10.90.0.35 很好,如果我使用它来解析 dig 的话,那就没问题了
[root@ns1 etc]# dig www.yahoo.com @10.90.0.135
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6_4.6 <<>> www.yahoo.com @10.90.0.135
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24437
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.yahoo.com. IN A
;; ANSWER SECTION:
www.yahoo.com. 278 IN CNAME fd-fp3.wg1.b.yahoo.com.
fd-fp3.wg1.b.yahoo.com. 278 IN CNAME ds-fp3.wg1.b.yahoo.com.
ds-fp3.wg1.b.yahoo.com. 1 IN CNAME ds-eu-fp3-lfb.wa1.b.yahoo.com.
ds-eu-fp3-lfb.wa1.b.yahoo.com. 235 IN CNAME ds-eu-fp3.wa1.b.yahoo.com.
ds-eu-fp3.wa1.b.yahoo.com. 26 IN A 87.248.122.122
ds-eu-fp3.wa1.b.yahoo.com. 26 IN A 87.248.112.181
;; Query time: 49 msec
;; SERVER: 10.90.0.135#53(10.90.0.135)
;; WHEN: Thu Sep 12 17:37:15 2013
;; MSG SIZE rcvd: 167
但我无法让它将我的任何正常请求转发到该服务器
我做错了什么,我从网上的例子中复制了条目,但它不起作用
谢谢
答案1
问题是我在文件中启用了 dns-sec - 我删除了所有的 sec 内容,它就起作用了
谢谢
答案2
您是否尝试过添加:
allow-recursion { 192.168.0.0/24; };
绑定选项?其中 192.168.0.0/24 是您的本地子网。
您能否发布以下结果:
dig @yourdnsserver www.yahoo.com
?
您可以考虑将这些添加到您的问题中,而不是我的回复中
===以下请求者的编辑===挖掘挂起:
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 ;; 全局选项:+cmd . 518400 IN NS H.ROOT-SERVERS.NET. . 518400 IN NS G.ROOT-SERVERS.NET. . 518400 IN NS M.ROOT-SERVERS.NET. . 518400 IN NS K.ROOT-SERVERS.NET. . 518400 IN NS
J.ROOT-SERVERS.NET
. . 518400 IN NS
L.ROOT-SERVERS.NET. . 518400 IN NS
I.ROOT-SERVERS.NET. . 518400 IN NS
A.ROOT-SERVERS.NET. . 518400 在 NS
D.ROOT-SERVERS.NET。。518400 在 NS
C.ROOT-SERVERS.NET。。518400 在 NS
E.ROOT-SERVERS.NET。。518400 在 NS
F.ROOT-SERVERS.NET。。518400 在 NS
B.ROOT-SERVERS.NET。
var/log/messages 中也充满了:
> Sep 12 18:08:51 ns1 named-sdb[25026]: validating @0x7fef184578a0: .
> NS: got insecure response; parent indicates it should be secure Sep 12
> 18:08:51 ns1 named-sdb[25026]: error (insecurity proof failed)
> resolving './NS/IN': 10.90.0.174#53 Sep 12 18:08:51 ns1
> named-sdb[25026]: validating @0x7fef184b2ea0: . NS: got insecure
> response; parent indicates it should be secure Sep 12 18:08:51 ns1
> named-sdb[25026]: error (insecurity proof failed) resolving './NS/IN':
> 10.90.0.135#53 Sep 12 18:08:53 ns1 named-sdb[25026]: error (network unreachable) resolving 'NET/DS/IN': 2001:7fe::53#53 Sep 12 18:08:55
> ns1 named-sdb[25026]: error (network unreachable) resolving './NS/IN':
> 2001:503:c27::2:30#53 Sep 12 18:08:57 ns1 named-sdb[25026]: error
> (network unreachable) resolving './NS/IN': 2001:500:2f::f#53 Sep 12
> 18:08:58 ns1 named-sdb[25026]: error (network unreachable) resolving
> 'NET/DS/IN': 2001:503:c27::2:30#53 Sep 12 18:09:01 ns1
> named-sdb[25026]: error (network unreachable) resolving 'NET/DS/IN':
> 2001:500:3::42#53 Sep 12 18:09:01 ns1 named-sdb[25026]: error (no
> valid DS) resolving 'F.ROOT-SERVERS.NET/A/IN': 10.90.0.174#53 Sep 12
> 18:09:01 ns1 named-sdb[25026]: error (no valid DS) resolving
> 'F.ROOT-SERVERS.NET/AAAA/IN': 10.90.0.174#53 Sep 12 18:09:01 ns1
> named-sdb[25026]: error (no valid DS) resolving
> 'E.ROOT-SERVERS.NET/A/IN': 10.90.0.174#53 Sep 12 18:09:05 ns1
> named-sdb[25026]: error (network unreachable) resolving 'NET/DS/IN':
> 2001:500:1::803f:235#53 Sep 12 18:09:09 ns1 named-sdb[25026]: error
> (network unreachable) resolving 'NET/DS/IN': 2001:7fe::53#53 Sep 12
> 18:09:09 ns1 named-sdb[25026]: error (network unreachable) resolving
> 'NET/DS/IN': 2001:500:2d::d#53 Sep 12 18:09:09 ns1 named-sdb[25026]:
> error (network unreachable) resolving './NS/IN': 2001:500:2d::d#53 Sep
> 12 18:09:11 ns1 named-sdb[25026]: error (network unreachable)
> resolving 'NET/DS/IN': 2001:dc3::35#53