<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FBIND</id>
	<title>Linux/BIND - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FBIND"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/BIND&amp;action=history"/>
	<updated>2026-05-06T18:27:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/BIND&amp;diff=3745&amp;oldid=prev</id>
		<title>Kenneth: Created page with &quot;==Summary== Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server.  Description:  BIND (Berkeley Internet Name Domain) is an implementation of the...&quot;</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/BIND&amp;diff=3745&amp;oldid=prev"/>
		<updated>2016-09-16T18:17:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Summary== Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server.  Description:  BIND (Berkeley Internet Name Domain) is an implementation of the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Summary==&lt;br /&gt;
Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server.&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
&lt;br /&gt;
BIND (Berkeley Internet Name Domain) is an implementation of the DNS&lt;br /&gt;
(Domain Name System) protocols. BIND includes a DNS server (named),&lt;br /&gt;
which resolves host names to IP addresses; a resolver library&lt;br /&gt;
(routines for applications to use when interfacing with DNS); and&lt;br /&gt;
tools for verifying that the DNS server is operating properly.&lt;br /&gt;
&lt;br /&gt;
== Quick Installation ==&lt;br /&gt;
&lt;br /&gt;
Install bind, bind tools, and config files:&lt;br /&gt;
 yum install bind bind-utils caching-nameserver&lt;br /&gt;
