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

centos7-bind

时间:2020-01-15 09:43:52      阅读:80      评论:0      收藏:0      [点我收藏+]

标签:check   invalid   zone   转发   add   com   bind   include   pre   

部署

yum install -y bind*
vim /etc/named.conf
listen-on port 53 { any; };
//  listen-on-v6 port 53 { ::1; }; 
allow-query     { any; };

配置转发,用于解析外网

recursion yes;
        forward first;
        forwarders {
            223.5.5.5;
            223.6.6.6;
         };
#include "/etc/named.root.key";

配置正向、反向解析

vim /etc/named.rfc1912.zones
zone "test.com" IN {
        type master;
        file "test.com.zone";
        allow-update { none; };
};

zone "11.28.172.in-addr.arpa" IN {
        type master;
        file "172.28.11.arpa";
        allow-update { none; };
};

解析文件位于/var/named

more test.com.zone
$TTL 1D
@   IN SOA  test.com. rname.invalid. (
                    0   ; serial
                    1D  ; refresh
                    1H  ; retry
                    1W  ; expire
                    3H )    ; minimum
                NS      @
                A       172.28.11.6

idc-esxi-hw01   IN      A       172.28.11.11
idc-esxi-hw02   IN      A       172.28.11.12
idc-esxi-hw03   IN  A   172.28.11.13
photon-machine  IN      A       172.28.11.50
more 172.28.11.arpa
$TTL 1D
@   IN SOA  test.com. rname.invalid. (
                    0   ; serial
                    1D  ; refresh
                    1H  ; retry
                    1W  ; expire
                    3H )    ; minimum
        IN      NS  localhost.
6       IN      PTR     test.com
11  IN  PTR idc-esxi-hw01.zhcslyg.com
12  IN  PTR idc-esxi-hw02.zhcslyg.com
13  IN  PTR idc-esxi-hw03.zhcslyg.com
50      IN      PTR     photon-machine.zhcslyg.com
named-checkconf
systemctl restart named
systemctl enable named

centos7-bind

标签:check   invalid   zone   转发   add   com   bind   include   pre   

原文地址:https://www.cnblogs.com/kylingx/p/12194919.html

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