码迷,mamicode.com
首页 > Windows程序 > 详细

DNS从服务器迁移(基于windows为主,linux为从实现同步)

时间:2015-08-28 11:13:49      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:dns主从   dns基于windows作为主   linux作为从   

系统环境:

              CentOS release 6.6 (Final)

              Linux 2.6.32-504.el6.x86_64

              DNS主:192.168.10.251(windows)

              DNS从:192.168.10.250(linux)

 

 

安装bind服务

  # yum install  bind-libs  bind-utils  bind

 

编辑配置文件:

# vim /etc/named.conf

options {
listen-on port 53 { 127.0.0.1;192.168.10.251; };
# listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
# allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
# bindkeys-file "/etc/named.iscdlv.key";

# managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

include "/etc/named.rfc1912.zones";
#include "/etc/named.root.key";

在从服务器添加需要同步的zone

在/etc/named.rfc1912.zones文件后面添加如下配置

zone "hepaidai.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/hepaidai.org.zone";
};


zone "langbank.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/langbank.org.zone";
};

zone "longbank.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/longbank.org.zone";
};

zone "zhijiaoyi.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/zhijiaoyi.org.zone";
};

 

启用DNS主服务器(windos)每一个zone的区域传送

如下图所示

技术分享

并对其他的zone进行相同的操作

重启dsn从服务器

# /etc/init.d/named restart


本文出自 “Linux之旅” 博客,请务必保留此出处http://openlinuxfly.blog.51cto.com/7120723/1689210

DNS从服务器迁移(基于windows为主,linux为从实现同步)

标签:dns主从   dns基于windows作为主   linux作为从   

原文地址:http://openlinuxfly.blog.51cto.com/7120723/1689210

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!