-
CentOS6 DNS配置实例及详解
CentOS6 DNS配置实例及详解
操作系统:CentOS
6.2
BIND版本:BIND
9.7.3-P3-RedHat-9.7.3-8.P3.el6
################################################
相关配置文件
################################################
/etc/named.conf
主配置文件
/etc/named.rfc1912.zones
主要定义zone
/etc/sysconfig/named
定义chroot
################################################
1.安装包
bind
bind-chroot
bind-devel
bind-utils
bind-libs
#################################################
2.常用配置语句
C语言风格注释
//注释
C++
#注释
UNIX和Perl风格
options
全局配置选项和默认参数
view
定义一个视图
zone
定义一个区域
logging
日志和信息来源
acl
访问控制列表
include
加载文件
key
识别和授权的密钥信息
server
服务器参数
trusted-key
信任的DNSSEC密钥
type
定义区域类型
file
指定一个区域文件
directory
指定区域文件目录
forwarders
转发到的DNS服务器
masters
主服务器
allow-transfer
指定传送主机
allow-query
允许进行查询的主机
notify
主区域数据发生变化时允许通知从服务器
##################################################
options {
listen-on port 53 {
127.0.0.1; 192.168.100.2; 58.195.172.229; };
// 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
{
192.168.100.0/24; };
recursion yes;
//
forwarders { 168.95.1.1;
192.168.100.1; }; #将DNS服务器收到的查询请求转发到其他的域名服务器上,通常是一个IP地址列表。
// forward
( only|first;
);
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
bindkeys-file
"/etc/named.iscdlv.key";
};
acl acl_name {
any|none|localhost|localnets;
}
acl "internal" {
192.168.100.0/24;
}
server 192.168.100.1 {
bogus yes|no
provide-ixfr yes|no
request-ixfr yes|no
support-ixfr yes|no;
edns yes|no