为了账号安全,请及时绑定邮箱和手机立即绑定

DNS服务器搭建基本流程

标签:
Linux

一、软件包安装:
cd /home/DZP/cdrom/Packages/
rpm -ivh bind-utils-9.7.3-8.P3.el6.x86_64.rpm
rpm -ivh bind-9.7.3-8.P3.el6.x86_64.rpm bind-chroot-9.7.3-8.P3.el6.x86_64.rpm cachefilesd-0.10.2-1.el6.x86_64.rpm

cd /var/named/chroot/etc/
vi named.conf
[配置如下]

options
{
directory "/var/named";
}

view "lan"
{
match-clients { 172.30.75.0/24 };
zone "benet.com" IN {
type master;
file "benet.com.zone.lan";
};
};

view "wan"
{
match-clients { any };
zone "benet.com" IN {
type master;
file "benet.com.zone.wan";
};
};

cd /var/named/chroot/var/named/

cat /etc/hosts //确认DNS服务器的各种地址信息
cat /etc/resolv.conf

NS1:
软件查询和安装:
rpm -ivh caching-nameserver-9.3.3-7.el5.i386.rpm --nodeps --force

rpm -qa | grep ^bind
bind-utils-9.7.3-8.P3.el6.x86_64
bind-libs-9.7.3-8.P3.el6.x86_64
yum install bind-chroot*
修改主机名:
hostname ns1.benet.com
修改hosts文件:
vi /etc/hosts
172.30.75.132 ns1.benet.com ns1
172.30.75.133 ns2.benet.com ns2
vi /var/named/chroot/etc/named.conf
[配置内容]
options
{
directory "/var/named";
};
zone "benet.com" IN
{
type master;
file "benet.com.zone";
allow-transfer {172.30.75.133;};
};

zone "accp.com" IN
{
type master;
file "accp.com.zone";
allow-transfer {172.30.75.133;};
};

zone "67.45.123.in-addr-arpa" IN
{
type master;
file "123.45.67.arpa";
allow-transfer {172.30.75.133;};
};

cd /var/named/chroot/var/named/
vi benet.com.zone
[配置内容]
$TTL 86440
@ SOA benet.com. admin.benet.com.
(
2011030781
4H
30M
12H
1D
)
@ IN NS ns1.benet.com.
IN NS ns2.benet.com.
IN MX 10 mail.benet.com.
ns1 IN A 172.30.75.132
ns2 IN A 172.30.75.133
mail IN A 123.45.67.89
ftp IN A 123.45.67.90
www IN A 123.45.67.88

  • IN A 123.45.67.88

cp benet.com.zone accp.com.zone
vi accp.com.zone
$TTL 86440
@ SOA accp.com. admin.accp.com.
(
2011030781
4H
30M
12H
1D
)
@ IN NS ns1.benet.com.
IN NS ns2.benet.com.
ns1 IN A 172.30.75.132
ns2 IN A 172.30.75.133
mail IN A 123.45.67.89
ftp IN A 123.45.67.90
www IN A 123.45.67.88

  • IN A 123.45.67.88

cp benet.com.zone 123.45.67.arpa
vim 123.45.67.arpa
$TTL 86440
@ rpa SOA benet.com. admin.benet.com.
(
2011030781
4H
30M
12H
1D
)
@ IN NS ns1.benet.com.
IN NS ns2.benet.com.
IN MX 10 mail.benet.com.
88 IN PTR www.benet.com
89 IN PTR mail.benet.com
90 IN PTR ftp.benet.com

点击查看更多内容
6人点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消