自建DNS
2021/8/8 23:35:59
本文主要是介绍自建DNS,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
自建DNS服务
采用bind9,作为DNS服务。
Debian官方WIKI
安装
apt-get install -y bind9 dnsutils
配置文件
主要的配置文件在下边
options
options { directory "/var/cache/bind"; // IPV4的监听端口和地址,127.0.0.1, localhost只能用于本机使用。 listen-on port 53 { 10.1.1.10; }; // 允许那些机器方位DNS,any为所有机器都能访问。 allow-query { any; }; // 节省资源,关闭验证 // 不做互联网认证 dnssec-validation no; dnssec-enable no; recursion yes; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. // 转发的上级DNS的IP forwarders { 10.1.1.254; }; // 设置允许进行递归查询的ip地址列表,缺省值是允许所有地址进行查询,需要注意的是当设置了不允许递归查询后,如果仍然能够查询部分外部的域名,那是因为dns的缓存在起作用,将缓存清除以后就可以了。 //allow-recursion { internals; }; //======================================================================== // If BIND logs error messages about the root key being expired, // you will need to update your keys. See https://www.isc.org/bind-keys //======================================================================== // ipv6监听 // listen-on-v6 { any; }; };
这篇关于自建DNS的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-07-02springboot项目无法注册到nacos-icode9专业技术文章分享
- 2024-06-26结对编程到底难不难?答案在这里
- 2024-06-19《2023版Java工程师》课程升级公告
- 2024-06-15matplotlib作图不显示3D图,怎么办?
- 2024-06-1503-Loki 日志监控
- 2024-06-1504-让LLM理解知识 -Prompt
- 2024-06-05做软件测试需要懂代码吗?
- 2024-06-0514-ShardingSphere的分布式主键实现
- 2024-06-03为什么以及如何要进行架构设计权衡?
- 2024-05-31全网首发第二弹!软考2024年5月《软件设计师》真题+解析+答案!(11-20题)