Centos 配置辅助DNS

在上一篇中我们成功的配置了主DNS服务器(Centos Bind配置完整版),这篇文章让我们来配置一下辅助dns。

定义如下: 主DNS服务器:192.168.1.250 辅助DNS服务器:192.168.1.251文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

1:修改主DNS的named.conf


主要是增加allow-transfer { 192.168.1.251; };这个内容。文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

2:修改主DNS的a.com.zone(和《Centos Bind配置完整版》文章关联)

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

3:修改主DNS的反向[root@localhost named]# vi /var/named/192.168.1.zone

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

4:递归配置

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

到此主DNS需要修改的已经完成,下面我们来修改一下辅助DNS的相关配置。文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

首先和配置主DNS一样,首选需要安装BIND的相关组件,如何安装请参考《Centos Bind配置完整版》。文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

1:named.conf参考主DNS配置。


2:修改[root@localhost etc]# vi /var/named/chroot/etc/named.rfc1912.zones

[root@localhost etc]# service named restart文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

主、辅dns的bind都重新启动一下。然后查看一下文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

[root@localhost /]# cd /var/named/slaves/目录下是否把192.168.1.zone和a.com.zone同步过来了。文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-secondary-dns/

[root@localhost slaves]# tail /var/log/messages 查看日志也可以。

[root@localhost data]# dig -t axfr a.com @192.168.1.250 可在192.168.1.251上测试传送是否正常。

到此基本就算是配置完成了。若有不当之处,请指正。谢谢。
申明:本文由BYRD原创(基于Centos6.4 X64),未经许可禁止转载!

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

On this day in past years
August
6
 
Byrd
  • by Published onAugust 6, 2013
  • 原文链接:https://note.t4x.org/system/configure-secondary-dns/
匿名

Comment

Anonymous

Slide puzzle verification.