我在 Centos 5.10 上安装了一个转发 DNS 服务器,它正在解析地址,例如 google.com。当我停止命名(服务命名停止)并尝试挖掘(挖掘 @localhost A google.com)时,无法解析该地址。我检查了一下,发现缓存守护进程 nscd 正在运行。
这是否意味着服务器根本没有缓存?我该如何让它缓存?
命名配置文件
options
{
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
// Put files that named is allowed to write in the data/ directory:
listen-on port 53 {127.0.0.1; 10.0.0.4;};
directory "/var/named"; // the default
dump-file "/var/named/chroot/var/named/data/cache_dump.db";
statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
// allow-query {localhost; 192.168.0.0/24; 10.0.0.0/8;};
recursion yes;
//allow-query { localhost; 10.0.0.0/8;};
allow-query { localhost; any; };
allow-query-cache { localhost; any; };
forward only;
forwarders {8.8.8.8; 8.8.4.4;};
dnssec-enable yes;
// dnssec-lookaside auto;
/* Path to ISC DLV key */
// bindkeys-file "/etc/named.iscdlv.key";
// managed-keys-directory "/var/named/dynamic";
}; 记录 {
channel default_debug {
file "data/named.run";
severity dynamic;
};
}; **