FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Sidebar


Top     SiteMap

Manager Server

Target Server

$FHHOME/bin/xxx.sh | xxxx.exp













.

middleware:bind:conf101.html



This is an old revision of the document!


BIND (bind.py)

Bind External Configuration Example : Master / Slave

Introduction

  • Master / Slave


Master Server : named.conf

options {
    directory "/var/named";

    allow-query {
        127.0.0.1;
        192.168.0.0/16;
    };

    allow-transfer {
        XXX.XXX.XX.XX;     // Slave DNS
    };
    
    forwarders {
        XXX.XXX.XX.XX;     // ISP
        XXX.XXX.XX.XX;
    };
};


//------------------------------------------------------------------------------------
//zone "." {
//    type hint;
//    file "named.ca";
//};


//------------------------------------------------------------------------------------
zone "localhost" {
    type master;
    file "named.local";
};

zone "0.0.127.in-addr.arpa" {
    type master;
    file "named.localrev";
};


//------------------------------------------------------------------------------------
//example.com
zone "example.com" {
    type master;
    file "named.example";
    allow-query { any; };
    allow-update { none; };
    allow-transfer { xx.xx.xx.xx; };        // Slave DNS
};

//192.168.0.0/24
zone "0.168.192.in-addr.arpa" {
    type master;
    file "0.168.192.in-addr.arpa";
    allow-query { any; };
    allow-update { none; };
    allow-transfer { xx.xx.xx.xx; };        // Slave DNS
};


//------------------------------------------------------------------------------------
zone "sample.com" {
        type forward;
        forwarders { 192.168.100.xxx; 192.168.100.xxx; };
};


Slave Server : named.conf

options {
    directory "/var/named";

    allow-query {
        127.0.0.1;
        192.168.0.0/24;
    };

    allow-recursion {
        127.0.0.1;
        192.168.0.0/16;
    };

    allow-transfer {
        192.168.0.254;
    };
    forwarders {
        XXX.XXX.XX.XX;
        XXX.XXX.XX.XX;
    };
};


//------------------------------------------------------------------------------------
//zone "." {
//    type hint;
//    file "named.ca";
//};


//------------------------------------------------------------------------------------
zone "localhost" {
    type master;              // Master DNS Server in localhost
    file "named.localhost";
};

zone "0.0.127.in-addr.arpa" {
    type master;                // Master DNS Server
    file "named.loopback";
};


//------------------------------------------------------------------------------------
// example.com
zone "example.com" {
    type slave;                // Slave DNS Server
    file "example.com";
    masters { xxx.xxx.xxx.xxx };
};

// 192.168.0.*
zone "0.168.192.in-addr.arpa" {
    type slave;            // Slave DNS Server
    file "named.rev";
    masters { xxx.xxx.xxx.xxx };       //MasterのIPアドレス
};


/var/named/named.localhost

$TTL 1D
@       IN SOA  @ rname.invalid. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        NS      @
        A       127.0.0.1
        AAAA    ::1


/var/named/named.loopback

$TTL 1D
@       IN SOA  @ rname.invalid. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        NS      @
        A       127.0.0.1
        AAAA    ::1
        PTR     localhost.






BIND (bind.py)



middleware/bind/conf101.html.1518194758.txt.gz · Last modified: 2018/02/10 01:45 by kurihara