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:45]
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/16; +
-    };+
  
-    allow-transfer { +        allow-transfer { 
-        XXX.XXX.XX.XX;     // Slave DNS +            XXX.XXX.XX.XX;     // Slave DNS 
-    }; +        }; 
-     +         
-    forwarders { +        forwarders { 
-        XXX.XXX.XX.XX;     // ISP +            XXX.XXX.XX.XX;     // ISP 
-        XXX.XXX.XX.XX+        }
-    };+        forward only         // don't use root name server
 }; };
  
 +logging
 +{
 +        channel default_debug {
 +                file "data/named.run";
 +                severity dynamic;
 +        };
 +};
  
-//------------------------------------------------------------------------------------ 
-//zone "." { 
-//    type hint; 
-//    file "named.ca"; 
-//}; 
  
 +view "internal"
 +{
 +        match-clients { localhost; internal-network; };
 +        match-destinations { localhost; internal-network; };
  
-//------------------------------------------------------------------------------------ +        zone "localhost"
-zone "localhost"+            type master; 
-    type master; +            file "named.local"; 
-    file "named.local"; +        };
-};+
  
-zone "0.0.127.in-addr.arpa"+        zone "0.0.127.in-addr.arpa"
-    type master; +            type master; 
-    file "named.localrev"; +            file "named.localrev"; 
-};+        };
  
  
-//------------------------------------------------------------------------------------ +        //example.local 
-//example.com +        zone "example.local" { 
-zone "example.com" { +            type master; 
-    type master; +            file "named.example"; 
-    file "named.example"; +            allow-query { any; }; 
-    allow-query { any; }; +            allow-update { none; }; 
-    allow-update { none; }; +            allow-transfer { xx.xx.xx.xx; };        // Slave DNS 
-    allow-transfer { xx.xx.xx.xx; +        };
-                     xx.xx.xx.xx; }; +
-};+
  
-//192.168.0.0/24 +        //192.168.0.0/24 
-zone "0.168.192.in-addr.arpa"+        zone "0.168.192.in-addr.arpa"
-    type master; +            type master; 
-    file "0.168.192.in-addr.arpa"; +            file "0.168.192.in-addr.arpa"; 
-    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; }; +        };
-};+
  
 +}
  
-//------------------------------------------------------------------------------------ +view "external" 
-zone "sample.com" { +
-        type forward+        match-clients { any; }; 
-        forwarders { 192.168.100.xxx192.168.100.xxx; }; +        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.1518194703.txt.gz · Last modified: 2018/02/10 01:45 by kurihara