1.配置主DNS(ip 192.168.18.61)
配置主辅dns和转发dns服务器
原创
©著作权归作者所有:来自51CTO博客作者张兵科的原创作品,请联系作者获取转载授权,否则将追究法律责任
(1)vim named.conf
ptions {
directory "/var/named";
};
zone "zbk.com" {
type master;
file "zbk.com.zone";
allow-transfer {192.168.18.101;};
};
zone "18.168.192.in-addr.arpa" {
type master;
file "zbk.com.192.168.18";
allow-transfer {192.168.18.101;};
};
(2)vim zbk.com.zone
@ IN SOA localhost root (
20121205 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
zbk.com. IN NS master.zbk.com.
www IN A 192.168.18.101
vim zbk.com.192.168.18
@ IN SOA localhost root (
20121205 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS master.zbk.com.
101 IN PTR www.zbk.com.
2配置辅助DNS(ip 192.168.18.101)
(1)vim named.conf
ptions {
directory "/var/named";
};
zone "zbk.com" {
type slave;
file "slaves/zbk.com.zone"; //注意放在slaves/下
masters {192.168.18.61;}; //指定主DNS服务器地址
};
zone "18.168.192.in-addr.arpa" {
type slave;
file "slaves/zbk.com.192.168.18";
masters {192.168.18.61;}; //指定主DNS服务器地址
};
(2)vim /etc/resolv.conf
nameserver 192.168.18.61
3.配置转发服务器(ip 192.168.18.141)
(1)vim named.conf
ptions {
directory "/var/named";
recursion yes; //允许递归查询
forwarders {192.168.18.101;};
forward only;
};
(2)vim /etc/resolv.conf
nameserver 192.168.18.101
4.安装httpd,并配置
vim /var/www/html/index.html
service httpd restart
5.客户端测试
vim /etc/resolv.conf
nameserver 192.168.18.141
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
配置缓存DNS服务器和主DNS服务器
使用bind搭建一个简单的缓存DNS服务器和主DNS服务器
DNS 服务 域名解析 -
win2003主/辅DNS服务器详细配置
win2003主/辅DNS服务器详细配置
职场 休闲 win2003主/辅DNS服务器详细配置 -
DNS(2): DNS主服务器配置
主DNS服务器的配置过程
DNS 主服务器配置