centos 6.5下搭建DNS伺服器
修改DNS主配置檔案named.conf
vi /etc/named.conf修改主配置檔案,
options {
listen-on port 53 { any; }; #預設修改位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; }; #預設修改位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";
:wq 儲存退出