当前位置:   article > 正文

ubuntu22.04配置bind9(dns服务器配置)

ubuntu22.04配置bind9(dns服务器配置)

1.安装bind9

  1. ubuntu@dns:~$ sudo su -
  2. [sudo] password for ubuntu:
  3. root@dns:~# apt install bind9

2.指定解析文件

  1. root@dns:~# vim /etc/bind/named.conf.default-zones
  2. // prime the server with knowledge of the root servers
  3. zone "." {
  4. type hint;
  5. file "/usr/share/dns/root.hints";
  6. };
  7. // be authoritative for the localhost forward and reverse zones, and for
  8. // broadcast zones as per RFC 1912
  9. zone "localhost" {
  10. type master;
  11. file "/etc/bind/db.local";
  12. };
  13. zone "127.in-addr.arpa" {
  14. type master;
  15. file "/etc/bind/db.127";
  16. };
  17. zone "0.in-addr.arpa" {
  18. type master;
  19. file "/etc/bind/db.0";
  20. };
  21. zone "255.in-addr.arpa" {
  22. type master;
  23. file "/etc/bind/db.255";
  24. };
  25. zone "openstack.jiangxi" { # 此处指定域名
  26. type master;
  27. file "/etc/bind/db.openstack.jiangxi"; #指定域名数据库存放位置
  28. };

3.配置域名数据库文件

  1. root@dns:~# vim /etc/bind/db.openstack.jiangxi
  2. $TTL 1D
  3. @ IN SOA master admin.openstack.jiangxi. ( 1 1D 5H 5H 2H )
  4. NS master
  5. master A 192.168.80.83
  6. controller A 192.168.80.80
  7. compute01 A 192.168.80.81
  8. compute02 A 192.168.80.82
  9. root@dns:~# systemctl restart bind9 #重启bind9服务
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/579877?site
推荐阅读
相关标签
  

闽ICP备14008679号