搭建DNS服务器实现域名解析 下载本文

//

options {

listen-on port 53 { any ; }; listen-on-v6 port 53 { any; }; directory \

dump-file \_dump.db\

statistics-file \_stats.txt\

memstatistics-file \amed_mem_stats.txt\

allow-query { any; }; recursion yes;

#dnssec-enable yes; #dnssec-validation yes; #dnssec-lookaside auto; /* Path to ISC DLV key */

bindkeys-file \

};

logging {

channel default_debug { file \ severity dynamic; }; }

zone \IN { type hint;

file \ };

zone \IN { type master;

file \

allow-transfer { 192.168.31.0/24; };

#指定允许哪个网段的从DNS服务器,可以同步主DNS服务器zone文件,不写默认为所有。

};

include \ 2、从DNS服务器的配置 ##主从时间一定要保持一致 安装程序:

yum install bind bind-chroot bind-utils -y [root@xuegod64 Packages]# service named restart

Stopping name

d: [ OK ] Starting name

d: [ OK ] [root@localhost etc]# vim named.conf options {

listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; directory \

dump-file \_dump.db\

statistics-file \_stats.txt\

memstatistics-file \amed_mem_stats.txt\

allow-query { any; }; recursion yes;

bindkeys-file \ };

logging {

channel default_debug { file \ severity dynamic; }; };

zone \IN { type hint;

file \ };