FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


middleware:bind:conf101.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
middleware:bind:conf101.html [2018/02/10 01:18]
kurihara
middleware:bind:conf101.html [2018/02/13 00:55] (current)
kurihara
Line 1: Line 1:
 [[middleware:bind:index.html]] [[middleware:bind:index.html]]
-====== Bind External Configuration Example : Master / Slave ======+====== Bind Internal and External Configuration Example : Master / Slave ======
  
 \\ \\
Line 12: Line 12:
 \\ \\
 ===== Master Server : named.conf ===== ===== Master Server : named.conf =====
- 
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 +acl "internal-network" {
 +        10.50.0.0/24;
 +        10.50.1.0/24;
 +};
 +
 options { options {
-    directory "/var/named";+        version         "unknown"; 
 +        directory "/var/named";
  
-    allow-query { +        allow-query     localhostinternal-network; };
-        127.0.0.1; +
-        192.168.0.0/24; +
-    };+
  
-    allow-transfer { +        allow-transfer { 
-        192.168.0.254+            XXX.XXX.XX.XX    // Slave DNS 
-    }; +        }; 
-    forwarders { +         
-        XXX.XXX.XX.XX; +        forwarders { 
-        XXX.XXX.XX.XX+            XXX.XXX.XX.XX;     // ISP 
-    };+        }
 +        forward only         // don't use root name server
 }; };
  
- +logging 
-//------------------------------------------------------------------------------------ +{ 
-zone "." +        channel default_debug 
-    type hint; +                file "data/named.run"
-    file "named.ca";+                severity dynamic; 
 +        };
 }; };
  
  
-//------------------------------------------------------------------------------------ +view "internal" 
-zone "localhost" { +
-    type master+        match-clients { localhost; internal-network; }
-    file "named.local"; +        match-destinations { localhost; internal-network; };
-};+
  
-zone "0.0.127.in-addr.arpa" { +        zone "localhost" { 
-    type master; +            type master; 
-    file "named.localrev"; +            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; 
-                     xx.xx.xx.xx; }; 
-}; 
  
-//192.168.0.0/24 +        //example.local 
-zone "0.168.192.in-addr.arpa" { +        zone "example.local" { 
-    type master; +            type master; 
-    file "0.168.192.in-addr.arpa"; +            file "named.example"; 
-    allow-query { any; }; +            allow-query { any; }; 
-    allow-update { none; }; +            allow-update { none; }; 
-    allow-transfer { xx.xx.xx.xx; +            allow-transfer { xx.xx.xx.xx; };        // Slave DNS 
-                     xx.xx.xx.xx; }; +        };
-};+
  
 +        //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+view "external" 
-        forwarders { 192.168.100.xxx192.168.100.xxx; }; +
-};+        match-clients { any; }; 
 +        match-destinations { any; }; 
 +        recursion no; 
 + 
 +        //example.com 
 +        zone "example.com" { 
 +            type master
 +            file "named.example"; 
 +            allow-query { any; }; 
 +            allow-update { none; }; 
 +            allow-transfer { xx.xx.xx.xx; };        // Slave DNS 
 +        }; 
 + 
 +}
  
 </sxh> </sxh>
 +
 +<code>
 +// Master DNS Server
 +zone "xxxxxxxxxxxx" {
 +    type master;            // Master DNS Server
 +    file "xxxxxxxx";
 +    slaves { xxx.xxx.xxx.xxx };       //Slave
 +};
 +</code>
 +
  
  
 \\ \\
 ===== Slave Server : named.conf ===== ===== Slave Server : named.conf =====
 +
 +<code>
 +// Slave DNS Server
 +zone "xxxxxxxxxxxx" {
 +    type slave;            // Slave DNS Server
 +    file "xxxxxxxx";
 +    masters { xxx.xxx.xxx.xxx };       //Master
 +};
 +</code>
 +
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 +acl "internal-network" {
 +        10.50.0.0/24;
 +        10.50.1.0/24;
 +};
 +
 options { options {
-    directory "/var/named";+        version         "unknown"; 
 +        directory "/var/named";
  
-    allow-query { +        allow-query     localhostinternal-network; };
-        127.0.0.1; +
-        192.168.0.0/24; +
-    };+
  
-    allow-recursion +        allow-transfer 
-        127.0.0.1+            XXX.XXX.XX.XX    // Slave DNS 
-        192.168.0.0/16+        }; 
-    };+         
 +        forwarders { 
 +            XXX.XXX.XX.XX;     // ISP 
 +        }
 +        forward only;          // don't use root name server 
 +};
  
-    allow-transfer +logging 
-        192.168.0.254; +
-    }; +        channel default_debug 
-    forwarders +                file "data/named.run"
-        XXX.XXX.XX.XX+                severity dynamic
-        XXX.XXX.XX.XX+        };
-    };+
 }; };
  
  
-//------------------------------------------------------------------------------------ +view "internal" 
-zone "." { +
-    type hint+        match-clients { localhost; internal-network; }
-    file "named.ca"; +        match-destinations { localhost; internal-network; };
-};+
  
 +        zone "localhost" {
 +            type master;
 +            file "named.local";
 +        };
  
-//------------------------------------------------------------------------------------ +        zone "0.0.127.in-addr.arpa" { 
-zone "localhost" { +            type master; 
-    type master;              // Master DNS Server in localhost +            file "named.localrev"; 
-    file "named.localhost"; +        };
-};+
  
-zone "0.0.127.in-addr.arpa" { 
-    type master;                // Master DNS Server 
-    file "named.loopback"; 
-}; 
  
 +        //example.local
 +        zone "example.local" {
 +            type slave;
 +            file "named.example";
 +            allow-query { any; };
 +            allow-update { none; };
 +            masters { xx.xx.xx.xx; };        // Master DNS Server
 +        };
  
-//------------------------------------------------------------------------------------ +        //192.168.0.0/24 
-// example.com +        zone "0.168.192.in-addr.arpa"
-zone "example.com"+            type slave; 
-    type slave;                // Slave DNS Server +            file "0.168.192.in-addr.arpa"; 
-    file "example.com"; +            allow-query { any; }; 
-    masters { xxx.xxx.xxx.xxx }; +            allow-update { none; }; 
-};+            masters { xx.xx.xx.xx; };        // Master DNS Server 
 +        }; 
 + 
 +
 + 
 +view "external" 
 +
 +        match-clients { any; }; 
 +        match-destinations { any; }; 
 +        recursion no; 
 + 
 +        //example.com 
 +        zone "example.com"
 +            type slave; 
 +            file "named.example"; 
 +            allow-query { any; }; 
 +            allow-update { none; }; 
 +            masters { xx.xx.xx.xx; };        // Master DNS Server 
 +        }; 
 + 
 +}
  
-// 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アドレス 
-}; 
 </sxh> </sxh>
  


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