码迷,mamicode.com
首页 > 其他好文 > 详细

DNS之缓存服务器部署流程

时间:2019-02-22 23:18:41      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:lease   rate   ems   com   缓存服务器   sea   bind   介绍   客户端   

环境介绍

[root@dns ~]# cat /etc/centos-release
CentOS release 6.6 (Final)
[root@dns ~]# ifconfig eth0|sed -rn ‘s/.*dr:(.*) B.*/\1/p‘
192.168.30.149

安装部署

[root@dns ~]# yum install -y bind bind-libs bind-utils
[root@dns ~]# cp /etc/named.conf{,.bak}
[root@dns ~]# vim /etc/named.conf
options {
// listen-on port 53 { 127.0.0.1; }; # 或【listen-on port 53 { 192.168.30.149; 127.0.0.1; };】
// 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; }; # 或【allow-query { any; };】
recursion yes;
// dnssec-enable yes;
// dnssec-validation yes;
/* Path to ISC DLV key */
// bindkeys-file "/etc/named.iscdlv.key";
// managed-keys-directory "/var/named/dynamic";
};
[root@dns ~]# named-checkconf
[root@dns ~]# /etc/init.d/named start
[root@dns ~]# ss -lntup4|grep named


客户端

[root@user ~]# cat /etc/centos-release
CentOS release 6.6 (Final)
[root@user ~]# ifconfig eth0
[root@user ~]# ifconfig eth0|sed -rn ‘s/.*dr:(.*) B.*/\1/p‘
192.168.30.151
[root@user ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search localdomain
# nameserver 192.168.30.2
[root@user ~]# ping -c 1 baidu.com &>/dev/null && echo ok || echo false
false
[root@user ~]# echo "nameserver 192.168.30.149" >>/etc/resolv.conf
[root@user ~]# ping -c 1 baidu.com &>/dev/null && echo ok || echo false
ok


DNS之缓存服务器部署流程

标签:lease   rate   ems   com   缓存服务器   sea   bind   介绍   客户端   

原文地址:https://www.cnblogs.com/liming-linux-python/p/10421085.html

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