首先两个BIND DNS服务器要正常运行。

      主DNS服务器IP:192.168.1.100

客户机DNS服务器IP:192.168.1.101

1 主DNS端配置:

cd /etc/

生成rndc.conf文件

rndc-confgen > rndc.conf

查看文件

cat rndc.conf

# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "VcL5wC2GHCzCU7ju+ajC1Q==";
}; options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port ;
};
# End of rndc.conf # Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "VcL5wC2GHCzCU7ju+ajC1Q==";
# };
#
# controls {
# inet 127.0.0.1 port
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf

vim named.conf

将下面这些添加到named.conf末尾

//支持远程rndc控制
key "rndc-key" {
algorithm hmac-md5;
secret "VcL5wC2GHCzCU7ju+ajC1Q==";
}; //inet: 如果只允许本地使用rndc控制把*换为127.0.0.1
//allow: 允许通过rndc管理此DNS的IP、KEY,这里设置为客户端IP
controls {
inet * port
allow { localhost; 192.168.1.101; } keys { "rndc-key"; };
};

删除rndc.key

rm rndc.key -f

重启BIND

service named restart

2 客户端配置

cd /etc/

生成rndc.conf文件

rndc-confgen > rndc.conf

编辑文件,修改secret为主DNS服务器配置中的值

vim rndc.conf

# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "VcL5wC2GHCzCU7ju+ajC1Q==";
}; options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port ;
};
# End of rndc.conf # Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "VcL5wC2GHCzCU7ju+ajC1Q==";
# };
#
# controls {
# inet 127.0.0.1 port
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf

vim named.conf

将下面这些添加到named.conf末尾,注意:secret的值要和主服务器中的secret值相同

//支持远程rndc控制
key "rndc-key" {
algorithm hmac-md5;
secret "VcL5wC2GHCzCU7ju+ajC1Q==";
}; //inet: 如果只允许本地使用rndc控制把*换为127.0.0.1
//allow: 允许通过rndc管理此DNS的IP、KEY,这里设置为主DNS服务器IP
controls {
inet * port
allow { localhost; 192.168.1.100; } keys { "rndc-key"; };
};

删除rndc.key

rm rndc.key -f

重启BIND

service named restart

使用BIND安装智能DNS服务器(二)---配置rndc远程控制的更多相关文章

  1. 使用BIND安装智能DNS服务器(三)---添加view和acl配置

    智能DNS的配置主要修改named.conf文件,利用view和acl来实现. acl文件内容,这里只列出一部分,具体详细的可以参考这个网址 纯真IP库,给出了十分详细的IP地址,下载安装后,打开软件 ...

  2. 使用BIND安装智能DNS服务器(一)---基本的主从DNS服务器搭建

    参考网址:http://www.unixmen.com/dns-server-installation-step-by-step-using-centos-6-3/ DNS(Domain Name S ...

  3. Bind 远程连接DNS服务器时出现 rndc: connection to remote host closed

    使用命令:rndc -s 192.168.1.2 status 连接远程的bind 搭建的DNS服务器时出现下面的错误:   rndc: connection to remote host close ...

  4. 使用bind实现主从DNS服务器数据同步

    一.bind简介 Linux中通常使用bind来实现DNS服务器的架设,bind软件由isc(www.isc.org)维护.在yum仓库中可以找到软件,配置好yum源,直接使用命令yum instal ...

  5. DNS同时占用UDP和TCP端口53——传输数据超过512时候用tcp,DNS服务器可以配置仅支持UDP查询包

    DNS同时占用UDP和TCP端口53是公认的,这种单个应用协议同时使用两种传输协议的情况在TCP/IP栈也算是个另类.但很少有人知道DNS分别在什么情况下使用这两种协议. 先简单介绍下TCP与UDP. ...

  6. DNS服务器的配置与应用: BIND9 的安装与配置

    3. BIND9 的安装与配置 3.1 bind简介 BIND (Berkeley Internet Name Domain)是Domain Name System (DNS) 协议的一个实现,提供了 ...

  7. Ubuntu 12.04 DNS服务器的配置方法

    Bind是一款开放源码的DNS服务器软件,由美国加州大学Berkeley分校开发和维护的,全名为Berkeley Internet Name Domain它是目前世界上使用最为广泛的DNS服务器软件, ...

  8. 烂泥:智能DNS使用与配置

    本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 公司的业务现在已经扩展到海外,对外提供的统一接口都是通过域名来解析的,但是海外用户访问国 ...

  9. linux杂谈(十八):DNS服务器的配置(一)

    原文地址: http://blog.chinaunix.net/uid-29622064-id-4242123.html 1.DNS服务器简介 域名系统(英文:Domain Name System,縮 ...

随机推荐

  1. 点聚-weboffice 6.0 (三)

    1.页面 var filename="<%=request.getParameter("filePath").toString()%>"; docu ...

  2. linux安装mongodb,设为全局和后台启动

    curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.5.tgz # 下载 tar -zxvf mongodb-linux ...

  3. (转)jQuery的deferred对象详解

    作者: 阮一峰 日期: 2011年8月16日 jQuery的开发速度很快,几乎每半年一个大版本,每两个月一个小版本. 每个版本都会引入一些新功能.今天我想介绍的,就是从jQuery 1.5.0版本开始 ...

  4. Node.js学习笔记(2):基本模块

    Node.js学习笔记(2):基本模块 模块 引入模块 为了编写可维护的代码,我们把很多函数分组,分别放到不同的文件里,这样,每个文件包含的代码就相对较少,很多编程语言都采用这种组织代码的方式.在No ...

  5. HDU - 1241 Oil Deposits 【DFS】

    题目链接 https://cn.vjudge.net/contest/65959#problem/L 题意 @表示油田 如果 @@是连在一起的 可以八个方向相连 那么它们就是 一块油田 要找出 一共有 ...

  6. 跳转appStore评分

    跳转到AppStore让用户能够给我们的应用进行评分,有两种方法,一种是跳出应用,跳转到AppStore,进行评分.另一种是在应用内,内置AppStore进行评分. PS:appleID在https: ...

  7. 冷门PHP函数汇总

    概述 整理一些日常生活中基本用不到的PHP函数,也可以说在框架内基本都内置了,无需我们去自行使用的函数.量不多.后续在日常开发中如遇到更多的冷门,会更新本文章 sys_getloadavg 获取系统的 ...

  8. <再看TCP/IP第一卷>关于网络层及协议细节---IP协议

    说到关于IP协议,就必须先说IP协议的两个特性: (一)不可靠性(unreliable) 不可靠性的意思是它不能保证IP数据报能成功地到达目的地,IP所能做的只是提供最好的传输服务,IP有一个简单的错 ...

  9. sping junit test

    @ContextConfiguration(locations="classpath:spring.xml")public class BaseTest extends Abstr ...

  10. java Regex匹配及解析文本

    用一个main程序展示下 public static void main(String[] args){       String text = "SSM<br>LOC<b ...