&lt;br /&gt;
Start with sample configuration files:&lt;br /&gt;
 cp /usr/share/doc/bind-9*/sample/etc/* /etc/&lt;br /&gt;
 cp /usr/share/doc/bind-9*/sample/var/named/* /var/named/&lt;br /&gt;
&lt;br /&gt;
Add the following line under the &amp;quot;options&amp;quot; section of /etc/named.conf:&lt;br /&gt;
 listen-on { 127.0.0.1; 10.1.100.1; };&lt;br /&gt;
&lt;br /&gt;
Comment out example zones in &amp;quot;view &amp;quot;internal&amp;quot;&amp;quot; section&lt;br /&gt;
 #       zone &amp;quot;my.internal.zone&amp;quot; {&lt;br /&gt;
 #               type master;&lt;br /&gt;
 # ...&lt;br /&gt;
&lt;br /&gt;
Comment out the &amp;quot;key ddns_key&amp;quot; and &amp;quot;view &amp;quot;external&amp;quot;&amp;quot; sections:&lt;br /&gt;
 #key ddns_key&lt;br /&gt;
 #{&lt;br /&gt;
 #       algorithm hmac-md5;&lt;br /&gt;
 #       secret &amp;quot;use /usr/sbin/dns-keygen to generate TSIG keys&amp;quot;;&lt;br /&gt;
 #};&lt;br /&gt;
 #view    &amp;quot;external&amp;quot;&lt;br /&gt;
 # ...&lt;br /&gt;
&lt;br /&gt;
Configure /etc/resolv.conf:&lt;br /&gt;
 search test.lab&lt;br /&gt;
 nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Have bind auto start on boot:&lt;br /&gt;
 chkconfig named on&lt;br /&gt;
&lt;br /&gt;
Start bind:&lt;br /&gt;
 service named restart&lt;br /&gt;
&lt;br /&gt;
Test bind:&lt;br /&gt;
 dig www.google.com&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
[http://www.isc.org/sw/bind/arm93/Bv9ARM.ch06.html BIND 9 Configuration Reference]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Linux DNS Server is called bind or named; we need version 9. It should already be installed on your system, which can be verified using rpm -q bind.&amp;quot; [http://sipx-wiki.calivia.com/index.php/HowTo_Configure_DHCP_and_DNS_Servers]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $ yum info bind&lt;br /&gt;
 Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server.&lt;br /&gt;
 Description:&lt;br /&gt;
 BIND (Berkeley Internet Name Domain) is an implementation of the DNS&lt;br /&gt;
 (Domain Name System) protocols. BIND includes a DNS server (named),&lt;br /&gt;
 which resolves host names to IP addresses; a resolver library&lt;br /&gt;
 (routines for applications to use when interfacing with DNS); and&lt;br /&gt;
 tools for verifying that the DNS server is operating properly.&lt;br /&gt;
&lt;br /&gt;
 $ yum info caching-nameserver&lt;br /&gt;
 Summary: Default BIND configuration files for a caching nameserver&lt;br /&gt;
 Description:&lt;br /&gt;
 The  caching-nameserver package includes the configuration files which will make&lt;br /&gt;
 the ISC BIND named DNS name server act as a simple caching nameserver.&lt;br /&gt;
 A caching nameserver is a DNS Resolver, as defined in RFC 1035, section 7.&lt;br /&gt;
 ISC BIND named(8) provides a very efficient, flexible and robust resolver as&lt;br /&gt;
 well as a server of authoritative DNS data - many users use this package&lt;br /&gt;
 along with BIND to implement their primary system DNS resolver service.&lt;br /&gt;
 If you would like to set up a caching name server, you&amp;#039;ll need to install&lt;br /&gt;
 bind, bind-libs, and bind-utils along with this package.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
 yum install bind caching-nameserver&lt;br /&gt;
 chkconfig named on&lt;br /&gt;
&lt;br /&gt;
The package caching-nameserver is needed for several files found in /var/named.&lt;br /&gt;
&lt;br /&gt;
Optional xserver bind configuration tool:&lt;br /&gt;
 yum install system-config-bind&lt;br /&gt;
&lt;br /&gt;
The following files need to be configured:&lt;br /&gt;
* /etc/named.conf&lt;br /&gt;
* /etc/resolv.conf&lt;br /&gt;
* /etc/sysconfig/named (optional)&lt;br /&gt;
* /var/named/example.com.zone&lt;br /&gt;
* /var/named/192.168.5.zone&lt;br /&gt;
&lt;br /&gt;
A sample named.conf file can be found here:&lt;br /&gt;
 /usr/share/doc/bind-9.3.4/sample/etc/named.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;&lt;br /&gt;
 cp /usr/share/doc/bind-9.3.3/sample/etc/named.conf /etc/named.conf&lt;br /&gt;
 cp /usr/share/doc/bind-9.3.3/sample/etc/named.root.hints /etc/named.root.hints&lt;br /&gt;
 # overwrite... &lt;br /&gt;
 cp /usr/share/doc/bind-9.3.3/sample/etc/named.rfc1912.zones /etc/named.rfc1912.zones&lt;br /&gt;
 # optional..&lt;br /&gt;
 cp /usr/share/doc/bind-9.3.3/sample/etc/rndc.conf /etc/rndc.key&lt;br /&gt;
 chown root:named /etc/named*&lt;br /&gt;
 # var stuff&lt;br /&gt;
 cat /usr/share/doc/bind-9.3.3/sample/var/named/named.root /var/named/named.root&lt;br /&gt;
 chown root:named /var/named/named.root&lt;br /&gt;
&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See [[#Default named.conf|Default named.conf]]&lt;br /&gt;
&lt;br /&gt;
The file /etc/named.caching-nameserver.conf has only local resolver lines.  There are a few differences in the &amp;quot;options&amp;quot; section that the sample named.conf does not include, which appear to be restrictive in nature.  The can be incorporated into the named.conf if needs be.&lt;br /&gt;
&lt;br /&gt;
The file /usr/share/doc/bind-9.3.3/sample/etc/named.rfc1912.zones is missing the following that /etc/named.rfc1912.zones has (but named.root.hints has it):&lt;br /&gt;
 zone &amp;quot;.&amp;quot; IN {&lt;br /&gt;
         type hint;&lt;br /&gt;
         file &amp;quot;named.ca&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
/etc/resolv.conf:&lt;br /&gt;
 search t0e.org&lt;br /&gt;
 nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
To regenerate the rndc key:&lt;br /&gt;
 [root@hal ~]# cat /etc/rndc.key&lt;br /&gt;
 key &amp;quot;rndckey&amp;quot; {&lt;br /&gt;
         algorithm       hmac-md5;&lt;br /&gt;
         secret          &amp;quot;wp8YV4CpRykpGe7G8g465Bk0QvVIH8ksd26nst79EZfl8ZaarKD5B0Y4C4zO&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
 [root@hal ~]# rndc-confgen -a&lt;br /&gt;
 wrote key file &amp;quot;/etc/rndc.key&amp;quot;&lt;br /&gt;
 [root@hal ~]# cat /etc/rndc.key&lt;br /&gt;
 key &amp;quot;rndckey&amp;quot; {&lt;br /&gt;
         algorithm hmac-md5;&lt;br /&gt;
         secret &amp;quot;jyUnvqHOZWGfZnm46KvfoA==&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
The changes to make to the sample conf file are as follows:&lt;br /&gt;
 options&lt;br /&gt;
 {&lt;br /&gt;
   ...&lt;br /&gt;
   &amp;lt;b&amp;gt;listen-on { 127.0.0.1; 10.10.10.1; };&amp;lt;/b&amp;gt;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 view &amp;quot;internal&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
   ...&lt;br /&gt;
   &lt;br /&gt;
   &amp;lt;b&amp;gt;zone &amp;quot;t0e.org&amp;quot; IN {&lt;br /&gt;
     type master;&lt;br /&gt;
     file &amp;quot;t0e.org.zone&amp;quot;;&lt;br /&gt;
     allow-update { key &amp;quot;rndckey&amp;quot;; };&lt;br /&gt;
     notify yes;&lt;br /&gt;
   };&lt;br /&gt;
   zone &amp;quot;10.10.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
     type master;&lt;br /&gt;
     file &amp;quot;t0e.org.rev&amp;quot;;&lt;br /&gt;
     allow-update { key &amp;quot;rndckey&amp;quot;; };&lt;br /&gt;
     notify yes;&lt;br /&gt;
   };&amp;lt;/b&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   /* comment out all default zones&lt;br /&gt;
   zone &amp;quot;my.internal.zone&amp;quot; {&lt;br /&gt;
   ...&lt;br /&gt;
   zone &amp;quot;my.slave.internal.zone&amp;quot; {&lt;br /&gt;
   ...&lt;br /&gt;
     // DISABLE COMMENTS&lt;br /&gt;
     masters { / * put master nameserver IPs here * / 127.0.0.1; } ;&lt;br /&gt;
   ...&lt;br /&gt;
   zone &amp;quot;my.ddns.internal.zone&amp;quot; {&lt;br /&gt;
   }&lt;br /&gt;
   */&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 /* comment out &amp;quot;ddns_key&amp;quot; section, and do include&lt;br /&gt;
 key ddns_key&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 };&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;b&amp;gt;include &amp;quot;/etc/rndc.key&amp;quot;;&amp;lt;/b&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 /* comment out &amp;quot;external&amp;quot; section&lt;br /&gt;
 view    &amp;quot;external&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
 // DISABLE COMMENTS&lt;br /&gt;
 ...&lt;br /&gt;
 };&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OLD /etc/named.conf I use:&lt;br /&gt;
 options {&lt;br /&gt;
   directory &amp;quot;/var/named&amp;quot;;&lt;br /&gt;
   dump-file &amp;quot;/var/named/data/cache_dump.db&amp;quot;;&lt;br /&gt;
   statistics-file &amp;quot;/var/named/data/named_stats.txt&amp;quot;;&lt;br /&gt;
   listen-on { 127.0.0.1; 10.10.10.3; 10.10.20.3; };&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 controls {&lt;br /&gt;
   inet 127.0.0.1 allow { localhost; } keys { rndckey; };&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 include &amp;quot;/etc/rndc.key&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 zone &amp;quot;t0e.org&amp;quot; IN {&lt;br /&gt;
   type master;&lt;br /&gt;
   file &amp;quot;t0e.org.zone&amp;quot;;&lt;br /&gt;
   allow-update { key &amp;quot;rndckey&amp;quot;; };&lt;br /&gt;
   notify yes;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 zone &amp;quot;10.10.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
   type master;&lt;br /&gt;
   file &amp;quot;t0e.org.rev&amp;quot;;&lt;br /&gt;
   allow-update { key &amp;quot;rndckey&amp;quot;; };&lt;br /&gt;
   notify yes;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
The /var/named/t0e.org.zone I use:&lt;br /&gt;
 $TTL    300     ; 5 minutes&lt;br /&gt;
 t0e.org.              IN SOA  hal.t0e.org. hel.t0e.org. (&lt;br /&gt;
                                 20070714        ; serial number&lt;br /&gt;
                                 300             ; refresh (5 minutes)&lt;br /&gt;
                                 3600            ; retry (1 hour)&lt;br /&gt;
                                 604800          ; expire (1 week)&lt;br /&gt;
                                 3600            ; minimum TTL (1 hour)&lt;br /&gt;
                                 )&lt;br /&gt;
 &lt;br /&gt;
                         NS      hal.t0e.org.&lt;br /&gt;
 &lt;br /&gt;
 fw                      A       10.10.10.1&lt;br /&gt;
 hal                     A       10.10.10.3&lt;br /&gt;
&lt;br /&gt;
The /var/named/t0e.org.rev I use:&lt;br /&gt;
 $TTL    300     ; 5 minutes&lt;br /&gt;
 10.10.10.in-addr.arpa.          IN SOA  hal.t0e.org. hal.t0e.org. (&lt;br /&gt;
                                 20070714        ; serial number&lt;br /&gt;
                                 300             ; refresh (5 minutes)&lt;br /&gt;
                                 3600            ; retry (1 hour)&lt;br /&gt;
                                 604800          ; expire (1 week)&lt;br /&gt;
                                 3600            ; minimum TTL (1 hour)&lt;br /&gt;
                                 )&lt;br /&gt;
 &lt;br /&gt;
                         NS      hal.t0e.org.&lt;br /&gt;
 &lt;br /&gt;
 1                       PTR     fw.t0e.org.&lt;br /&gt;
 3                       PTR     hal.t0e.org.&lt;br /&gt;
&lt;br /&gt;
== Records ==&lt;br /&gt;
&lt;br /&gt;
Zone:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
zone &amp;quot;lab&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/db.lab&amp;quot;;&lt;br /&gt;
        allow-query { lindonlab; };&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Domain &amp;#039;lab&amp;#039;&lt;br /&gt;
@		IN SOA	ns.keylabs.com.	admin.keylabs.com. (&lt;br /&gt;
			2011052800      ; serial DONT FORGET CHANGE&lt;br /&gt;
			10800           ; Refresh after 3 hours&lt;br /&gt;
			3600            ; Retry after 1 hour&lt;br /&gt;
			604800          ; Expire after 1 week&lt;br /&gt;
			86400 )         ; Minimum TTL of 1 day&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;; KeyLabs Name servers&lt;br /&gt;
		IN	NS	ns.keylabs.com.&lt;br /&gt;
		IN	NS	ns2.keylabs.com.&lt;br /&gt;
&lt;br /&gt;
;; MX Record&lt;br /&gt;
		IN	MX 10	ASPMX.L.GOOGLE.COM.&lt;br /&gt;
&lt;br /&gt;
;; TXT Record&lt;br /&gt;
		IN 	TXT	v=spf1 include:_spf.google.com ~all&lt;br /&gt;
&lt;br /&gt;
;; Address Record&lt;br /&gt;
iso		IN	A	216.119.202.4&lt;br /&gt;
&lt;br /&gt;
;; Quick Subdomain&lt;br /&gt;
admin.tr	IN	A	216.119.202.4&lt;br /&gt;
&lt;br /&gt;
;; CNAME&lt;br /&gt;
files		IN	CNAME	iso    ;; cname to local domain&lt;br /&gt;
portal		IN	CNAME	oeey.com.    ;; notice end &amp;#039;.&amp;#039;&lt;br /&gt;
&lt;br /&gt;
;; PTR&lt;br /&gt;
1		IN	PTR	ws1.oeey.com.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reverse ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
zone &amp;quot;202.119.216.in-addr.arpa&amp;quot; {&lt;br /&gt;
	type master;&lt;br /&gt;
	file &amp;quot;/etc/bind/rev.202.119.216&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Domain &amp;#039;lab&amp;#039;&lt;br /&gt;
@		IN SOA	ns.keylabs.com.	admin.keylabs.com. (&lt;br /&gt;
			2011052800      ; serial DONT FORGET CHANGE&lt;br /&gt;
			10800           ; Refresh after 3 hours&lt;br /&gt;
			3600            ; Retry after 1 hour&lt;br /&gt;
			604800          ; Expire after 1 week&lt;br /&gt;
			86400 )         ; Minimum TTL of 1 day&lt;br /&gt;
&lt;br /&gt;
;; KeyLabs Name servers&lt;br /&gt;
		IN	NS	ns.keylabs.com.&lt;br /&gt;
		IN	NS	ns2.keylabs.com.&lt;br /&gt;
&lt;br /&gt;
;; reverse mapping&lt;br /&gt;
;; KeyLabs ( 216.119.192.0 - 216.119.192.253 )&lt;br /&gt;
1		IN	PTR	ws-192-1.keylabs.com.&lt;br /&gt;
2		IN	PTR	ws-192-2.keylabs.com.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Google Applications ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MX Server Settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; name			ttl class rr	pref name&lt;br /&gt;
; example.com.		IN  MX    10	mail.example.com.&lt;br /&gt;
&lt;br /&gt;
;;&lt;br /&gt;
;; GOOGLE APPS&lt;br /&gt;
;;&lt;br /&gt;
			IN MX 10	ASPMX.L.GOOGLE.COM.&lt;br /&gt;
			IN MX 20	ALT1.ASPMX.L.GOOGLE.COM.&lt;br /&gt;
			IN MX 20	ALT2.ASPMX.L.GOOGLE.COM.&lt;br /&gt;
			IN MX 30	ASPMX2.GOOGLEMAIL.COM.&lt;br /&gt;
			IN MX 30	ASPMX3.GOOGLEMAIL.COM.&lt;br /&gt;
			IN MX 30	ASPMX4.GOOGLEMAIL.COM.&lt;br /&gt;
			IN MX 30	ASPMX5.GOOGLEMAIL.COM.&lt;br /&gt;
			IN TXT		v=spf1 include:_spf.google.com ~all&lt;br /&gt;
calendar		CNAME		ghs.google.com.&lt;br /&gt;
docs			CNAME		ghs.google.com.&lt;br /&gt;
mail			CNAME		ghs.google.com.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Root Hints ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//   The &amp;#039;named.root&amp;#039; root cache hints zone for the bind DNS &amp;#039;named&amp;#039; nameserver.&lt;br /&gt;
//&lt;br /&gt;
//   named&amp;#039;s cache must be primed with the addresses of the root zone &amp;#039;.&amp;#039; nameservers.&lt;br /&gt;
//   The root zone file can be obtained by querying the root &amp;#039;A&amp;#039; nameserver:&lt;br /&gt;
//     $ dig . ns @198.41.0.4 &amp;gt; named.root&lt;br /&gt;
//   Or by download via FTP / HTTP:&lt;br /&gt;
//     $ wget ftp://ftp.rs.internic.net/domain/named.root&lt;br /&gt;
//&lt;br /&gt;
//   Every view that is to provide recursive service must include this zone.&lt;br /&gt;
//&lt;br /&gt;
zone &amp;quot;.&amp;quot; IN {&lt;br /&gt;
        type hint;&lt;br /&gt;
        file &amp;quot;named.root&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Secondary Name Server ==&lt;br /&gt;
&lt;br /&gt;
Install bind, bind tools, and config files:&lt;br /&gt;
 yum install bind bind-utils&lt;br /&gt;
&lt;br /&gt;
Get root hints:&lt;br /&gt;
 dig . ns @198.41.0.4 &amp;gt; /etc/named.root.hints&lt;br /&gt;
&lt;br /&gt;
/etc/named.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// general options&lt;br /&gt;
options&lt;br /&gt;
{&lt;br /&gt;
        // Those options should be used carefully because they disable port&lt;br /&gt;
        // randomization&lt;br /&gt;
        // query-source    port 53;&lt;br /&gt;
        // query-source-v6 port 53;&lt;br /&gt;
&lt;br /&gt;
        // Put files that named is allowed to write in the data/ directory:&lt;br /&gt;
        directory &amp;quot;/var/named&amp;quot;; // the default&lt;br /&gt;
        dump-file               &amp;quot;data/cache_dump.db&amp;quot;;&lt;br /&gt;
        statistics-file         &amp;quot;data/named_stats.txt&amp;quot;;&lt;br /&gt;
        memstatistics-file      &amp;quot;data/named_mem_stats.txt&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        allow-transfer { 216.119.206.253; };&lt;br /&gt;
        allow-recursion { 216.119.192.0/20; };&lt;br /&gt;
        version &amp;quot;Not disclosed&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// reduce log verbosity on issues outside our control&lt;br /&gt;
logging {&lt;br /&gt;
        category lame-servers { null; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// prime the server with knowledge of the root servers&lt;br /&gt;
zone &amp;quot;.&amp;quot; {&lt;br /&gt;
        type hint;&lt;br /&gt;
        file &amp;quot;/etc/named.root.hints&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// Reverse DNS&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;206.119.216.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type slave;&lt;br /&gt;
        file &amp;quot;slaves/rev.206.119.216.cache&amp;quot;;&lt;br /&gt;
        masters { 216.119.206.253; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// Oeey domains below here&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;oeey.com&amp;quot; {&lt;br /&gt;
        type slave;&lt;br /&gt;
        file &amp;quot;slaves/db.oeey.cache&amp;quot;;&lt;br /&gt;
        masters { 216.119.206.253; };&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Security ==&lt;br /&gt;
&lt;br /&gt;
[http://www.ops.ietf.org/dns/dynupd/secure-ddns-howto.html Secure dynamic DNS howto]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.cymru.com/Documents/secure-bind-template.html Secure BIND Template v7.1 14 May 2009 TEAM CYMRU noc@cymru.com]&lt;br /&gt;
&lt;br /&gt;
=== Hide Version ===&lt;br /&gt;
&lt;br /&gt;
Check Version:&lt;br /&gt;
 dig @[NS_SERVER] -c CH -t txt version.bind&lt;br /&gt;
 nslookup -q=txt -class=CHAOS version.bind. 0&lt;br /&gt;
 dig @nameserver version.bind txt chaos&lt;br /&gt;
 nslookup -type=txt -class=chaos version.bind nameserver&lt;br /&gt;
&lt;br /&gt;
 options&lt;br /&gt;
 {&lt;br /&gt;
         ...&lt;br /&gt;
         version &amp;quot;not disclosed&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 version &amp;quot;surely you must be joking&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* How To Hide BIND DNS Sever Version - http://www.cyberciti.biz/faq/hide-bind9-dns-sever-version/&lt;br /&gt;
* Determining/hiding BIND version number - http://www.brandonhutchinson.com/Determining_hiding_BIND_version_number.html&lt;br /&gt;
* The FreeBSD Diary -- What version of bind are you running? - http://www.freebsddiary.org/bind-version.php&lt;br /&gt;
&lt;br /&gt;
== Log Queries ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
logging&lt;br /&gt;
{&lt;br /&gt;
        /* ..... */&lt;br /&gt;
        channel query_log {&lt;br /&gt;
                //file &amp;quot;data/query.log&amp;quot;;&lt;br /&gt;
                syslog kern;&lt;br /&gt;
                severity debug;&lt;br /&gt;
        };&lt;br /&gt;
        category queries { query_log; };&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* DNS BIND logging Clause - http://www.zytrax.com/books/dns/ch7/logging.html&lt;br /&gt;
