搭建BIND缓存服务器

搭建BIND缓存服务器

Bind Version: 9.11.4

😄 Written by Zak Zhu

参考

基础概念

Cache-only DNS

DNS缓存服务器不存在自定义的zone文件, 仅依靠缓存来为客户端提供服务, 通常用于负载均衡及加速访问操作.

操作环境

HOSTNAME IP ADDRESS ROLE
mac 192.168.199.103 DNS Client
cachedns.zakzhu.com 192.168.199.173 Cache-only DNS

搭建步骤

1. 安装bind

  • [root@cachedns ~]# yum install bind -y 

2. 修改/etc/named.conf

  • [root@cachedns ~]# vim /etc/named.conf 
    options { listen-on port 53 { 192.168.199.173; }; 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"; recursing-file "/var/named/data/named.recursing"; secroots-file "/var/named/data/named.secroots"; allow-query { any; }; forward only; forwarders { 223.5.5.5; 223.6.6.6; }; recursion yes; dnssec-enable no; dnssec-validation no; bindkeys-file "/etc/named.root.key"; managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid"; session-keyfile "/run/named/session.key"; }; ... ... ... ... 

3. 语法检查

  • [root@cachedns ~]# named-checkconf 

4. 启动named

  • [root@cachedns ~]# systemctl enable named [root@cachedns ~]# systemctl restart named 

测试服务

[zak@mac ~ 11:00:39] $ dig -t a www.dockone.io @192.168.199.173 

1

原文链接:https://www.cnblogs.com/zakzhu/p/12516300.html

原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/23116

(0)
上一篇 2024年4月30日
下一篇 2024年4月30日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

优速盾注册领取大礼包www.cdnb.net
/sitemap.xml