1. master server configure
# domain: test.com
# ip: 192.168.1.107
1.1 install bind9
aptitude install bind9
1.2 configure /etc/bind/name.conf
#bakup named.conf
cp /etc/bind/named.conf /etc/bind/named.conf.default
add next
# 正向解析
zone "test.com" {
type master;
file "/etc/bind/db.test";
allow-transfer { 192.168.1.109 ; }; #update slave server 192.168.1.109 db.test
notify yes;
also-notify { 192.168.1.109 ; };
};
#反向解析
zone "1.168.192.in-addr.arpa"{
type master;
file "/etc/bind/db.192.168.1";
allow-transfer { 192.168.1.109 ; }; #update slave server 192.168.1.109 db.test
notify yes;
also-notify { 192.168.1.109 ; };
};
1.3 add /etc/bind/db.test db.192.168.1
vim /etc/bind/db.test
#db.test
$TTL 86400
$ORIGIN test.com.
@ IN SOA test.com. root.test.com. (
20090201 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
@ IN NS test.com.
www IN A 192.168.1.136
ftp IN A 192.168.1.107
#db.192.168.1
$TTL 86400
@ IN SOA test.com. root.test.com. (
20090201 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
@ IN NS test.com.
136 IN PTR www.test.com. #其中“.”必须加上
1.4 restart bind9 or reload named.conf config
/etc/init.d/bind9 restart
or
rndc reload
2. slave server configure
# ip: 192.168.1.109
2.1 install bind9
aptitude install bind9
2.2 config /etc/bind/named.conf
#add next
zone "test.com" {
type slave; #slave server
file "/etc/bind/db.test";
masters {192.168.1.107;}; #master server is 192.168.1.107
};
zone "1.168.192.in-addr.arpa"{
type master; #slave server
file "/etc/bind/db.192.168.1";
masters {192.168.1.107;}; #master server is 192.168.1.107
};
2.3 add /etc/bind/db.test /etc/bind/db.192.168.1
#copy there form master server 192.168.1.107
#if you want update slave server config, the "serial" must < serial on master server
2.4 change /etc/bind proteries
chown bind /etc/bind
#if you do not change, slalve can not update successfull. permission denied
2.5 restart bind
3. test dns
# 正向测试
aptitude install dnsutils
dig -x 192.168.1.107
# 反向测试
windows xp tools: nslookup
bind9 DNS配置
原创
©著作权归作者所有:来自51CTO博客作者sky0224的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:win2003终端服务器配置
下一篇:NFS服务器的安装和配置
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
rocky9 配置静态ip
配置Rocky Linux 9 静态IP地址
配置文件 IP 加载 -
bind9 DNS配置
用bind9配置内部DNS
apache bind9 -
bind9 dns问题记录
bind同步问题记录
of journal out