User Tools

Site Tools


software:bind

Differences

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

Link to this comparison view

Next revision
Previous revision
software:bind [2015/03/02 14:18] – created Michele Porellisoftware:bind [2018/09/02 03:22] (current) – [Specify some overrides] Michele Porelli
Line 21: Line 21:
         // We want only forward requests, not act as real DNS         // We want only forward requests, not act as real DNS
         forward only;</code>         forward only;</code>
 +  - and add a new option to define who can query<code>acl goodclients {
 +    192.168.2.0/24;
 +    localhost;
 +    localnets;
 +};</code>
   - create your specifc tld /etc/bind/named.conf.**lan**<code>zone "lan." IN {   - create your specifc tld /etc/bind/named.conf.**lan**<code>zone "lan." IN {
    type forward;    type forward;
Line 28: Line 33:
   - add it to the included zones in /etc/bind/named.conf<code>include "/etc/bind/named.conf.lan";</code>   - add it to the included zones in /etc/bind/named.conf<code>include "/etc/bind/named.conf.lan";</code>
   - restart bind<code># service bind9 restart</code>   - restart bind<code># service bind9 restart</code>
-  - enjoy cached untracked queries :)+  - enjoy cached&untracked queries :) 
 + 
 +==== Specify some overrides ==== 
 +  - edit /etc/bind/named.conf.options and append in option section:<code>response-policy { zone "custom-overrides"; };</code> 
 +  - edit /etc/bind/named.conf.local and append the zone:<code>zone "custom-overrides" {type master; file "/etc/bind/custom-overrides"; allow-query {none;}; };</code> 
 +  - edit /etc/bind/custom-overrides and append the zone:<code>$TTL 1H 
 +@                       SOA LOCALHOST. myhost.example.com (1 1h 15m 30d 2h) 
 +                        NS  LOCALHOST. 
 + 
 +custom.google.com A   10.232.101.2 
 +facebook.com      A   192.168.3.8</code>
software/bind.1425305897.txt · Last modified: (external edit)