美文网首页
辅助DNS服务器配置

辅助DNS服务器配置

作者: 蝉溪一梦 | 来源:发表于2019-03-09 15:56 被阅读0次
    1. slave DNS服务器使用CentOS 6.5 ,IP地址为:192.168.5.128,安装DNS服务软件包,方法和主服务器安装一样,正反解网域只需要在master上transfer到slave节点即可。

    2. master named.conf文件中,需要设定哪个 IP 可以对我的 zone 进行传输 (allow-transfer),而在 zone file 当中,就是各加入一笔 NS 的记录即可!

      zone "juzldream.fun" IN { 
              type master; 
              file "juzldream.fun";
              allow-transfer {192.168.5.128;};     #允许192.168.5.128从服务器传送
      };  
      zone "5.168.192.in-addr.arpa" IN {
              type master;
              file "juzldream.back";
              allow-transfer {192.168.5.128;};
      };
      
      
    3. 在正反解数据库文档中新增所需要的 NS 标志才行!NS 对应的主机名为 slave.juzldream.fun, IP 则是即本机服务器地址。

      $TTL 600
      @       IN      SOA     master.juzldream.fun. admin.juzldream.fun. (
                                                 2019021806
                                                 1H
                                                 5M
                                                 2D
                                                 6H
      )
              IN      NS      master
              IN      NS      slave
              IN      MX  10  mail
      master  IN      A       192.168.5.130
      slave   IN      A       192.168.5.128  ;从DNS服务地址,tips 从服务器需要配置ns2地址。
      mail    IN      A       192.168.5.140
      www     IN      A       192.168.5.150
      www     IN      A       192.168.5.151
      ftp     IN      A       192.168.5.160
      pop     IN      CNAME   mail
      web     IN      CNAME   www
      test    IN      A       192.168.5.170
      *.juzldream.fun. IN     A       192.168.5.88 ;DNS泛域名解析
      
      $TTL 600
      @       IN      SOA     master.juzldream.fun. admin.juzldream.fun. (
                                                  2019021804
                                                  1H
                                                  5M
                                                  2D
                                                  6H
      )
              IN      NS      master.juzldream.fun.
              IN      NS      slave.juzldream.fun.
      130     IN      PTR     master.juzldream.fun.
      128     IN      PTR     slave.juzldream.fun.
      140     IN      PTR     mail.juzldream.fun.
      150     IN      PTR     www.juzldream.fun.
      151     IN      PTR     www.juzldream.fun.
      160     IN      PTR     ftp.juzldream.fun.
      170     IN      PTR     test.juzldream.fun.
      
    4. slave DNS服务器 named.conf 文件配置

      options {
              directory       "/var/named";
              allow-recursion {192.168.5.128;};
      };
      zone "." IN {
              type hint;
              file "named.ca";
      };
      
      zone "localhost" IN {
              type master;
              file "named.localhost";
              allow-transfer {none;};  #不允许增量传送
      };
      
      zone "0.0.127.in-addr.arpa" IN {
              type master;
              file "named.loopback";
              allow-transfer {none;};
      };
      zone "juzldream.fun" IN {
              type slave;
              file "slaves/juzldream.fun";
              masters {192.168.5.136;};
              allow-transfer {none;};
      };
      zone "5.168.192.in-addr.arpa" IN {
              type slave;
              file "slaves/juzldream.back";
              masters {192.168.5.136;};
              allow-transfer {none;};
      };
      
    5. 启动dns服务器

      [root@testplus ~]# service named statrt

    相关文章

      网友评论

          本文标题:辅助DNS服务器配置

          本文链接:https://www.haomeiwen.com/subject/xdaspqtx.html