* Troubleshooting - https://help.ubuntu.com/8.04/serverguide/C/dns-troubleshooting.html&lt;br /&gt;
* Bind 9 query logging - https://lists.isc.org/pipermail/bind-users/2009-January/074967.html&lt;br /&gt;
&lt;br /&gt;
== Firewall ==&lt;br /&gt;
&lt;br /&gt;
DNS uses UDP port 53 [http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/2003-September/010027.html]&lt;br /&gt;
 iptables -A INPUT -p udp -i eth0 --destination-port 53 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
BUT:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Remember that queries can be TCP-based as well as UDP-based, so you must allow traffic from queriers to TCP port 53 as well as UDP port 53, and from your name server to TCP port 53.&amp;quot; [http://www.oreillynet.com/pub/a/network/excerpt/dnsbindcook_ch07/]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;By default host uses UDP when making queries. The -T option makes it use a TCP connection when querying the name server. TCP will be automatically selected for queries that require it, such as zone transfer (AXFR) requests.&amp;quot; [http://www.bind9.net/Bv9.6ARM.pdf]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Please note that here I&amp;#039;m not allowing TCP protocol as I don&amp;#039;t have secondary DNS server to do zone transfer. Please note if you have secondary server, add following rules to above rules so that secondary server can do zone transfer from primary DNS server...&amp;quot; http://www.cyberciti.biz/tips/linux-iptables-12-how-to-block-or-open-dnsbind-service-port-53.html]&lt;br /&gt;
&lt;br /&gt;
== IPv4 Only ==&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;-4&amp;quot; to the bind9 config&lt;br /&gt;
&lt;br /&gt;
/etc/default/bind9:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# run resolvconf?&lt;br /&gt;
RESOLVCONF=yes&lt;br /&gt;
# startup options for the server&lt;br /&gt;
OPTIONS=&amp;quot;-4 -u bind&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: [http://ubuntu-tutorials.com/2009/03/21/configure-bind-9-for-ipv4-or-ipv6-only/ Configure BIND 9 For IPv4 (or IPv6) Only | Ubuntu Tutorials]&lt;br /&gt;
&lt;br /&gt;
== Dynamic DNS ==&lt;br /&gt;
&lt;br /&gt;
Dynamic DNS (DDNS)&lt;br /&gt;
&lt;br /&gt;
See also [[dhcpd#Dynamic DNS]]&lt;br /&gt;
&lt;br /&gt;
/var/named/chroot/etc/named.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
zone &amp;quot;dnsknowledge.com&amp;quot; IN {&lt;br /&gt;
  type master;&lt;br /&gt;
  file &amp;quot;dnsknowledge.com.zone&amp;quot;;&lt;br /&gt;
  allow-update { key rndckey; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# reverse zone&lt;br /&gt;
zone &amp;quot;1.168.192.in-addr.arpa&amp;quot; IN {&lt;br /&gt;
  type master;&lt;br /&gt;
  file &amp;quot;1.168.192.in-addr.arpa.zone&amp;quot;;&lt;br /&gt;
  allow-update { key rndckey; };&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* CentOS Linux Setup Dynamic DNS (DDNS) - http://www.dnsknowledge.com/tutorials/centos-tutorials/bind-9/howto-setup-dynamic-dns-ddns/&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
===DNS Cache Poisoning Bug===&lt;br /&gt;
&lt;br /&gt;
Use:&lt;br /&gt;
         // query-source    port 53;&lt;br /&gt;
&lt;br /&gt;
how do I find out if my DNS server is open to such attack:&lt;br /&gt;
 $ dig +short @{name-server-ip} porttest.dns-oarc.net txt&lt;br /&gt;
 $ dig +short @ns1.example.com porttest.dns-oarc.net txt&lt;br /&gt;
 $ dig +short @208.67.222.222 porttest.dns-oarc.net txt&lt;br /&gt;
&lt;br /&gt;
Good:&lt;br /&gt;
 z.y.x.w.v.u.t.s.r.q.p.o.n.m.l.k.j.i.h.g.f.e.d.c.b.a.pt.dns-oarc.net.&lt;br /&gt;
 &amp;quot;208.67.222.222 is &amp;#039;&amp;#039;&amp;#039;GOOD&amp;#039;&amp;#039;&amp;#039;: 26 queries in 0.1 seconds from 26 ports with std dev 17746.18&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Bad:&lt;br /&gt;
 z.y.x.w.v.u.t.s.r.q.p.o.n.m.l.k.j.i.h.g.f.e.d.c.b.a.pt.dns-oarc.net.&lt;br /&gt;
 &amp;quot;125.22.47.139 is &amp;#039;&amp;#039;&amp;#039;POOR&amp;#039;&amp;#039;&amp;#039;: 42 queries in 8.4 seconds from 1 ports with std dev 0.00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
With nslookup:&lt;br /&gt;
 nslookup -type=txt -timeout=30 porttest.dns-oarc.net&lt;br /&gt;
 nslookup -type=txt -timeout=30 porttest.dns-oarc.net ns1.your-isp.com&lt;br /&gt;
 nslookup -type=txt -timeout=30 porttest.dns-oarc.net NS-SERVER-IP&lt;br /&gt;
&lt;br /&gt;
Tools:&lt;br /&gt;
*[http://www.doxpara.com/ DoxPara - DNS Checker]&lt;br /&gt;
&lt;br /&gt;
Information and Alerts:&lt;br /&gt;
*[http://www.linuxjournal.com/content/dns-bug-why-you-should-care The DNS Bug: Why You Should Care | Linux Journal]&lt;br /&gt;
*[http://www.linuxjournal.com/content/understanding-kaminskys-dns-bug Understanding Kaminsky&amp;#039;s DNS Bug | Linux Journal]&lt;br /&gt;
*[http://www.us-cert.gov/cas/techalerts/TA08-190B.html US-CERT Technical Cyber Security Alert TA08-190B -- Multiple DNS implementations vulnerable to cache poisoning]&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
*[http://www.cyberciti.biz/faq/dns-cache-poisoning-test/ Find Out If My DNS Server Free From DNS Cache Poisoning Bug Or Not]&lt;br /&gt;
*[http://www.cyberciti.biz/tips/windows-verify-dns-cache-posinging-bug.html Verify DNS Cache Poisoning Bug Using Windows XP / Vista / 2003 / 2008 System Command Prompt]&lt;br /&gt;
*[http://www.cyberciti.biz/tips/freebsd-bind-dns-cache-poisoning.html Security Alert: FreeBSD-SA-08:06.bind DNS cache Poisoning]&lt;br /&gt;
&lt;br /&gt;
===How do I share a dynamic zone between multiple views===&lt;br /&gt;
[http://www.isc.org/index.pl?/sw/bind/FAQ.php Frequently Asked Questions about BIND 9]:&lt;br /&gt;
 Q: How do I share a dynamic zone between multiple views?&lt;br /&gt;
 A: You choose one view to be master and the second a slave and transfer the zone between views. &lt;br /&gt;
&lt;br /&gt;
===Journal file creation failed===&lt;br /&gt;
When trying to add a new client record...&lt;br /&gt;
 Jun 16 10:23:09 hal named[29054]: client 127.0.0.1#32925: updating zone &amp;#039;t0e.org/IN&amp;#039;: adding an RR at &amp;#039;KENDAWG.t0e.org&amp;#039; A&lt;br /&gt;
 Jun 16 10:23:09 hal named[29054]: client 127.0.0.1#32925: updating zone &amp;#039;t0e.org/IN&amp;#039;: adding an RR at &amp;#039;KENDAWG.t0e.org&amp;#039; TXT&lt;br /&gt;
 Jun 16 10:23:09 hal named[29054]: journal file t0e.org.zone.jnl does not exist, creating it&lt;br /&gt;
 Jun 16 10:23:09 hal named[29054]: t0e.org.zone.jnl: create: permission denied&lt;br /&gt;
 Jun 16 10:23:09 hal named[29054]: client 127.0.0.1#32925: updating zone &amp;#039;t0e.org/IN&amp;#039;: error: journal open failed: unexpected error&lt;br /&gt;
 Jun 16 10:23:09 hal dhcpd: Unable to add forward map from KENDAWG.t0e.org to 10.10.10.229: timed out&lt;br /&gt;
&lt;br /&gt;
 #This did not work...&lt;br /&gt;
 #cd /var/named&lt;br /&gt;
 #touch t0e.org.zone.jnl&lt;br /&gt;
 #chown root:named t0e.org.zone.jnl&lt;br /&gt;
 #service named restart&lt;br /&gt;
&lt;br /&gt;
 #This did work...&lt;br /&gt;
 cd /var/&lt;br /&gt;
 chown -R named:named named&lt;br /&gt;
 service named restart&lt;br /&gt;
&lt;br /&gt;
===Unexpected RCODE (SERVFAIL)===&lt;br /&gt;
I get several RCODE error messages in the /var/log/messages log file.  These are caused by bad external name servers, not our DNS server.&lt;br /&gt;
&lt;br /&gt;
*[http://www.servertalk.in/ftopic4932.html How to Stop the &amp;quot;unexpected RCODE (SERVFAIL)&amp;quot; Messages?]&lt;br /&gt;
*[http://www.menandmice.com/knowledgehub/bindlogmsgs  Log messages for BIND 8 named, named-xfer, ndc and some for BIND 9]&lt;br /&gt;
&lt;br /&gt;
===Updating Zone Info===&lt;br /&gt;
This [http://www.webservertalk.com/archive69-2005-10-1228049.html article] may indicate a way to generate the .jnl files:&lt;br /&gt;
 nsupdate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important note: Editing the Zone files while dynamic updates are active...&amp;#039;&amp;#039;&amp;#039; [http://sipx-wiki.calivia.com/index.php/HowTo_Configure_DHCP_and_DNS_Servers]&lt;br /&gt;
&lt;br /&gt;
When dynamic update is enabled for a zone, the zone can no longer be manually edited as normal.&lt;br /&gt;
&lt;br /&gt;
The DNS server keeps a journal (.jnl) file of incoming updates. The file is not automatically syncronized with the zone file, but can be forced with the &amp;quot;rndc stop&amp;quot; command. Extreme care has to be exercised when manually updating a zone subject to dynamic updates.&lt;br /&gt;
&lt;br /&gt;
When using BIND 9.3 the following can be used, which does not require that named be stopped:&lt;br /&gt;
&lt;br /&gt;
  1. rndc freeze example.com&lt;br /&gt;
  2. edit the zone&lt;br /&gt;
  3. rndc unfreeze example.com&lt;br /&gt;
&lt;br /&gt;
Remember to increment the serial number in the zone file as you make changes.&lt;br /&gt;
&lt;br /&gt;
===Freeze failed not found===&lt;br /&gt;
 [root@fw ~]# rndc freeze&lt;br /&gt;
 rndc: &amp;#039;freeze&amp;#039; failed: unexpected end of input&lt;br /&gt;
 &lt;br /&gt;
 [root@fw ~]# rndc freeze t0e.org&lt;br /&gt;
 rndc: &amp;#039;freeze&amp;#039; failed: not found&lt;br /&gt;
 &lt;br /&gt;
 [root@fw ~]# rndc freeze t0e.org internal&lt;br /&gt;
 rndc: &amp;#039;freeze&amp;#039; failed: unknown class/type&lt;br /&gt;
&lt;br /&gt;
This is caused by the &amp;quot;view&amp;quot; configuration.&lt;br /&gt;
&lt;br /&gt;
[http://www.plug.org/pipermail/plug/2007-November/028407.html Unable to freeze zone - Bind DNS - problem with views?]&lt;br /&gt;
&lt;br /&gt;
[http://www.plug.org/pipermail/plug/2007-November/028417.html Unable to freeze zone - Bind DNS - problem with views? Reply]:&lt;br /&gt;
 rndc freeze t0e.org in internal&lt;br /&gt;
&lt;br /&gt;
=== client query (cache) denied ===&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
 ns named[13434]: client 65.46.140.82#36817: query (cache) &amp;#039;txfrwll/AAAA/IN&amp;#039; denied&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
*This means a recursive request came from the client and was denied.  This is good if the client is not an internal system.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
* If the client is an internal system that should allow for recursion, add it to the allow-recursion.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 allow-recursion { 10.0.0.0/8; };&lt;br /&gt;
&lt;br /&gt;
=== client update denied ===&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
 ns named[13434]: client 71.195.222.228#54866: update &amp;#039;keylabs.com/IN&amp;#039; denied&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
* Some client attempted to update your DNS records.  Bastards.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Someone is trying to update your DNS data using the RFC2136 Dynamic Update protocol.&amp;quot; [http://www.bind9.net/BIND-FAQ]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This is a &amp;quot;feature&amp;quot; of some (newer) windows versions, that try to register their name in the nameserver that they got configured (e.g. via dhcp). I think there is a registry key to disable this behaviour, this should help you to fix the problem.&amp;quot; [http://archive.cert.uni-stuttgart.de/suse-security/2003/09/msg00044.html]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
* If the client is a DHCP server that you want to allow an update DNS transfer through, add it to the allow-transfer:&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 allow-transfer { 216.119.202.2; }&lt;br /&gt;
&lt;br /&gt;
=== lame server resolving ===&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
 Sep 16 04:16:37 ns named[13434]: lame server resolving &amp;#039;networking.itags.org&amp;#039; (in &amp;#039;itags.org&amp;#039;?): 74.86.171.244#53&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
* &amp;quot;A lame server is one that&amp;#039;s not responding to a name request it is expected to handle. &amp;quot; [http://workbench.cadenhead.org/news/2802/my-name-server-totally-lame]&lt;br /&gt;
* &amp;quot;lame-servers - Lame servers. These are misconfigurations in remote servers, discovered by BIND 9 when trying to query those servers during resolution.&amp;quot; [http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
* If you don&amp;#039;t want to be notifed of these, you can turn off the logging of this event: [http://forums.deftechgroup.com/archive/index.php/t-600.html]&lt;br /&gt;
&lt;br /&gt;
 logging {&lt;br /&gt;
   // Do not log zones that aren&amp;#039;t registered in this server (lame servers)&lt;br /&gt;
   category lame-servers { null; };&lt;br /&gt;
  }; &lt;br /&gt;
&lt;br /&gt;
=== unexpected RCODE resolving ===&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
 Sep 16 04:33:55 ns named[13691]: unexpected RCODE (SERVFAIL) resolving &amp;#039;ns3.fs.net/A/IN&amp;#039;: 216.165.108.10#53&lt;br /&gt;
 Sep 16 04:33:55 ns named[13691]: unexpected RCODE (SERVFAIL) resolving &amp;#039;ns1.fs.net/A/IN&amp;#039;: 216.165.108.10#53&lt;br /&gt;
 Sep 16 04:33:55 ns named[13691]: unexpected RCODE (SERVFAIL) resolving &amp;#039;www.scs.stanford.edu/A/IN&amp;#039;: 216.165.108.10#53&lt;br /&gt;
&lt;br /&gt;
 Sep 16 06:57:43 ns named[13691]: unexpected RCODE (REFUSED) resolving &amp;#039;gapingvoid.com/A/IN&amp;#039;: 87.117.237.205#53&lt;br /&gt;
 Sep 16 06:57:43 ns named[13691]: unexpected RCODE (REFUSED) resolving &amp;#039;gapingvoid.com/A/IN&amp;#039;: 87.117.237.66#53&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
* Problems with external Name Servers&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
* Nothing you can do.  You can hide &amp;quot;lame-servers&amp;quot; which should hide this error.&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
*[http://www.kholix.com/wiki/index.php/Unexpected_rcode_%28SERVFAIL%29 Unexpected rcode (SERVFAIL) - KhoLiX Wiki]&lt;br /&gt;
&lt;br /&gt;
== underscore - bad owner name ==&lt;br /&gt;
&lt;br /&gt;
Record:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a_b     A  10.1.1.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 fio.onpar.net.zone:37: a_b.fio.onpar.net: bad owner name (check-names)&lt;br /&gt;
 zone fio.onpar.net/IN: loading master file fio.onpar.net.zone: bad owner name (check-names)&lt;br /&gt;
 _default/fio.onpar.net/IN: bad owner name (check-names)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
* Bind doesn&amp;#039;t like underscores, but you can get around this by using the full domain name:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a_b.fio.onpar.net     A  10.1.1.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration Defaults ==&lt;br /&gt;
&lt;br /&gt;
===Default named.conf===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
// Sample named.conf BIND DNS server &amp;#039;named&amp;#039; configuration file&lt;br /&gt;
// for the Red Hat BIND distribution.&lt;br /&gt;
//&lt;br /&gt;
// See the BIND Administrator&amp;#039;s Reference Manual (ARM) for details, in:&lt;br /&gt;
//   file:///usr/share/doc/bind-*/arm/Bv9ARM.html&lt;br /&gt;
// Also see the BIND Configuration GUI : /usr/bin/system-config-bind and &lt;br /&gt;
// its manual.&lt;br /&gt;
//&lt;br /&gt;
options&lt;br /&gt;
{&lt;br /&gt;
	/* make named use port 53 for the source of all queries, to allow&lt;br /&gt;
         * firewalls to block all ports except 53:&lt;br /&gt;
         */&lt;br /&gt;
	query-source    port 53;	&lt;br /&gt;
	query-source-v6 port 53;&lt;br /&gt;
	&lt;br /&gt;
	// Put files that named is allowed to write in the data/ directory:&lt;br /&gt;
	directory &amp;quot;/var/named&amp;quot;; // the default&lt;br /&gt;
	dump-file 		&amp;quot;data/cache_dump.db&amp;quot;;&lt;br /&gt;
        statistics-file 	&amp;quot;data/named_stats.txt&amp;quot;;&lt;br /&gt;
        memstatistics-file 	&amp;quot;data/named_mem_stats.txt&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
logging &lt;br /&gt;
{&lt;br /&gt;
/*      If you want to enable debugging, eg. using the &amp;#039;rndc trace&amp;#039; command,&lt;br /&gt;
 *      named will try to write the &amp;#039;named.run&amp;#039; file in the $directory (/var/named).&lt;br /&gt;
 *      By default, SELinux policy does not allow named to modify the /var/named directory,&lt;br /&gt;
 *      so put the default debug log file in data/ :&lt;br /&gt;
 */&lt;br /&gt;
        channel default_debug {&lt;br /&gt;
                file &amp;quot;data/named.run&amp;quot;;&lt;br /&gt;
                severity dynamic;&lt;br /&gt;
        };	&lt;br /&gt;
};&lt;br /&gt;
//&lt;br /&gt;
// All BIND 9 zones are in a &amp;quot;view&amp;quot;, which allow different zones to be served&lt;br /&gt;
// to different types of client addresses, and for options to be set for groups&lt;br /&gt;
// of zones.&lt;br /&gt;
//&lt;br /&gt;
// By default, if named.conf contains no &amp;quot;view&amp;quot; clauses, all zones are in the &lt;br /&gt;
// &amp;quot;default&amp;quot; view, which matches all clients.&lt;br /&gt;
// &lt;br /&gt;
// If named.conf contains any &amp;quot;view&amp;quot; clause, then all zones MUST be in a view; &lt;br /&gt;
// so it is recommended to start off using views to avoid having to restructure&lt;br /&gt;
// your configuration files in the future.&lt;br /&gt;
//&lt;br /&gt;
view &amp;quot;localhost_resolver&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
/* This view sets up named to be a localhost resolver ( caching only nameserver ).&lt;br /&gt;
 * If all you want is a caching-only nameserver, then you need only define this view:&lt;br /&gt;
 */&lt;br /&gt;
	match-clients 		{ localhost; };&lt;br /&gt;
	match-destinations	{ localhost; };&lt;br /&gt;
	recursion yes;&lt;br /&gt;
	# all views must contain the root hints zone:&lt;br /&gt;
	include &amp;quot;/etc/named.root.hints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        /* these are zones that contain definitions for all the localhost&lt;br /&gt;
         * names and addresses, as recommended in RFC1912 - these names should&lt;br /&gt;
	 * ONLY be served to localhost clients:&lt;br /&gt;
	 */&lt;br /&gt;
	include &amp;quot;/etc/named.rfc1912.zones&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
view &amp;quot;internal&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
/* This view will contain zones you want to serve only to &amp;quot;internal&amp;quot; clients&lt;br /&gt;
   that connect via your directly attached LAN interfaces - &amp;quot;localnets&amp;quot; .&lt;br /&gt;
 */&lt;br /&gt;
	match-clients		{ localnets; };&lt;br /&gt;
	match-destinations	{ localnets; };&lt;br /&gt;
	recursion yes;&lt;br /&gt;
	// all views must contain the root hints zone:&lt;br /&gt;
	include &amp;quot;/etc/named.root.hints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        // include &amp;quot;named.rfc1912.zones&amp;quot;;&lt;br /&gt;
	// you should not serve your rfc1912 names to non-localhost clients.&lt;br /&gt;
 &lt;br /&gt;
	// These are your &amp;quot;authoritative&amp;quot; internal zones, and would probably&lt;br /&gt;
	// also be included in the &amp;quot;localhost_resolver&amp;quot; view above :&lt;br /&gt;
&lt;br /&gt;
	zone &amp;quot;my.internal.zone&amp;quot; { &lt;br /&gt;
		type master;&lt;br /&gt;
		file &amp;quot;my.internal.zone.db&amp;quot;;&lt;br /&gt;
	};&lt;br /&gt;
	zone &amp;quot;my.slave.internal.zone&amp;quot; {&lt;br /&gt;
		type slave;&lt;br /&gt;
		file &amp;quot;slaves/my.slave.internal.zone.db&amp;quot;;&lt;br /&gt;
		masters { /* put master nameserver IPs here */ 127.0.0.1; } ;&lt;br /&gt;
		// put slave zones in the slaves/ directory so named can update them&lt;br /&gt;
	};	&lt;br /&gt;
	zone &amp;quot;my.ddns.internal.zone&amp;quot; {&lt;br /&gt;
		type master;&lt;br /&gt;
		allow-update { key ddns_key; };&lt;br /&gt;
		file &amp;quot;slaves/my.ddns.internal.zone.db&amp;quot;;&lt;br /&gt;
		// put dynamically updateable zones in the slaves/ directory so named can update them&lt;br /&gt;
	};			&lt;br /&gt;
};&lt;br /&gt;
key ddns_key&lt;br /&gt;
{&lt;br /&gt;
	algorithm hmac-md5;&lt;br /&gt;
	secret &amp;quot;use /usr/sbin/dns-keygen to generate TSIG keys&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
view    &amp;quot;external&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
/* This view will contain zones you want to serve only to &amp;quot;external&amp;quot; clients&lt;br /&gt;
 * that have addresses that are not on your directly attached LAN interface subnets:&lt;br /&gt;
 */&lt;br /&gt;
	match-clients		{ !localnets; !localhost; };&lt;br /&gt;
	match-destinations	{ !localnets; !localhost; };&lt;br /&gt;
&lt;br /&gt;
	recursion no;&lt;br /&gt;
	// you&amp;#039;d probably want to deny recursion to external clients, so you don&amp;#039;t&lt;br /&gt;
        // end up providing free DNS service to all takers&lt;br /&gt;
&lt;br /&gt;
	// all views must contain the root hints zone:&lt;br /&gt;
	include &amp;quot;/etc/named.root.hints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	// These are your &amp;quot;authoritative&amp;quot; external zones, and would probably&lt;br /&gt;
        // contain entries for just your web and mail servers:&lt;br /&gt;
&lt;br /&gt;
	zone &amp;quot;my.external.zone&amp;quot; { &lt;br /&gt;
		type master;&lt;br /&gt;
		file &amp;quot;my.external.zone.db&amp;quot;;&lt;br /&gt;
	};&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>