DNS—bind安装与配置的关键技术揭秘
时间:2007-10-27 来源:不详 作者:林仙
};
这一部分是日志的设置,其中最主要的是
file"/var/log/named.log"这一句指定了日志文件的位置,要正常启动named,必须要保证这一文件是存在的,并且named进程对它有读写权限。
(2)options
options{
directory"/etc/namedb";
listen-on-v6{any;};
//Ifyou’vegotaDNSserveraroundatyourupstreamprovider,enter
//itsIPaddresshere,andenablethelinebelow. Thiswillmakeyou
//benefitfromitscache,thusreduceoverallDNStrafficintheInternet.
forwarders{
your.upper.DNS.address;
};
/*
*Ifthereisafirewallbetweenyouandnameserversyouwant
*totalkto,youmightneedtouncommentthequery-source
*directivebelow. PreviousversionsofBINDalwaysasked
*questionsusingport53,butBIND8.1usesanunprivileged
*portbydefault.
*/
//query-sourceaddress*port53;
/*
*Ifrunninginasandbox,youmayhavetospecifyadifferent
内容来自dedecms
*locationforthedumpfile.
*/
dump-file"/etc/named_dump.db";
};
这一部分是一些基本的配置项:
directory"/etc/namedb";指定域名解析等文件的存放目录(须手动建立);
listen-on-v6{any;};支持ipv6的请求;
forwarders{
your.upper.DNS.address;
};指定前向DNS,当本机无法解析的域名,就会被转发至前向DNS进行解析。
dump-file"/etc/named_dump.db";指定named_dump.db文件的位置。
(3)线索域和回环域
//Settingupsecondariesiswayeasierandtheroughpictureforthis
//isexplainedbelow.
//
//Ifyouenablealocalnameserver,don’tforgettoenter127.0.0.1
//intoyour/etc/resolv.confsothisserverwillbequeriedfirst.
//Also,makesuretoenableitin/etc/rc.conf.
zone"."{
typehint;
file"named.root";
};
zone"0.0.127.IN-ADDR.ARPA"{
文章评论
共有位Admini5网友发表了评论 查看完整内容