head	1.5;
access;
symbols
	RELENG_8_4:1.5.0.8
	RELENG_9_1_0_RELEASE:1.5
	RELENG_9_1:1.5.0.6
	RELENG_9_1_BP:1.5
	RELENG_8_3_0_RELEASE:1.3.2.2
	RELENG_8_3:1.3.2.2.0.6
	RELENG_8_3_BP:1.3.2.2
	RELENG_9_0_0_RELEASE:1.5
	RELENG_9_0:1.5.0.4
	RELENG_9_0_BP:1.5
	RELENG_9:1.5.0.2
	RELENG_9_BP:1.5
	RELENG_7_4_0_RELEASE:1.1.1.6.2.3
	RELENG_8_2_0_RELEASE:1.3.2.2
	RELENG_7_4:1.1.1.6.2.3.0.2
	RELENG_7_4_BP:1.1.1.6.2.3
	RELENG_8_2:1.3.2.2.0.4
	RELENG_8_2_BP:1.3.2.2
	RELENG_8_1_0_RELEASE:1.3.2.2
	RELENG_8_1:1.3.2.2.0.2
	RELENG_8_1_BP:1.3.2.2
	RELENG_7_3_0_RELEASE:1.1.1.6.2.2.4.1
	RELENG_7_3:1.1.1.6.2.2.0.4
	RELENG_7_3_BP:1.1.1.6.2.2
	RELENG_8_0_0_RELEASE:1.3
	RELENG_8_0:1.3.0.4
	RELENG_8_0_BP:1.3
	RELENG_8:1.3.0.2
	RELENG_8_BP:1.3
	RELENG_7_2_0_RELEASE:1.1.1.6.2.2
	RELENG_7_2:1.1.1.6.2.2.0.2
	RELENG_7_2_BP:1.1.1.6.2.2
	RELENG_7_1_0_RELEASE:1.1.1.6.2.1
	RELENG_6_4_0_RELEASE:1.1.1.2.2.4
	RELENG_7_1:1.1.1.6.2.1.0.4
	RELENG_7_1_BP:1.1.1.6.2.1
	RELENG_6_4:1.1.1.2.2.4.0.2
	RELENG_6_4_BP:1.1.1.2.2.4
	RELENG_7_0_0_RELEASE:1.1.1.6.2.1
	RELENG_6_3_0_RELEASE:1.1.1.2.2.3
	RELENG_7_0:1.1.1.6.2.1.0.2
	RELENG_7_0_BP:1.1.1.6.2.1
	BIND_9_4_2:1.1.1.7
	RELENG_6_3:1.1.1.2.2.3.0.2
	RELENG_6_3_BP:1.1.1.2.2.3
	RELENG_7:1.1.1.6.0.2
	RELENG_7_BP:1.1.1.6
	BIND_9_4_1_P1:1.1.1.6
	BIND_9_4_1:1.1.1.6
	BIND_9_3_4:1.1.1.5
	RELENG_6_2_0_RELEASE:1.1.1.2.2.1.4.1
	BIND_9_3_3:1.1.1.4
	RELENG_6_2:1.1.1.2.2.1.0.4
	RELENG_6_2_BP:1.1.1.2.2.1
	RELENG_5_5_0_RELEASE:1.1.1.1.2.3
	RELENG_5_5:1.1.1.1.2.3.0.2
	RELENG_5_5_BP:1.1.1.1.2.3
	RELENG_6_1_0_RELEASE:1.1.1.2.2.1
	RELENG_6_1:1.1.1.2.2.1.0.2
	RELENG_6_1_BP:1.1.1.2.2.1
	BIND_9_3_2:1.1.1.3
	RELENG_6_0_0_RELEASE:1.1.1.2
	RELENG_6_0:1.1.1.2.0.4
	RELENG_6_0_BP:1.1.1.2
	RELENG_6:1.1.1.2.0.2
	RELENG_6_BP:1.1.1.2
	RELENG_5_4_0_RELEASE:1.1.1.1.2.2
	RELENG_5_4:1.1.1.1.2.2.0.2
	RELENG_5_4_BP:1.1.1.1.2.2
	BIND_9_3_1:1.1.1.2
	RELENG_5_3_0_RELEASE:1.1.1.1.2.1
	RELENG_5_3:1.1.1.1.2.1.0.2
	RELENG_5_3_BP:1.1.1.1.2.1
	RELENG_5:1.1.1.1.0.2
	BIND_9_3_0:1.1.1.1
	BIND_9_3_0_RC4:1.1.1.1
	ISC:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2010.03.03.05.45.24;	author dougb;	state Exp;
branches
	1.5.2.1
	1.5.8.1;
next	1.4;

1.4
date	2010.01.25.06.18.31;	author dougb;	state Exp;
branches;
next	1.3;

1.3
date	2009.05.31.05.42.58;	author dougb;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2008.12.23.22.47.56;	author dougb;	state Exp;
branches;
next	1.1;

1.1
date	2004.09.19.01.30.02;	author trhodes;	state Exp;
branches
	1.1.1.1;
next	;

1.5.2.1
date	2013.08.16.08.01.49;	author svnexp;	state Exp;
branches;
next	;

1.5.8.1
date	2010.03.03.05.45.24;	author svnexp;	state dead;
branches;
next	1.5.8.2;

1.5.8.2
date	2013.03.28.13.00.18;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2010.02.07.20.28.24;	author dougb;	state Exp;
branches;
next	1.3.2.2;

1.3.2.2
date	2010.03.29.06.31.58;	author dougb;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2014.03.03.10.23.38;	author svnexp;	state Exp;
branches;
next	;

1.1.1.1
date	2004.09.19.01.30.02;	author trhodes;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;

1.1.1.2
date	2005.03.17.08.02.12;	author dougb;	state Exp;
branches
	1.1.1.2.2.1;
next	1.1.1.3;

1.1.1.3
date	2005.12.29.04.21.47;	author dougb;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2006.12.10.07.06.00;	author dougb;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2007.01.29.18.31.19;	author dougb;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2007.06.02.23.20.54;	author dougb;	state Exp;
branches
	1.1.1.6.2.1;
next	1.1.1.7;

1.1.1.7
date	2007.12.02.19.09.42;	author dougb;	state Exp;
branches;
next	;

1.1.1.1.2.1
date	2004.09.26.03.09.30;	author des;	state Exp;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2005.03.23.18.16.23;	author dougb;	state Exp;
branches;
next	1.1.1.1.2.3;

1.1.1.1.2.3
date	2006.01.14.10.41.57;	author dougb;	state Exp;
branches;
next	1.1.1.1.2.4;

1.1.1.1.2.4
date	2006.12.13.09.57.00;	author dougb;	state Exp;
branches;
next	1.1.1.1.2.5;

1.1.1.1.2.5
date	2007.02.07.00.46.33;	author dougb;	state Exp;
branches;
next	;

1.1.1.2.2.1
date	2006.01.14.10.13.33;	author dougb;	state Exp;
branches
	1.1.1.2.2.1.4.1;
next	1.1.1.2.2.2;

1.1.1.2.2.2
date	2006.12.13.09.46.47;	author dougb;	state Exp;
branches;
next	1.1.1.2.2.3;

1.1.1.2.2.3
date	2007.02.07.00.42.07;	author dougb;	state Exp;
branches;
next	1.1.1.2.2.4;

1.1.1.2.2.4
date	2008.06.03.05.38.10;	author dougb;	state Exp;
branches;
next	1.1.1.2.2.5;

1.1.1.2.2.5
date	2009.01.10.04.30.27;	author dougb;	state Exp;
branches;
next	;

1.1.1.2.2.1.4.1
date	2006.12.13.09.52.14;	author dougb;	state Exp;
branches;
next	;

1.1.1.6.2.1
date	2007.12.07.08.31.04;	author dougb;	state Exp;
branches;
next	1.1.1.6.2.2;

1.1.1.6.2.2
date	2009.01.10.03.00.21;	author dougb;	state Exp;
branches
	1.1.1.6.2.2.4.1;
next	1.1.1.6.2.3;

1.1.1.6.2.3
date	2010.02.16.05.14.51;	author dougb;	state Exp;
branches;
next	;

1.1.1.6.2.2.4.1
date	2010.02.16.18.10.35;	author dougb;	state Exp;
branches;
next	;


desc
@@


1.5
log
@SVN rev 204619 on 2010-03-03 05:45:24Z by dougb

Upgrade to version 9.6.2. This version includes all previously released
security patches to the 9.6.1 version, as well as many other bug fixes.

This version also incorporates a different fix for the problem we had
patched in contrib/bind9/bin/dig/dighost.c, so that file is now back
to being the same as the vendor version.

Due to the fact that the DNSSEC algorithm that will be used to sign the
root zone is only included in this version and in 9.7.x those who wish
to do validation MUST upgrade to one of these prior to July 2010.
@
text
@Frequently Asked Questions about BIND 9

Copyright  2004-2010 Internet Systems Consortium, Inc. ("ISC")

Copyright  2000-2003 Internet Software Consortium.

-----------------------------------------------------------------------

1. Compilation and Installation Questions

Q: I'm trying to compile BIND 9, and "make" is failing due to files not
   being found. Why?

A: Using a parallel or distributed "make" to build BIND 9 is not
   supported, and doesn't work. If you are using one of these, use normal
   make or gmake instead.

Q: Isn't "make install" supposed to generate a default named.conf?

A: Short Answer: No.

   Long Answer: There really isn't a default configuration which fits any
   site perfectly. There are lots of decisions that need to be made and
   there is no consensus on what the defaults should be. For example
   FreeBSD uses /etc/namedb as the location where the configuration files
   for named are stored. Others use /var/named.

   What addresses to listen on? For a laptop on the move a lot you may
   only want to listen on the loop back interfaces.

   Who do you offer recursive service to? Is there are firewall to
   consider? If so is it stateless or stateful. Are you directly on the
   Internet? Are you on a private network? Are you on a NAT'd network? The
   answers to all these questions change how you configure even a caching
   name server.

2. Configuration and Setup Questions

Q: Why does named log the warning message "no TTL specified - using SOA
   MINTTL instead"?

A: Your zone file is illegal according to RFC1035. It must either have a
   line like:

   $TTL 86400

   at the beginning, or the first record in it must have a TTL field, like
   the "84600" in this example:

   example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )

Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master
   file bar: ran out of space"?

A: This is often caused by TXT records with missing close quotes. Check
   that all TXT records containing quoted strings have both open and close
   quotes.

Q: How do I restrict people from looking up the server version?

A: Put a "version" option containing something other than the real version
   in the "options" section of named.conf. Note doing this will not
   prevent attacks and may impede people trying to diagnose problems with
   your server. Also it is possible to "fingerprint" nameservers to
   determine their version.

Q: How do I restrict only remote users from looking up the server version?

A: The following view statement will intercept lookups as the internal
   view that holds the version information will be matched last. The
   caveats of the previous answer still apply, of course.

   view "chaos" chaos {
           match-clients { <those to be refused>; };
           allow-query { none; };
           zone "." {
                   type hint;
                   file "/dev/null";  // or any empty file
           };
   };

Q: What do "no source of entropy found" or "could not open entropy source
   foo" mean?

A: The server requires a source of entropy to perform certain operations,
   mostly DNSSEC related. These messages indicate that you have no source
   of entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the
   random-device option in named.conf.

Q: I'm trying to use TSIG to authenticate dynamic updates or zone
   transfers. I'm sure I have the keys set up correctly, but the server is
   rejecting the TSIG. Why?

A: This may be a clock skew problem. Check that the the clocks on the
   client and server are properly synchronised (e.g., using ntp).

Q: I see a log message like the following. Why?

   couldn't open pid file '/var/run/named.pid': Permission denied

A: You are most likely running named as a non-root user, and that user
   does not have permission to write in /var/run. The common ways of
   fixing this are to create a /var/run/named directory owned by the named
   user and set pid-file to "/var/run/named/named.pid", or set pid-file to
   "named.pid", which will put the file in the directory specified by the
   directory option (which, in this case, must be writable by the named
   user).

Q: I can query the nameserver from the nameserver but not from other
   machines. Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external
   view at the same time? When I tried, both views on the slave were
   transferred from the same view on the master.

A: You will need to give the master and slave multiple IP addresses and
   use those to make sure you reach the correct view on the other machine.

   Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
                   notify-source 10.0.1.1;
                   transfer-source 10.0.1.1;
                   query-source address 10.0.1.1;
       external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.2;
           transfer-source 10.0.1.2;
           query-source address 10.0.1.2;

   Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
           notify-source 10.0.1.3;
           transfer-source 10.0.1.3;
           query-source address 10.0.1.3;
      external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.4;
           transfer-source 10.0.1.4;
           query-source address 10.0.1.4;

   You put the external address on the alias so that all the other dns
   clients on these boxes see the internal view by default.

A: BIND 9.3 and later: Use TSIG to select the appropriate view.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; // reject message ment for the
                                                  // external view.
                                   10.0.1/24; };  // accept from these addresses.
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.1.2 { keys external; };  // tag messages from the
                                                        // external view to the
                                                        // other servers for the
                                                        // view.
                   recursion no;
                   ...
           };

   Slave 10.0.1.2:
           key "external" {
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.1.1 { keys external; };
                   recursion no;
                   ...
           };

Q: I get error messages like "multiple RRs of singleton type" and "CNAME
   and other data" when transferring a zone. What does this mean?

A: These indicate a malformed master zone. You can identify the exact
   records involved by transferring the zone using dig then running
   named-checkzone on it.

   dig axfr example.com @@master-server > tmp
   named-checkzone example.com tmp

   A CNAME record cannot exist with the same name as another record except
   for the DNSSEC records which prove its existence (NSEC).

   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other
   data should be present; this ensures that the data for a canonical name
   and its aliases cannot be different. This rule also insures that a
   cached CNAME can be used without checking with an authoritative server
   for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input"
   where 99 is the last line of named.conf.

A: There are unbalanced quotes in named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title
   indication (e.g. CR/LF) on the last line of a text file. This can be
   fixed by "adding" a blank line to the end of the file. Named expects to
   see EOF immediately after EOL and treats text files where this is not
   met as truncated.

Q: How do I share a dynamic zone between multiple views?

A: You choose one view to be master and the second a slave and transfer
   the zone between views.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
           };

           key "mykey" {
                   algorithm hmac-sha256;
                   secret "yyyyyyyyyyyyyyyyyyyyyyyy";
           };

           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   server 10.0.1.1 {
                           /* Deliver notify messages to external view. */
                           keys { external; };
                   };
                   zone "example.com" {
                           type master;
                           file "internal/example.db";
                           allow-update { key mykey; };
                           also-notify { 10.0.1.1; };
                   };
           };

           view "external" {
                   match-clients { key external; any; };
                   zone "example.com" {
                           type slave;
                           file "external/example.db";
                           masters { 10.0.1.1; };
                           transfer-source 10.0.1.1;
                           // allow-update-forwarding { any; };
                           // allow-notify { ... };
                   };
           };

Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
   master file primaries/wireless.ietf56.ietf.org: no owner".

A: This error is produced when a line in the master file contains leading
   white space (tab/space) but the is no current record owner name to
   inherit the name from. Usually this is the result of putting white
   space before a comment, forgetting the "@@" for the SOA record, or
   indenting the master file.

Q: Why are my logs in GMT (UTC).

A: You are running chrooted (-t) and have not supplied local timezone
   information in the chroot area.

   FreeBSD: /etc/localtime
   Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
   OSF: /etc/zoneinfo/localtime

   See also tzset(3) and zic(8).

Q: I get "rndc: connect failed: connection refused" when I try to run
   rndc.

A: This is usually a configuration error.

   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by
   "rndc-confgen -a", rndc-confgen or manually. The Administrators
   Reference manual has details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /
   etc/rndc.conf for the default server. Update /etc/rndc.conf if
   necessary so that the default server listed in /etc/rndc.conf matches
   the addresses used in named.conf. "localhost" has two address
   (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure
   that /etc/rndc.conf has the correct ownership and that a copy is in the
   chroot area. You can do this by re-running "rndc-confgen -a" with
   appropriate -t and -u arguments.

Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
   receiving responses: permission denied" error messages.

A: These indicate a filesystem permission error preventing named creating
   / renaming the temporary file. These will usually also have other
   associated error messages like

   "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"

   Named needs write permission on the directory containing the file.
   Named writes the new cache file to a temporary file then renames it to
   the name specified in named.conf to ensure that the contents are always
   complete. This is to prevent named loading a partial zone in the event
   of power failure or similar interrupting the write of the master file.

   Note file names are relative to the directory specified in options and
   any chroot directory ([<chroot dir>/][<options dir>]).

   If named is invoked as "named -t /chroot/DNS" with the following
   named.conf then "/chroot/DNS/var/named/sl" needs to be writable by the
   user named is running as.

   options {
           directory "/var/named";
   };

   zone "example.net" {
           type slave;
           file "sl/example.net";
           masters { 192.168.4.12; };
   };

Q: I want to forward all DNS queries from my caching nameserver to another
   server. But there are some domains which have to be served locally, via
   rbldnsd.

   How do I achieve this ?

A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Can you help me understand how BIND 9 uses memory to store DNS zones?

   Some times it seems to take several times the amount of memory it needs
   to store the zone.

A: When reloading a zone named my have multiple copies of the zone in
   memory at one time. The zone it is serving and the one it is loading.
   If reloads are ultra fast it can have more still.

   e.g. Ones that are transferring out, the one that it is serving and the
   one that is loading.

   BIND 8 destroyed the zone before loading and also killed off outgoing
   transfers of the zone.

   The new strategy allows slaves to get copies of the new zone regardless
   of how often the master is loaded compared to the transfer time. The
   slave might skip some intermediate versions but the transfers will
   complete and it will keep reasonably in sync with the master.

   The new strategy also allows the master to recover from syntax and
   other errors in the master file as it still has an in-core copy of the
   old contents.

Q: I want to use IPv6 locally but I don't have a external IPv6 connection.
   External lookups are slow.

A: You can use server clauses to stop named making external lookups over
   IPv6.

   server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
   server ::/0 { bogus yes; };

3. Operations Questions

Q: How to change the nameservers for a zone?

A: Step 1: Ensure all nameservers, new and old, are serving the same zone
   content.

   Step 2: Work out the maximum TTL of the NS RRset in the parent and
   child zones. This is the time it will take caches to be clear of a
   particular version of the NS RRset. If you are just removing
   nameservers you can skip to Step 6.

   Step 3: Add new nameservers to the NS RRset for the zone and wait until
   all the servers for the zone are answering with this new NS RRset.

   Step 4: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 5: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long. If you are just adding nameservers you are done.

   Step 6: Remove any old nameservers from the zones NS RRset and wait for
   all the servers for the zone to be serving the new NS RRset.

   Step 7: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 8: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long.

   Step 9: Turn off the old nameservers or remove the zone entry from the
   configuration of the old nameservers.

   Step 10: Increment the serial number and wait for the change to be
   visible in all nameservers for the zone. This ensures that zone
   transfers are still working after the old servers are decommissioned.

   Note: the above procedure is designed to be transparent to dns clients.
   Decommissioning the old servers too early will result in some clients
   not being able to look up answers in the zone.

   Note: while it is possible to run the addition and removal stages
   together it is not recommended.

4. General Questions

Q: I keep getting log messages like the following. Why?

   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
   update failed: 'RRset exists (value dependent)' prerequisite not
   satisfied (NXRRSET)

A: DNS updates allow the update request to test to see if certain
   conditions are met prior to proceeding with the update. The message
   above is saying that conditions were not met and the update is not
   proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.

Q: I keep getting log messages like the following. Why?

   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied

A: Someone is trying to update your DNS data using the RFC2136 Dynamic
   Update protocol. Windows 2000 machines have a habit of sending dynamic
   update requests to DNS servers without being specifically configured to
   do so. If the update requests are coming from a Windows 2000 machine,
   see <http://support.microsoft.com/support/kb/articles/q246/8/04.asp>
   for information about how to turn them off.

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of
   the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
   makes to avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a
   root server, and these records are eligible for inclusion as additional
   data in responses. Subsequently it receives a subset of the root server
   addresses as additional data in a non-authoritative (referral) response
   from a root server. This causes the addresses to now be considered
   non-authoritative (glue) data, which is not eligible for inclusion in
   responses.

   The server does have a complete set of root server addresses cached at
   all times, it just may not include all of them as additional data,
   depending on whether they were last received as answers or as glue. You
   can always look up the addresses with explicit queries like "dig
   a.root-servers.net A".

Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?

A: A zone can be updated either by editing zone files and reloading the
   server or by dynamic update, but not both. If you have enabled dynamic
   update for a zone using the "allow-update" option, you are not supposed
   to edit the zone file by hand, and the server will not attempt to
   reload it.

Q: Why is named listening on UDP port other than 53?

A: Named uses a system selected port to make queries of other nameservers.
   This behaviour can be overridden by using query-source to lock down the
   port and/or address. See also notify-source and transfer-source.

Q: I get warning messages like "zone example.com/IN: refresh: failure
   trying master 1.2.3.4#53: timed out".

A: Check that you can make UDP queries from the slave to the master

   dig +norec example.com soa @@1.2.3.4

   You could be generating queries faster than the slave can cope with.
   Lower the serial query rate.

   serial-query-rate 5; // default 20

Q: I don't get RRSIG's returned when I use "dig +dnssec".

A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).

Q: Can a NS record refer to a CNAME.

A: No. The rules for glue (copies of the *address* records in the parent
   zones) and additional section processing do not allow it to work.

   You would have to add both the CNAME and address records (A/AAAA) as
   glue to the parent zone and have CNAMEs be followed when doing
   additional section processing to make it work. No nameserver
   implementation supports either of these requirements.

Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
   mean?

A: If the IN-ADDR.ARPA name covered refers to a internal address space you
   are using then you have failed to follow RFC 1918 usage rules and are
   leaking queries to the Internet. You should establish your own zones
   for these addresses to prevent you querying the Internet's name servers
   for these addresses. Please see <http://as112.net/> for details of the
   problems you are causing and the counter measures that have had to be
   deployed.

   If you are not using these private addresses then a client has queried
   for them. You can just ignore the messages, get the offending client to
   stop sending you these messages as they are most probably leaking them
   or setup your own zones empty zones to serve answers to these queries.

   zone "10.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "16.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   ...

   zone "31.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "168.192.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   empty:
   @@ 10800 IN SOA <name-of-server>. <contact-email>. (
                  1 3600 1200 604800 10800 )
   @@ 10800 IN NS <name-of-server>.

   Note

   Future versions of named are likely to do this automatically.

Q: Will named be affected by the 2007 changes to daylight savings rules in
   the US.

A: No, so long as the machines internal clock (as reported by "date -u")
   remains at UTC. The only visible change if you fail to upgrade your OS,
   if you are in a affected area, will be that log messages will be a hour
   out during the period where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the
   conversion rules from UTC to local time. Normally this involves
   updating a file in /etc (which sets the default timezone for the
   machine) and possibly a directory which has all the conversion rules
   for the world (e.g. /usr/share/zoneinfo). When updating the OS do not
   forget to update any chroot areas as well. See your OS's documentation
   for more details.

   The local timezone conversion rules can also be done on a individual
   basis by setting the TZ environment variable appropriately. See your
   OS's documentation for more details.

Q: Is there a bugzilla (or other tool) database that mere mortals can have
   (read-only) access to for bind?

A: No. The BIND 9 bug database is kept closed for a number of reasons.
   These include, but are not limited to, that the database contains
   proprietory information from people reporting bugs. The database has in
   the past and may in future contain unfixed bugs which are capable of
   bringing down most of the Internet's DNS infrastructure.

   The release pages for each version contain up to date lists of bugs
   that have been fixed post release. That is as close as we can get to
   providing a bug database.

Q: Why do queries for NSEC3 records fail to return the NSEC3 record?

A: NSEC3 records are strictly meta data and can only be returned in the
   authority section. This is done so that signing the zone using NSEC3
   records does not bring names into existence that do not exist in the
   unsigned version of the zone.

5. Operating-System Specific Questions

5.1. HPUX

Q: I get the following error trying to configure BIND:

   checking if unistd.h or sys/types.h defines fd_set... no
   configure: error: need either working unistd.h or sys/select.h

A: You have attempted to configure BIND with the bundled C compiler. This
   compiler does not meet the minimum compiler requirements to for
   building BIND. You need to install a ANSI C compiler and / or teach
   configure how to find the ANSI C compiler. The later can be done by
   adjusting the PATH environment variable and / or specifying the
   compiler via CC.

   ./configure CC=<compiler> ...

5.2. Linux

Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=
   2>

Q: Why does named lock up when it attempts to connect over IPSEC tunnels?

A: This is due to a kernel bug where the fact that a socket is marked
   non-blocking is ignored. It is reported that setting xfrm_larval_drop
   to 1 helps but this may have negative side effects. See: <https://
   bugzilla.redhat.com/show_bug.cgi?id=427629> and <http://lkml.org/lkml/
   2007/12/4/260>.

   xfrm_larval_drop can be set to 1 by the following procedure:

   echo "1" > proc/sys/net/core/xfrm_larval_drop

Q: Why do I see 5 (or more) copies of named on Linux?

A: Linux threads each show up as a process under ps. The approximate
   number of threads running is n+4, where n is the number of CPUs. Note
   that the amount of memory used is not cumulative; if each process is
   using 10M of memory, only a total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and
   require -L to display them.

Q: Why does BIND 9 log "permission denied" errors accessing its
   configuration files or zones on my Linux system even though it is
   running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore,
   if the server is running as root, the configuration files and zone
   files should also be owned by root.

Q: I get the error message "named: capset failed: Operation not permitted"
   when starting named.

A: The capability module, part of "Linux Security Modules/LSM", has not
   been loaded into the kernel. See insmod(8), modprobe(8).

   The relevant modules can be loaded by running:

   modprobe commoncap
   modprobe capability

Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones
   from journals?

   Why can't named create custom log files?

A: Red Hat Security Enhanced Linux (SELinux) policy security protections :

   Red Hat have adopted the National Security Agency's SELinux security
   policy (see <http://www.nsa.gov/selinux>) and recommendations for BIND
   security , which are more secure than running named in a chroot and
   make use of the bind-chroot environment unnecessary .

   By default, named is not allowed by the SELinux policy to write, create
   or delete any files EXCEPT in these directories:

   $ROOTDIR/var/named/slaves
   $ROOTDIR/var/named/data
   $ROOTDIR/var/tmp


   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
   installed.

   The SELinux policy particularly does NOT allow named to modify the
   $ROOTDIR/var/named directory, the default location for master zone
   database files.

   SELinux policy overrules file access permissions - so even if all the
   files under /var/named have ownership named:named and mode rw-rw-r--,
   named will still not be able to write or create files except in the
   directories above, with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to
   locate them in $ROOTDIR/var/named/slaves, with named.conf zone
   statements such as:

   zone "slave.zone." IN {
           type slave;
           file "slaves/slave.zone.db";
           ...
   };
   zone "ddns.zone." IN  {
           type master;
           allow-updates {...};
           file "slaves/ddns.zone.db";
   };


   To allow named to create its cache dump and statistics files, for
   example, you could use named.conf options statements such as:

   options {
           ...
           dump-file "/var/named/data/cache_dump.db";
           statistics-file "/var/named/data/named_stats.txt";
           ...
   };


   You can also tell SELinux to allow named to update any zone database
   files, by setting the SELinux tunable boolean parameter
   'named_write_master_zones=1', using the system-config-securitylevel
   GUI, using the 'setsebool' command, or in /etc/selinux/targeted/
   booleans.

   You can disable SELinux protection for named entirely by setting the
   'named_disable_trans=1' SELinux tunable boolean parameter.

   The SELinux named policy defines these SELinux contexts for named:

   named_zone_t : for zone database files       - $ROOTDIR/var/named/*
   named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
   named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


   If you want to retain use of the SELinux policy for named, and put
   named files in different locations, you can do so by changing the
   context of the custom file locations .

   To create a custom configuration file location, e.g. '/root/
   named.conf', to use with the 'named -c' option, do:

   # chcon system_u:object_r:named_conf_t /root/named.conf


   To create a custom modifiable named data location, e.g. '/var/log/
   named' for a log file, do:

   # chcon system_u:object_r:named_cache_t /var/log/named


   To create a custom zone file location, e.g. /root/zones/, do:

   # chcon system_u:object_r:named_zone_t /root/zones/{.,*}


   See these man-pages for more information : selinux(8), named_selinux
   (8), chcon(1), setsebool(8)

Q: I'm running BIND on Ubuntu -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones
   from journals?

   Why can't named create custom log files?

A: Ubuntu uses AppArmor <http://en.wikipedia.org/wiki/AppArmor> in
   addition to normal file system permissions to protect the system.

   Adjust the paths to use those specified in /etc/apparmor.d/
   usr.sbin.named or adjust /etc/apparmor.d/usr.sbin.named to allow named
   to write at the location specified in named.conf.

Q: Listening on individual IPv6 interfaces does not work.

A: This is usually due to "/proc/net/if_inet6" not being available in the
   chroot file system. Mount another instance of "proc" in the chroot file
   system.

   This can be be made permanent by adding a second instance to /etc/
   fstab.

   proc /proc           proc defaults 0 0
   proc /var/named/proc proc defaults 0 0

5.3. Windows

Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail.
   Why?

A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked
   around by setting the option "transfer-format one-answer;". Also check
   whether your zone contains domain names with embedded spaces or other
   special characters, like "John\032Doe\213s\032Computer", since such
   names have been known to cause Windows 2000 slaves to incorrectly
   reject the zone.

Q: I get "Error 1067" when starting named under Windows.

A: This is the service manager saying that named exited. You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.

   options {
           Directory "C:\windows\dns\etc";
   };

5.4. FreeBSD

Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to
   use certain interrupts as a source of random events. You can make this
   permanent by setting rand_irqs in /etc/rc.conf.

   rand_irqs="3 14 15"

   See also <http://people.freebsd.org/~dougb/randomness.html>.

5.5. Solaris

Q: How do I integrate BIND 9 and Solaris SMF

A: Sun has a blog entry describing how to do this.

   <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>

5.6. Apple Mac OS X

Q: How do I run BIND 9 on Apple Mac OS X?

A: If you run Tiger(Mac OS 10.4) or later then this is all you need to do:

   % sudo rndc-confgen  > /etc/rndc.conf

   Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:

   key "rndc-key" {
           algorithm hmac-md5;
           secret "uvceheVuqf17ZwIcTydddw==";
   };

   Then start the relevant service:

   % sudo service org.isc.named start

   This is persistent upon a reboot, so you will have to do it only once.

A: Alternatively you can just generate /etc/rndc.key by running:

   % sudo rndc-confgen -a

   Then start the relevant service:

   % sudo service org.isc.named start

   Named will look for /etc/rndc.key when it starts if it doesn't have a
   controls section or the existing controls are missing keys sub-clauses.
   This is persistent upon a reboot, so you will have to do it only once.

@


1.5.2.1
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/254402
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d3 1
a3 1
Copyright  2004-2010, 2013 Internet Systems Consortium, Inc. ("ISC")
d872 1
a872 1
           algorithm hmac-sha256;
@


1.5.8.1
log
@file FAQ was added on branch RELENG_8_4 on 2013-03-28 13:00:18 +0000
@
text
@d1 893
@


1.5.8.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 893
Frequently Asked Questions about BIND 9

Copyright  2004-2010 Internet Systems Consortium, Inc. ("ISC")

Copyright  2000-2003 Internet Software Consortium.

-----------------------------------------------------------------------

1. Compilation and Installation Questions

Q: I'm trying to compile BIND 9, and "make" is failing due to files not
   being found. Why?

A: Using a parallel or distributed "make" to build BIND 9 is not
   supported, and doesn't work. If you are using one of these, use normal
   make or gmake instead.

Q: Isn't "make install" supposed to generate a default named.conf?

A: Short Answer: No.

   Long Answer: There really isn't a default configuration which fits any
   site perfectly. There are lots of decisions that need to be made and
   there is no consensus on what the defaults should be. For example
   FreeBSD uses /etc/namedb as the location where the configuration files
   for named are stored. Others use /var/named.

   What addresses to listen on? For a laptop on the move a lot you may
   only want to listen on the loop back interfaces.

   Who do you offer recursive service to? Is there are firewall to
   consider? If so is it stateless or stateful. Are you directly on the
   Internet? Are you on a private network? Are you on a NAT'd network? The
   answers to all these questions change how you configure even a caching
   name server.

2. Configuration and Setup Questions

Q: Why does named log the warning message "no TTL specified - using SOA
   MINTTL instead"?

A: Your zone file is illegal according to RFC1035. It must either have a
   line like:

   $TTL 86400

   at the beginning, or the first record in it must have a TTL field, like
   the "84600" in this example:

   example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )

Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master
   file bar: ran out of space"?

A: This is often caused by TXT records with missing close quotes. Check
   that all TXT records containing quoted strings have both open and close
   quotes.

Q: How do I restrict people from looking up the server version?

A: Put a "version" option containing something other than the real version
   in the "options" section of named.conf. Note doing this will not
   prevent attacks and may impede people trying to diagnose problems with
   your server. Also it is possible to "fingerprint" nameservers to
   determine their version.

Q: How do I restrict only remote users from looking up the server version?

A: The following view statement will intercept lookups as the internal
   view that holds the version information will be matched last. The
   caveats of the previous answer still apply, of course.

   view "chaos" chaos {
           match-clients { <those to be refused>; };
           allow-query { none; };
           zone "." {
                   type hint;
                   file "/dev/null";  // or any empty file
           };
   };

Q: What do "no source of entropy found" or "could not open entropy source
   foo" mean?

A: The server requires a source of entropy to perform certain operations,
   mostly DNSSEC related. These messages indicate that you have no source
   of entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the
   random-device option in named.conf.

Q: I'm trying to use TSIG to authenticate dynamic updates or zone
   transfers. I'm sure I have the keys set up correctly, but the server is
   rejecting the TSIG. Why?

A: This may be a clock skew problem. Check that the the clocks on the
   client and server are properly synchronised (e.g., using ntp).

Q: I see a log message like the following. Why?

   couldn't open pid file '/var/run/named.pid': Permission denied

A: You are most likely running named as a non-root user, and that user
   does not have permission to write in /var/run. The common ways of
   fixing this are to create a /var/run/named directory owned by the named
   user and set pid-file to "/var/run/named/named.pid", or set pid-file to
   "named.pid", which will put the file in the directory specified by the
   directory option (which, in this case, must be writable by the named
   user).

Q: I can query the nameserver from the nameserver but not from other
   machines. Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external
   view at the same time? When I tried, both views on the slave were
   transferred from the same view on the master.

A: You will need to give the master and slave multiple IP addresses and
   use those to make sure you reach the correct view on the other machine.

   Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
                   notify-source 10.0.1.1;
                   transfer-source 10.0.1.1;
                   query-source address 10.0.1.1;
       external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.2;
           transfer-source 10.0.1.2;
           query-source address 10.0.1.2;

   Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
           notify-source 10.0.1.3;
           transfer-source 10.0.1.3;
           query-source address 10.0.1.3;
      external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.4;
           transfer-source 10.0.1.4;
           query-source address 10.0.1.4;

   You put the external address on the alias so that all the other dns
   clients on these boxes see the internal view by default.

A: BIND 9.3 and later: Use TSIG to select the appropriate view.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; // reject message ment for the
                                                  // external view.
                                   10.0.1/24; };  // accept from these addresses.
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.1.2 { keys external; };  // tag messages from the
                                                        // external view to the
                                                        // other servers for the
                                                        // view.
                   recursion no;
                   ...
           };

   Slave 10.0.1.2:
           key "external" {
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.1.1 { keys external; };
                   recursion no;
                   ...
           };

Q: I get error messages like "multiple RRs of singleton type" and "CNAME
   and other data" when transferring a zone. What does this mean?

A: These indicate a malformed master zone. You can identify the exact
   records involved by transferring the zone using dig then running
   named-checkzone on it.

   dig axfr example.com @@master-server > tmp
   named-checkzone example.com tmp

   A CNAME record cannot exist with the same name as another record except
   for the DNSSEC records which prove its existence (NSEC).

   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other
   data should be present; this ensures that the data for a canonical name
   and its aliases cannot be different. This rule also insures that a
   cached CNAME can be used without checking with an authoritative server
   for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input"
   where 99 is the last line of named.conf.

A: There are unbalanced quotes in named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title
   indication (e.g. CR/LF) on the last line of a text file. This can be
   fixed by "adding" a blank line to the end of the file. Named expects to
   see EOF immediately after EOL and treats text files where this is not
   met as truncated.

Q: How do I share a dynamic zone between multiple views?

A: You choose one view to be master and the second a slave and transfer
   the zone between views.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
           };

           key "mykey" {
                   algorithm hmac-sha256;
                   secret "yyyyyyyyyyyyyyyyyyyyyyyy";
           };

           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   server 10.0.1.1 {
                           /* Deliver notify messages to external view. */
                           keys { external; };
                   };
                   zone "example.com" {
                           type master;
                           file "internal/example.db";
                           allow-update { key mykey; };
                           also-notify { 10.0.1.1; };
                   };
           };

           view "external" {
                   match-clients { key external; any; };
                   zone "example.com" {
                           type slave;
                           file "external/example.db";
                           masters { 10.0.1.1; };
                           transfer-source 10.0.1.1;
                           // allow-update-forwarding { any; };
                           // allow-notify { ... };
                   };
           };

Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
   master file primaries/wireless.ietf56.ietf.org: no owner".

A: This error is produced when a line in the master file contains leading
   white space (tab/space) but the is no current record owner name to
   inherit the name from. Usually this is the result of putting white
   space before a comment, forgetting the "@@" for the SOA record, or
   indenting the master file.

Q: Why are my logs in GMT (UTC).

A: You are running chrooted (-t) and have not supplied local timezone
   information in the chroot area.

   FreeBSD: /etc/localtime
   Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
   OSF: /etc/zoneinfo/localtime

   See also tzset(3) and zic(8).

Q: I get "rndc: connect failed: connection refused" when I try to run
   rndc.

A: This is usually a configuration error.

   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by
   "rndc-confgen -a", rndc-confgen or manually. The Administrators
   Reference manual has details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /
   etc/rndc.conf for the default server. Update /etc/rndc.conf if
   necessary so that the default server listed in /etc/rndc.conf matches
   the addresses used in named.conf. "localhost" has two address
   (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure
   that /etc/rndc.conf has the correct ownership and that a copy is in the
   chroot area. You can do this by re-running "rndc-confgen -a" with
   appropriate -t and -u arguments.

Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
   receiving responses: permission denied" error messages.

A: These indicate a filesystem permission error preventing named creating
   / renaming the temporary file. These will usually also have other
   associated error messages like

   "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"

   Named needs write permission on the directory containing the file.
   Named writes the new cache file to a temporary file then renames it to
   the name specified in named.conf to ensure that the contents are always
   complete. This is to prevent named loading a partial zone in the event
   of power failure or similar interrupting the write of the master file.

   Note file names are relative to the directory specified in options and
   any chroot directory ([<chroot dir>/][<options dir>]).

   If named is invoked as "named -t /chroot/DNS" with the following
   named.conf then "/chroot/DNS/var/named/sl" needs to be writable by the
   user named is running as.

   options {
           directory "/var/named";
   };

   zone "example.net" {
           type slave;
           file "sl/example.net";
           masters { 192.168.4.12; };
   };

Q: I want to forward all DNS queries from my caching nameserver to another
   server. But there are some domains which have to be served locally, via
   rbldnsd.

   How do I achieve this ?

A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Can you help me understand how BIND 9 uses memory to store DNS zones?

   Some times it seems to take several times the amount of memory it needs
   to store the zone.

A: When reloading a zone named my have multiple copies of the zone in
   memory at one time. The zone it is serving and the one it is loading.
   If reloads are ultra fast it can have more still.

   e.g. Ones that are transferring out, the one that it is serving and the
   one that is loading.

   BIND 8 destroyed the zone before loading and also killed off outgoing
   transfers of the zone.

   The new strategy allows slaves to get copies of the new zone regardless
   of how often the master is loaded compared to the transfer time. The
   slave might skip some intermediate versions but the transfers will
   complete and it will keep reasonably in sync with the master.

   The new strategy also allows the master to recover from syntax and
   other errors in the master file as it still has an in-core copy of the
   old contents.

Q: I want to use IPv6 locally but I don't have a external IPv6 connection.
   External lookups are slow.

A: You can use server clauses to stop named making external lookups over
   IPv6.

   server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
   server ::/0 { bogus yes; };

3. Operations Questions

Q: How to change the nameservers for a zone?

A: Step 1: Ensure all nameservers, new and old, are serving the same zone
   content.

   Step 2: Work out the maximum TTL of the NS RRset in the parent and
   child zones. This is the time it will take caches to be clear of a
   particular version of the NS RRset. If you are just removing
   nameservers you can skip to Step 6.

   Step 3: Add new nameservers to the NS RRset for the zone and wait until
   all the servers for the zone are answering with this new NS RRset.

   Step 4: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 5: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long. If you are just adding nameservers you are done.

   Step 6: Remove any old nameservers from the zones NS RRset and wait for
   all the servers for the zone to be serving the new NS RRset.

   Step 7: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 8: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long.

   Step 9: Turn off the old nameservers or remove the zone entry from the
   configuration of the old nameservers.

   Step 10: Increment the serial number and wait for the change to be
   visible in all nameservers for the zone. This ensures that zone
   transfers are still working after the old servers are decommissioned.

   Note: the above procedure is designed to be transparent to dns clients.
   Decommissioning the old servers too early will result in some clients
   not being able to look up answers in the zone.

   Note: while it is possible to run the addition and removal stages
   together it is not recommended.

4. General Questions

Q: I keep getting log messages like the following. Why?

   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
   update failed: 'RRset exists (value dependent)' prerequisite not
   satisfied (NXRRSET)

A: DNS updates allow the update request to test to see if certain
   conditions are met prior to proceeding with the update. The message
   above is saying that conditions were not met and the update is not
   proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.

Q: I keep getting log messages like the following. Why?

   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied

A: Someone is trying to update your DNS data using the RFC2136 Dynamic
   Update protocol. Windows 2000 machines have a habit of sending dynamic
   update requests to DNS servers without being specifically configured to
   do so. If the update requests are coming from a Windows 2000 machine,
   see <http://support.microsoft.com/support/kb/articles/q246/8/04.asp>
   for information about how to turn them off.

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of
   the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
   makes to avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a
   root server, and these records are eligible for inclusion as additional
   data in responses. Subsequently it receives a subset of the root server
   addresses as additional data in a non-authoritative (referral) response
   from a root server. This causes the addresses to now be considered
   non-authoritative (glue) data, which is not eligible for inclusion in
   responses.

   The server does have a complete set of root server addresses cached at
   all times, it just may not include all of them as additional data,
   depending on whether they were last received as answers or as glue. You
   can always look up the addresses with explicit queries like "dig
   a.root-servers.net A".

Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?

A: A zone can be updated either by editing zone files and reloading the
   server or by dynamic update, but not both. If you have enabled dynamic
   update for a zone using the "allow-update" option, you are not supposed
   to edit the zone file by hand, and the server will not attempt to
   reload it.

Q: Why is named listening on UDP port other than 53?

A: Named uses a system selected port to make queries of other nameservers.
   This behaviour can be overridden by using query-source to lock down the
   port and/or address. See also notify-source and transfer-source.

Q: I get warning messages like "zone example.com/IN: refresh: failure
   trying master 1.2.3.4#53: timed out".

A: Check that you can make UDP queries from the slave to the master

   dig +norec example.com soa @@1.2.3.4

   You could be generating queries faster than the slave can cope with.
   Lower the serial query rate.

   serial-query-rate 5; // default 20

Q: I don't get RRSIG's returned when I use "dig +dnssec".

A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).

Q: Can a NS record refer to a CNAME.

A: No. The rules for glue (copies of the *address* records in the parent
   zones) and additional section processing do not allow it to work.

   You would have to add both the CNAME and address records (A/AAAA) as
   glue to the parent zone and have CNAMEs be followed when doing
   additional section processing to make it work. No nameserver
   implementation supports either of these requirements.

Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
   mean?

A: If the IN-ADDR.ARPA name covered refers to a internal address space you
   are using then you have failed to follow RFC 1918 usage rules and are
   leaking queries to the Internet. You should establish your own zones
   for these addresses to prevent you querying the Internet's name servers
   for these addresses. Please see <http://as112.net/> for details of the
   problems you are causing and the counter measures that have had to be
   deployed.

   If you are not using these private addresses then a client has queried
   for them. You can just ignore the messages, get the offending client to
   stop sending you these messages as they are most probably leaking them
   or setup your own zones empty zones to serve answers to these queries.

   zone "10.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "16.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   ...

   zone "31.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "168.192.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   empty:
   @@ 10800 IN SOA <name-of-server>. <contact-email>. (
                  1 3600 1200 604800 10800 )
   @@ 10800 IN NS <name-of-server>.

   Note

   Future versions of named are likely to do this automatically.

Q: Will named be affected by the 2007 changes to daylight savings rules in
   the US.

A: No, so long as the machines internal clock (as reported by "date -u")
   remains at UTC. The only visible change if you fail to upgrade your OS,
   if you are in a affected area, will be that log messages will be a hour
   out during the period where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the
   conversion rules from UTC to local time. Normally this involves
   updating a file in /etc (which sets the default timezone for the
   machine) and possibly a directory which has all the conversion rules
   for the world (e.g. /usr/share/zoneinfo). When updating the OS do not
   forget to update any chroot areas as well. See your OS's documentation
   for more details.

   The local timezone conversion rules can also be done on a individual
   basis by setting the TZ environment variable appropriately. See your
   OS's documentation for more details.

Q: Is there a bugzilla (or other tool) database that mere mortals can have
   (read-only) access to for bind?

A: No. The BIND 9 bug database is kept closed for a number of reasons.
   These include, but are not limited to, that the database contains
   proprietory information from people reporting bugs. The database has in
   the past and may in future contain unfixed bugs which are capable of
   bringing down most of the Internet's DNS infrastructure.

   The release pages for each version contain up to date lists of bugs
   that have been fixed post release. That is as close as we can get to
   providing a bug database.

Q: Why do queries for NSEC3 records fail to return the NSEC3 record?

A: NSEC3 records are strictly meta data and can only be returned in the
   authority section. This is done so that signing the zone using NSEC3
   records does not bring names into existence that do not exist in the
   unsigned version of the zone.

5. Operating-System Specific Questions

5.1. HPUX

Q: I get the following error trying to configure BIND:

   checking if unistd.h or sys/types.h defines fd_set... no
   configure: error: need either working unistd.h or sys/select.h

A: You have attempted to configure BIND with the bundled C compiler. This
   compiler does not meet the minimum compiler requirements to for
   building BIND. You need to install a ANSI C compiler and / or teach
   configure how to find the ANSI C compiler. The later can be done by
   adjusting the PATH environment variable and / or specifying the
   compiler via CC.

   ./configure CC=<compiler> ...

5.2. Linux

Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=
   2>

Q: Why does named lock up when it attempts to connect over IPSEC tunnels?

A: This is due to a kernel bug where the fact that a socket is marked
   non-blocking is ignored. It is reported that setting xfrm_larval_drop
   to 1 helps but this may have negative side effects. See: <https://
   bugzilla.redhat.com/show_bug.cgi?id=427629> and <http://lkml.org/lkml/
   2007/12/4/260>.

   xfrm_larval_drop can be set to 1 by the following procedure:

   echo "1" > proc/sys/net/core/xfrm_larval_drop

Q: Why do I see 5 (or more) copies of named on Linux?

A: Linux threads each show up as a process under ps. The approximate
   number of threads running is n+4, where n is the number of CPUs. Note
   that the amount of memory used is not cumulative; if each process is
   using 10M of memory, only a total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and
   require -L to display them.

Q: Why does BIND 9 log "permission denied" errors accessing its
   configuration files or zones on my Linux system even though it is
   running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore,
   if the server is running as root, the configuration files and zone
   files should also be owned by root.

Q: I get the error message "named: capset failed: Operation not permitted"
   when starting named.

A: The capability module, part of "Linux Security Modules/LSM", has not
   been loaded into the kernel. See insmod(8), modprobe(8).

   The relevant modules can be loaded by running:

   modprobe commoncap
   modprobe capability

Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones
   from journals?

   Why can't named create custom log files?

A: Red Hat Security Enhanced Linux (SELinux) policy security protections :

   Red Hat have adopted the National Security Agency's SELinux security
   policy (see <http://www.nsa.gov/selinux>) and recommendations for BIND
   security , which are more secure than running named in a chroot and
   make use of the bind-chroot environment unnecessary .

   By default, named is not allowed by the SELinux policy to write, create
   or delete any files EXCEPT in these directories:

   $ROOTDIR/var/named/slaves
   $ROOTDIR/var/named/data
   $ROOTDIR/var/tmp


   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
   installed.

   The SELinux policy particularly does NOT allow named to modify the
   $ROOTDIR/var/named directory, the default location for master zone
   database files.

   SELinux policy overrules file access permissions - so even if all the
   files under /var/named have ownership named:named and mode rw-rw-r--,
   named will still not be able to write or create files except in the
   directories above, with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to
   locate them in $ROOTDIR/var/named/slaves, with named.conf zone
   statements such as:

   zone "slave.zone." IN {
           type slave;
           file "slaves/slave.zone.db";
           ...
   };
   zone "ddns.zone." IN  {
           type master;
           allow-updates {...};
           file "slaves/ddns.zone.db";
   };


   To allow named to create its cache dump and statistics files, for
   example, you could use named.conf options statements such as:

   options {
           ...
           dump-file "/var/named/data/cache_dump.db";
           statistics-file "/var/named/data/named_stats.txt";
           ...
   };


   You can also tell SELinux to allow named to update any zone database
   files, by setting the SELinux tunable boolean parameter
   'named_write_master_zones=1', using the system-config-securitylevel
   GUI, using the 'setsebool' command, or in /etc/selinux/targeted/
   booleans.

   You can disable SELinux protection for named entirely by setting the
   'named_disable_trans=1' SELinux tunable boolean parameter.

   The SELinux named policy defines these SELinux contexts for named:

   named_zone_t : for zone database files       - $ROOTDIR/var/named/*
   named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
   named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


   If you want to retain use of the SELinux policy for named, and put
   named files in different locations, you can do so by changing the
   context of the custom file locations .

   To create a custom configuration file location, e.g. '/root/
   named.conf', to use with the 'named -c' option, do:

   # chcon system_u:object_r:named_conf_t /root/named.conf


   To create a custom modifiable named data location, e.g. '/var/log/
   named' for a log file, do:

   # chcon system_u:object_r:named_cache_t /var/log/named


   To create a custom zone file location, e.g. /root/zones/, do:

   # chcon system_u:object_r:named_zone_t /root/zones/{.,*}


   See these man-pages for more information : selinux(8), named_selinux
   (8), chcon(1), setsebool(8)

Q: I'm running BIND on Ubuntu -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones
   from journals?

   Why can't named create custom log files?

A: Ubuntu uses AppArmor <http://en.wikipedia.org/wiki/AppArmor> in
   addition to normal file system permissions to protect the system.

   Adjust the paths to use those specified in /etc/apparmor.d/
   usr.sbin.named or adjust /etc/apparmor.d/usr.sbin.named to allow named
   to write at the location specified in named.conf.

Q: Listening on individual IPv6 interfaces does not work.

A: This is usually due to "/proc/net/if_inet6" not being available in the
   chroot file system. Mount another instance of "proc" in the chroot file
   system.

   This can be be made permanent by adding a second instance to /etc/
   fstab.

   proc /proc           proc defaults 0 0
   proc /var/named/proc proc defaults 0 0

5.3. Windows

Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail.
   Why?

A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked
   around by setting the option "transfer-format one-answer;". Also check
   whether your zone contains domain names with embedded spaces or other
   special characters, like "John\032Doe\213s\032Computer", since such
   names have been known to cause Windows 2000 slaves to incorrectly
   reject the zone.

Q: I get "Error 1067" when starting named under Windows.

A: This is the service manager saying that named exited. You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.

   options {
           Directory "C:\windows\dns\etc";
   };

5.4. FreeBSD

Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to
   use certain interrupts as a source of random events. You can make this
   permanent by setting rand_irqs in /etc/rc.conf.

   rand_irqs="3 14 15"

   See also <http://people.freebsd.org/~dougb/randomness.html>.

5.5. Solaris

Q: How do I integrate BIND 9 and Solaris SMF

A: Sun has a blog entry describing how to do this.

   <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>

5.6. Apple Mac OS X

Q: How do I run BIND 9 on Apple Mac OS X?

A: If you run Tiger(Mac OS 10.4) or later then this is all you need to do:

   % sudo rndc-confgen  > /etc/rndc.conf

   Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:

   key "rndc-key" {
           algorithm hmac-md5;
           secret "uvceheVuqf17ZwIcTydddw==";
   };

   Then start the relevant service:

   % sudo service org.isc.named start

   This is persistent upon a reboot, so you will have to do it only once.

A: Alternatively you can just generate /etc/rndc.key by running:

   % sudo rndc-confgen -a

   Then start the relevant service:

   % sudo service org.isc.named start

   Named will look for /etc/rndc.key when it starts if it doesn't have a
   controls section or the existing controls are missing keys sub-clauses.
   This is persistent upon a reboot, so you will have to do it only once.

@


1.4
log
@SVN rev 202961 on 2010-01-25 06:18:31Z by dougb

Upgrade to BIND 9.6.1-P3.

This version address the following vulnerabilities:

BIND 9 Cache Update from Additional Section
https://www.isc.org/advisories/CVE-2009-4022v6
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022
A nameserver with DNSSEC validation enabled may incorrectly add
unauthenticated records to its cache that are received during the
resolution of a recursive client query

BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses
https://www.isc.org/advisories/CVE-2010-0097
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097
There was an error in the DNSSEC NSEC/NSEC3 validation code that could
cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records
proven by NSEC or NSEC3 to exist) to be cached as if they had validated
correctly

These issues only affect systems with DNSSEC validation enabled.
@
text
@d3 1
a3 1
Copyright  2004-2009 Internet Systems Consortium, Inc. ("ISC")
d787 16
@


1.3
log
@SVN rev 193149 on 2009-05-31 05:42:58Z by dougb

Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including:

	Full NSEC3 support
	Automatic zone re-signing
	New update-policy methods tcp-self and 6to4-self
	DHCID support.
	More detailed statistics counters including those supported in BIND 8.
	Faster ACL processing.
	Efficient LRU cache-cleaning mechanism.
	NSID support.
@
text
@d156 2
a157 2
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
d160 3
a162 1
                   match-clients { !key external; 10.0.1/24; };
d167 4
a170 1
                   server 10.0.1.2 { keys external; };
d177 2
a178 2
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
d228 2
a229 2
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
d233 2
a234 2
                   algorithm hmac-md5;
                   secret "yyyyyyyy";
d247 1
a247 1
                           notify-also { 10.0.1.1; };
d257 1
a257 1
                           transfer-source { 10.0.1.1; };
@


1.3.2.1
log
@SVN rev 203635 on 2010-02-07 20:28:24Z by dougb

MFC 202961:

Upgrade to BIND 9.6.1-P3.

This version address the following vulnerabilities:

BIND 9 Cache Update from Additional Section
https://www.isc.org/advisories/CVE-2009-4022v6
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022
A nameserver with DNSSEC validation enabled may incorrectly add
unauthenticated records to its cache that are received during the
resolution of a recursive client query

BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses
https://www.isc.org/advisories/CVE-2010-0097
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097
There was an error in the DNSSEC NSEC/NSEC3 validation code that could
cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records
proven by NSEC or NSEC3 to exist) to be cached as if they had validated
correctly

These issues only affect systems with DNSSEC validation enabled.
@
text
@d156 2
a157 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d160 1
a160 3
                   match-clients { !key external; // reject message ment for the
                                                  // external view.
                                   10.0.1/24; };  // accept from these addresses.
d165 1
a165 4
                   server 10.0.1.2 { keys external; };  // tag messages from the
                                                        // external view to the
                                                        // other servers for the
                                                        // view.
d172 2
a173 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d223 2
a224 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d228 2
a229 2
                   algorithm hmac-sha256;
                   secret "yyyyyyyyyyyyyyyyyyyyyyyy";
d242 1
a242 1
                           also-notify { 10.0.1.1; };
d252 1
a252 1
                           transfer-source 10.0.1.1;
@


1.3.2.2
log
@SVN rev 205820 on 2010-03-29 06:31:58Z by dougb

Update to 9.6.2-P1, the latest patchfix release which deals with
the problems related to the handling of broken DNSSEC trust chains.

This fix is only relevant for those who have DNSSEC validation
enabled and configure trust anchors from third parties, either
manually, or through a system like DLV.
@
text
@d3 1
a3 1
Copyright  2004-2010 Internet Systems Consortium, Inc. ("ISC")
a786 16
Q: I'm running BIND on Ubuntu -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones
   from journals?

   Why can't named create custom log files?

A: Ubuntu uses AppArmor <http://en.wikipedia.org/wiki/AppArmor> in
   addition to normal file system permissions to protect the system.

   Adjust the paths to use those specified in /etc/apparmor.d/
   usr.sbin.named or adjust /etc/apparmor.d/usr.sbin.named to allow named
   to write at the location specified in named.conf.

@


1.3.2.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/262707
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d3 1
a3 1
Copyright  2004-2010, 2013 Internet Systems Consortium, Inc. ("ISC")
d872 1
a872 1
           algorithm hmac-sha256;
@


1.2
log
@SVN rev 186462 on 2008-12-23 22:47:56Z by dougb

Merge from vendor/bind9/dist as of the 9.4.3 import
@
text
@d3 1
a3 1
Copyright  2004-2008 Internet Systems Consortium, Inc. ("ISC")
d603 1
a603 1
   records does not bring names into existance that do not exist in the
a827 1
   /etc/rc.conf
@


1.1
log
@Initial revision
@
text
@d1 5
d7 1
d9 1
d11 2
a12 1
Frequently Asked Questions about BIND 9
d14 3
d18 1
a18 1
Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
d20 1
a20 11
A: Linux threads do not fully implement the Posix threads (pthreads) standard.
In particular, setuid() operates only on the current thread, not the full
process.  Because of this limitation, BIND 9 cannot use setuid() on Linux as it
can on all other supported platforms.  setuid() cannot be called before
creating threads, since the server does not start listening on reserved ports
until after threads have started.

  In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
capabilities across a setuid() call is present.  This allows BIND 9 to call
setuid() early, while retaining the ability to bind reserved ports.  This is
a Linux-specific hack.
d22 5
a26 2
  On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
of a security risk than a root process that has not dropped privileges.
d28 2
a29 1
  If Linux threads ever work correctly, this restriction will go away.
d31 5
a35 2
  Configuring BIND9 with the --disable-threads option (the default) causes a
non-threaded version to be built, which will allow -u to be used.
d37 1
d40 1
a40 1
MINTTL instead"?
d42 2
a43 2
A: Your zone file is illegal according to RFC1035.  It must either
have a line like
d47 2
a48 2
at the beginning, or the first record in it must have a TTL field,
like the "84600" in this example:
d52 271
a322 1
Q: Why do I see 5 (or more) copies of named on Linux?
d324 3
a326 4
A: Linux threads each show up as a process under ps.  The approximate
number of threads running is n+4, where n is the number of CPUs.  Note that
the amount of memory used is not cumulative; if each process is using 10M of
memory, only a total of 10M is used.
d328 5
d334 3
a336 3
Q: Why does BIND 9 log "permission denied" errors accessing its
configuration files or zones on my Linux system even though it is running
as root?
d338 1
a338 4
A: On Linux, BIND 9 drops most of its root privileges on startup.
This including the privilege to open files owned by other users.
Therefore, if the server is running as root, the configuration files
and zone files should also be owned by root.
d340 4
d345 4
a348 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file
bar: ran out of space"
d350 4
a353 2
A: This is often caused by TXT records with missing close quotes.  Check that
all TXT records containing quoted strings have both open and close quotes.
d356 1
a356 1
Q: How do I produce a usable core file from a multithreaded named on Linux?
d358 2
a359 5
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps
are usable (that is, the correct thread is dumped).  Otherwise, if using
a 2.2 kernel, apply the kernel patch found in contrib/linux/coredump-patch
and rebuild the kernel.  This patch will cause multithreaded programs to dump
the correct thread.
d361 3
d365 2
a366 1
Q: How do I restrict people from looking up the server version?
d368 2
a369 5
A: Put a "version" option containing something other than the real
version in the "options" section of named.conf.  Note doing this will
not prevent attacks and may impede people trying to diagnose problems
with your server.  Also it is possible to "fingerprint" nameservers to
determine their version.
d371 4
d376 3
a378 2
Q: How do I restrict only remote users from looking up the server
version?
d380 2
a381 3
A: The following view statement will intercept lookups as the internal
view that holds the version information will be matched last.  The
caveats of the previous answer still apply, of course.
d383 2
a384 8
  view "chaos" chaos {
	  match-clients { <those to be refused>; };
	  allow-query { none; };
	  zone "." {
		  type hint;
		  file "/dev/null";  // or any empty file
	  };
  };
d386 2
d389 1
a389 2
Q: What do "no source of entropy found" or "could not open entropy source foo"
mean?
d391 1
a391 5
A: The server requires a source of entropy to perform certain operations,
mostly DNSSEC related.  These messages indicate that you have no source
of entropy.  On systems with /dev/random or an equivalent, it is used by
default.  A source of entropy can also be defined using the random-device
option in named.conf.
d393 2
d396 4
a399 1
Q: I installed BIND 9 and restarted named, but it's still BIND 8.  Why?
d401 2
a402 2
A: BIND 9 is installed under /usr/local by default.  BIND 8 is often
installed under /usr.  Check that the correct named is running.
d404 2
d407 2
a408 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone
transfers.  I'm sure I have the keys set up correctly, but the server
is rejecting the TSIG.  Why?
d410 2
a411 2
A: This may be a clock skew problem.  Check that the the clocks on
the client and server are properly synchronized (e.g., using ntp).
d413 2
d416 2
a417 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not
being found.  Why?
d419 2
a420 3
A: Using a parallel or distributed "make" to build BIND 9 is not
supported, and doesn't work.  If you are using one of these, use
normal make or gmake instead.
d422 3
d426 3
a428 3
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is
logging error messages like "notify to 10.0.0.1#53 failed: unexpected
end of input".  What's wrong?
d430 2
a431 3
A: This error message is caused by a known bug in BIND 8.2.3 and is fixed
in BIND 8.2.4.  It can be safely ignored - the notify has been acted on by
the slave despite the error message.
d433 1
d435 1
a435 1
Q: I keep getting log messages like the following.  Why?
d437 1
a437 1
   Dec  4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
d442 3
a444 4
conditions are met prior to proceeding with the update.  The message
above is saying that conditions were not met and the update is not
proceeding.  See doc/rfc/rfc2136.txt for more details on prerequisites.

d446 1
a446 1
Q: I keep getting log messages like the following.  Why?
d451 55
a505 5
Update protocol.  Windows 2000 machines have a habit of sending dynamic
update requests to DNS servers without being specifically configured to
do so.  If the update requests are coming from a Windows 2000 machine,
see <http://support.microsoft.com/support/kb/articles/q246/8/04.asp>
for information about how to turn them off.
d507 6
d514 4
a517 1
Q: I see a log message like the following.  Why?
d519 2
a520 1
   couldn't open pid file '/var/run/named.pid': Permission denied
d522 7
a528 42
A: You are most likely running named as a non-root user, and that user
does not have permission to write in /var/run.  The common ways of
fixing this are to create a /var/run/named directory owned by the named
user and set pid-file to "/var/run/named/named.pid", or set
pid-file to "named.pid", which will put the file in the directory
specified by the directory option (which, in this case, must be writable
by the named user).


Q: When I do a "dig . ns", many of the A records for the root
servers are missing.  Why?

A: This is normal and harmless.  It is a somewhat confusing side effect
of the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
makes to avoid promoting glue into answers.

When BIND 9 first starts up and primes its cache, it receives the root
server addresses as additional data in an authoritative response from
a root server, and these records are eligible for inclusion as
additional data in responses.  Subsequently it receives a subset of
the root server addresses as additional data in a non-authoritative
(referral) response from a root server.  This causes the addresses to
now be considered non-authoritative (glue) data, which is not eligible
for inclusion in responses.

The server does have a complete set of root server addresses cached
at all times, it just may not include all of them as additional data,
depending on whether they were last received as answers or as glue.
You can always look up the addresses with explicit queries like
"dig a.root-servers.net A".


Q: Zone transfers from my BIND 9 master to my Windows 2000 slave
fail.  Why?

A: This may be caused by a bug in the Windows 2000 DNS server where
DNS messages larger than 16K are not handled properly.  This can be
worked around by setting the option "transfer-format one-answer;".
Also check whether your zone contains domain names with embedded
spaces or other special characters, like "John\032Doe\213s\032Computer",
since such names have been known to cause Windows 2000 slaves to
incorrectly reject the zone.
d530 4
d535 4
a538 1
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
d540 4
a543 5
A: A zone can be updated either by editing zone files and reloading
the server or by dynamic update, but not both.  If you have enabled
dynamic update for a zone using the "allow-update" option, you are not
supposed to edit the zone file by hand, and the server will not
attempt to reload it.
d545 1
d547 4
a550 2
Q: I can query the nameserver from the nameserver but not from other
machines.  Why?
d552 4
a555 2
A: This is usually the result of the firewall configuration stopping
the queries and / or the replies.
d557 4
d562 1
a562 3
Q: How can I make a server a slave for both an internal and
an external view at the same time?  When I tried, both views
on the slave were transferred from the same view on the master.
d564 1
a564 2
A: You will need to give the master and slave multiple IP addresses and
use those to make sure you reach the correct view on the other machine.
d566 2
a567 73
	e.g.
	Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
	    internal:
		match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
		notify-source 10.0.1.1;
		transfer-source 10.0.1.1;
		query-source address 10.0.1.1;
	    external:
		match-clients { any; };
		recursion no;	// don't offer recursion to the world
		notify-source 10.0.1.2;
		transfer-source 10.0.1.2;
		query-source address 10.0.1.2;

	Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
	    internal:
		match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
		notify-source 10.0.1.3;
		transfer-source 10.0.1.3;
		query-source address 10.0.1.3;
	    external:
		match-clients { any; };
		recursion no;	// don't offer recursion to the world
		notify-source 10.0.1.4;
		transfer-source 10.0.1.4;
		query-source address 10.0.1.4;

	You put the external address on the alias so that all the other
	dns clients on these boxes see the internal view by default.

A: (BIND 9.3 and later) Use TSIG to select the appropriate view.

	Master 10.0.1.1:
	key "external" {
		algorithm hmac-md5;
		secret "xxxxxxxx";
	};
	view "internal" {
		match-clients { !key external; 10.0.1/24; };
		...
	};
	view "external" {
		match-clients { key external; any; };
		server 10.0.0.2 { keys external; };
		recursion no;
		...
	};

	Slave 10.0.1.2:
	key "external" {
		 algorithm hmac-md5;
		 secret "xxxxxxxx";
	};
	view "internal" {
		match-clients { !key external; 10.0.1/24; };
	};
	view "external" {
		match-clients { key external; any; };
		server 10.0.0.1 { keys external; };
		recursion no;
		...
	};


Q: I have Freebsd 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured.  Use rndcontrol(8) to tell the kernel
to use certain interrupts as a source of random events.  You can make this
permanent by setting rand_irqs in /etc/rc.conf.

e.g.
	/etc/rc.conf
	rand_irqs="3 14 15"
d569 4
a572 1
See also http://people.freebsd.org/~dougb/randomness.html
d574 7
d582 3
a584 1
Q: Why is named listening on UDP port other than 53?
d586 2
a587 3
A: Named uses a system selected port to make queries of other nameservers.
This behaviour can be overridden by using query-source to lock down the
port and/or address.  See also notify-source and transfer-source.
d589 5
d595 3
a597 2
Q: I get error messages like "multiple RRs of singleton type" and
"CNAME and other data" when transferring a zone.  What does this mean?
d599 1
a599 3
A: These indicate a malformed master zone.  You can identify the
exact records involved by transferring the zone using dig then
running named-checkzone on it.
d601 4
a604 3
	e.g.
		dig axfr example.com @@master-server > tmp
		named-checkzone example.com tmp
d606 1
d608 1
a608 2
Q: I get error messages like "named.conf:99: unexpected end of input" where
99 is the last line of named.conf.
d610 1
a610 4
A: Some text editors (notepad and wordpad) fail to put a line termination
indication (e.g. CR/LF) on the last line of a text file.  This can be fixed
by "adding" a blank line to the end of the file.  Named expects to see EOF
immediately after EOL and treats text files where this is not met as truncated.
d612 2
d615 6
a620 2
Q: I get warning messages like "zone example.com/IN: refresh: failure trying master
1.2.3.4#53: timed out".
d622 1
a622 1
A: Check that you can make UDP queries from the slave to the master
d624 1
a624 1
	dig +norec example.com soa @@1.2.3.4
d626 1
a626 2
A: You could be generating queries faster than the slave can cope with.  Lower
the serial query rate.
d628 3
a630 1
	serial-query-rate 5; // default 20
d632 1
a632 1
Q: How do I share a dynamic zone between multiple views?
d634 2
a635 2
A: You choose one view to be master and the second a slave and transfer
the zone between views.
d637 1
a637 36
	Master 10.0.1.1:
	key "external" {
		algorithm hmac-md5;
		secret "xxxxxxxx";
	};

	key "mykey" {
		algorithm hmac-md5;
		secret "yyyyyyyy";
	};

	view "internal" {
		match-clients { !external; 10.0.1/24; };
		server 10.0.1.1 {
			/* Deliver notify messages to external view. */
			keys { external; };
		};
		zone "example.com" {
			type master;
			file "internal/example.db";
			allow-update { key mykey; };
			notify-also { 10.0.1.1; };
		};
	};

	view "external" {
		match-clients { external; any; };
		zone "example.com" {
			type slave;
			file "external/example.db";
			masters { 10.0.1.1; };
			transfer-source { 10.0.1.1; };
			// allow-update-forwarding { any; };
			// allow-notify { ... };
		};
	};
d639 5
a643 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
file primaries/wireless.ietf56.ietf.org: no owner".
d645 1
a645 5
A: This error is produced when a line in the master file contains leading
white space (tab/space) but the is no current record owner name to inherit
the name from.  Usually this is the result of putting white space before
a comment.  Forgeting the "@@" for the SOA record or indenting the master
file.
d647 1
d649 1
a649 1
Q: Why are my logs in GMT (UTC).
d651 4
a654 2
A: You are running chrooted (-t) and have not supplied local timzone
information in the chroot area.
d656 2
a657 3
	FreeBSD: /etc/localtime
	Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
	OSF: /etc/zoneinfo/localtime
d659 3
a661 1
	See also tzset(3) and zic(8).
d663 4
d669 88
a756 1
when starting named.
d758 3
a760 1
A: The capset module has not been loaded into the kernel.  See insmod(8).
d762 2
d765 94
a858 2
Q: I get "rndc: connect failed: connection refused" when I try to run
   rndc.
d860 1
a860 1
A: This is usually a configuration error.
d862 1
a862 4
   First ensure that named is running and no errors are being
   reported at startup (/var/log/messages or equivalent).  Running
   "named -g <usual arguements>" from a terminal can help at this
   point.
d864 1
a864 3
   Secondly ensure that named is configured to use rndc either by
   "rndc-confgen -a", rndc-confgen or manually.  The Administators
   Reference manual has details on how to do this.
d866 1
a866 10
   Old versions of rndc-confgen used localhost rather than 127.0.0.1
   in /etc/rndc.conf for the default server.  Update /etc/rndc.conf
   if necessary so that the default server listed in /etc/rndc.conf
   matches the addresses used in named.conf.  "localhost" has two
   address (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u
   ensure that /etc/rndc.conf has the correct ownership and that
   a copy is in the chroot area.  You can do this by re-running
   "rndc-confgen -a" with appropriate -t and -u arguements.
d868 1
d870 3
a872 1
Q: I don't get RRSIG's returned when I use "dig +dnssec".
a873 1
A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
@


1.1.1.1
log
@Vender import of BIND 9.3.0rc4.
@
text
@@


1.1.1.2
log
@Vendor import of BIND 9.3.1
@
text
@a454 16


Q: I get "Error 1067" when starting named under Windows.

A: This is the service manager saying that named exited.   You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually 
   "C:\windows\dns\etc\named.conf") or failed to specify the directory
   in named.conf.

        options {
                Directory "C:\windows\dns\etc";
        };


@


1.1.1.2.2.1
log
@MFC import of BIND 9.3.2
@
text
@d1 3
a5 1
-------------------------------------------------------------------------------
d10 15
a24 15
   In particular, setuid() operates only on the current thread, not the full
   process. Because of this limitation, BIND 9 cannot use setuid() on Linux as
   it can on all other supported platforms. setuid() cannot be called before
   creating threads, since the server does not start listening on reserved
   ports until after threads have started.

   In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
   capabilities across a setuid() call is present. This allows BIND 9 to call
   setuid() early, while retaining the ability to bind reserved ports. This is
   a Linux-specific hack.

   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
   of a security risk than a root process that has not dropped privileges.

   If Linux threads ever work correctly, this restriction will go away.
d26 2
a27 2
   Configuring BIND9 with the --disable-threads option (the default) causes a
   non-threaded version to be built, which will allow -u to be used.
a28 2
Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
   instead"?
d30 5
a34 2
A: Your zone file is illegal according to RFC1035. It must either have a line
   like:
d38 2
a39 2
   at the beginning, or the first record in it must have a TTL field, like the
   "84600" in this example:
d45 15
a59 12
A: Linux threads each show up as a process under ps. The approximate number of
   threads running is n+4, where n is the number of CPUs. Note that the amount
   of memory used is not cumulative; if each process is using 10M of memory,
   only a total of 10M is used.

Q: Why does BIND 9 log "permission denied" errors accessing its configuration
   files or zones on my Linux system even though it is running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore, if
   the server is running as root, the configuration files and zone files should
   also be owned by root.
d62 4
a65 1
   bar: ran out of space"?
a66 2
A: This is often caused by TXT records with missing close quotes. Check that
   all TXT records containing quoted strings have both open and close quotes.
d70 6
a75 5
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
   (that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
   apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
   kernel. This patch will cause multithreaded programs to dump the correct
   thread.
d79 23
a101 19
A: Put a "version" option containing something other than the real version in
   the "options" section of named.conf. Note doing this will not prevent
   attacks and may impede people trying to diagnose problems with your server.
   Also it is possible to "fingerprint" nameservers to determine their version.

Q: How do I restrict only remote users from looking up the server version?

A: The following view statement will intercept lookups as the internal view
   that holds the version information will be matched last. The caveats of the
   previous answer still apply, of course.

   view "chaos" chaos {
           match-clients { <those to be refused>; };
           allow-query { none; };
           zone "." {
                   type hint;
                   file "/dev/null";  // or any empty file
           };
   };
d104 1
a104 1
   mean?
d107 4
a110 4
   mostly DNSSEC related. These messages indicate that you have no source of
   entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the random-device
   option in named.conf.
a111 1
Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
d113 1
a113 2
A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
   under /usr. Check that the correct named is running.
d115 2
a116 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers.
   I'm sure I have the keys set up correctly, but the server is rejecting the
   TSIG. Why?
a117 2
A: This may be a clock skew problem. Check that the the clocks on the client
   and server are properly synchronised (e.g., using ntp).
d119 3
a121 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
   found. Why?
d123 2
a124 3
A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
   doesn't work. If you are using one of these, use normal make or gmake
   instead.
a125 3
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging
   error messages like "notify to 10.0.0.1#53 failed: unexpected end of input".
   What's wrong?
d127 2
a128 3
A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in
   BIND 8.2.4. It can be safely ignored - the notify has been acted on by the
   slave despite the error message.
d130 3
a132 1
Q: I keep getting log messages like the following. Why?
a133 3
   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
   failed: 'RRset exists (value dependent)' prerequisite not satisfied
   (NXRRSET)
d135 3
a137 4
A: DNS updates allow the update request to test to see if certain conditions
   are met prior to proceeding with the update. The message above is saying
   that conditions were not met and the update is not proceeding. See doc/rfc/
   rfc2136.txt for more details on prerequisites.
d139 3
a141 1
Q: I keep getting log messages like the following. Why?
a142 1
   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
d144 1
a144 6
A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
   protocol. Windows 2000 machines have a habit of sending dynamic update
   requests to DNS servers without being specifically configured to do so. If
   the update requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information
   about how to turn them off.
d146 3
a148 1
Q: I see a log message like the following. Why?
d150 4
a153 1
   couldn't open pid file '/var/run/named.pid': Permission denied
a154 35
A: You are most likely running named as a non-root user, and that user does not
   have permission to write in /var/run. The common ways of fixing this are to
   create a /var/run/named directory owned by the named user and set pid-file
   to "/var/run/named/named.pid", or set pid-file to "named.pid", which will
   put the file in the directory specified by the directory option (which, in
   this case, must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the
   way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to
   avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a root
   server, and these records are eligible for inclusion as additional data in
   responses. Subsequently it receives a subset of the root server addresses as
   additional data in a non-authoritative (referral) response from a root
   server. This causes the addresses to now be considered non-authoritative
   (glue) data, which is not eligible for inclusion in responses.

   The server does have a complete set of root server addresses cached at all
   times, it just may not include all of them as additional data, depending on
   whether they were last received as answers or as glue. You can always look
   up the addresses with explicit queries like "dig a.root-servers.net A".

Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?

A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked around
   by setting the option "transfer-format one-answer;". Also check whether your
   zone contains domain names with embedded spaces or other special characters,
   like "John\032Doe\213s\032Computer", since such names have been known to
   cause Windows 2000 slaves to incorrectly reject the zone.
d156 1
a156 1
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
d158 1
a158 86
A: A zone can be updated either by editing zone files and reloading the server
   or by dynamic update, but not both. If you have enabled dynamic update for a
   zone using the "allow-update" option, you are not supposed to edit the zone
   file by hand, and the server will not attempt to reload it.

Q: I can query the nameserver from the nameserver but not from other machines.
   Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external view at
   the same time? When I tried, both views on the slave were transferred from
   the same view on the master.

A: You will need to give the master and slave multiple IP addresses and use
   those to make sure you reach the correct view on the other machine.

   Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
                   notify-source 10.0.1.1;
                   transfer-source 10.0.1.1;
                   query-source address 10.0.1.1;
       external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.2;
           transfer-source 10.0.1.2;
           query-source address 10.0.1.2;

   Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
           notify-source 10.0.1.3;
           transfer-source 10.0.1.3;
           query-source address 10.0.1.3;
      external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.4;
           transfer-source 10.0.1.4;
           query-source address 10.0.1.4;

   You put the external address on the alias so that all the other dns clients
   on these boxes see the internal view by default.

A: BIND 9.3 and later: Use TSIG to select the appropriate view.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.0.2 { keys external; };
                   recursion no;
                   ...
           };

   Slave 10.0.1.2:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.0.1 { keys external; };
                   recursion no;
                   ...
           };

Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
   certain interrupts as a source of random events. You can make this permanent
   by setting rand_irqs in /etc/rc.conf.
d160 6
a165 2
   /etc/rc.conf
   rand_irqs="3 14 15"
a166 1
   See also http://people.freebsd.org/~dougb/randomness.html
d168 1
a168 1
Q: Why is named listening on UDP port other than 53?
d170 1
a170 29
A: Named uses a system selected port to make queries of other nameservers. This
   behaviour can be overridden by using query-source to lock down the port and/
   or address. See also notify-source and transfer-source.

Q: I get error messages like "multiple RRs of singleton type" and "CNAME and
   other data" when transferring a zone. What does this mean?

A: These indicate a malformed master zone. You can identify the exact records
   involved by transferring the zone using dig then running named-checkzone on
   it.

   dig axfr example.com @@master-server > tmp
   named-checkzone example.com tmp

   A CNAME record cannot exist with the same name as another record except for
   the DNSSEC records which prove its existance (NSEC).

   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
   should be present; this ensures that the data for a canonical name and its
   aliases cannot be different. This rule also insures that a cached CNAME can
   be used without checking with an authoritative server for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input" where 99
   is the last line of named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title indication
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding"
   a blank line to the end of the file. Named expects to see EOF immediately
   after EOL and treats text files where this is not met as truncated.
d172 42
a213 2
Q: I get warning messages like "zone example.com/IN: refresh: failure trying
   master 1.2.3.4#53: timed out".
a214 1
A: Check that you can make UDP queries from the slave to the master
d216 1
a216 1
   dig +norec example.com soa @@1.2.3.4
d218 94
a311 2
   You could be generating queries faster than the slave can cope with. Lower
   the serial query rate.
d313 1
a313 1
   serial-query-rate 5; // default 20
a314 1
Q: How do I share a dynamic zone between multiple views?
d316 1
a316 2
A: You choose one view to be master and the second a slave and transfer the
   zone between views.
d318 3
a320 36
   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };

           key "mykey" {
                   algorithm hmac-md5;
                   secret "yyyyyyyy";
           };

           view "internal" {
                   match-clients { !external; 10.0.1/24; };
                   server 10.0.1.1 {
                           /* Deliver notify messages to external view. */
                           keys { external; };
                   };
                   zone "example.com" {
                           type master;
                           file "internal/example.db";
                           allow-update { key mykey; };
                           notify-also { 10.0.1.1; };
                   };
           };

           view "external" {
                   match-clients { external; any; };
                   zone "example.com" {
                           type slave;
                           file "external/example.db";
                           masters { 10.0.1.1; };
                           transfer-source { 10.0.1.1; };
                           // allow-update-forwarding { any; };
                           // allow-notify { ... };
                   };
           };
a321 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
   file primaries/wireless.ietf56.ietf.org: no owner".
d323 2
a324 4
A: This error is produced when a line in the master file contains leading white
   space (tab/space) but the is no current record owner name to inherit the
   name from. Usually this is the result of putting white space before a
   comment. Forgeting the "@@" for the SOA record or indenting the master file.
d326 3
a328 1
Q: Why are my logs in GMT (UTC).
d330 3
a332 2
A: You are running chrooted (-t) and have not supplied local timzone
   information in the chroot area.
a333 3
   FreeBSD: /etc/localtime
   Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
   OSF: /etc/zoneinfo/localtime
d335 2
a336 1
   See also tzset(3) and zic(8).
d338 4
a341 2
Q: I get the error message "named: capset failed: Operation not permitted" when
   starting named.
a342 2
A: The capability module, part of "Linux Security Modules/LSM", has not been
   loaded into the kernel. See insmod(8).
d344 2
a345 1
Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
d347 1
a347 1
A: This is usually a configuration error.
d349 1
a349 17
   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by "rndc-confgen
   -a", rndc-confgen or manually. The Administrators Reference manual has
   details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
   rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
   the default server listed in /etc/rndc.conf matches the addresses used in
   named.conf. "localhost" has two address (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure that
   /etc/rndc.conf has the correct ownership and that a copy is in the chroot
   area. You can do this by re-running "rndc-confgen -a" with appropriate -t
   and -u arguments.
d351 2
a352 1
Q: I don't get RRSIG's returned when I use "dig +dnssec".
d354 1
a354 1
A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
d356 1
a356 1
Q: I get "Error 1067" when starting named under Windows.
d358 2
a359 2
A: This is the service manager saying that named exited. You need to examine
   the Application log in the EventViewer to find out why.
d361 36
a396 3
   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.
d398 2
a399 3
   options {
           Directory "C:\windows\dns\etc";
   };
d401 5
a405 2
Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
   receiving responses: permission denied" error messages.
a406 3
A: These indicate a filesystem permission error preventing named creating /
   renaming the temporary file. These will usually also have other associated
   error messages like
d408 1
a408 1
   "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
d410 2
a411 5
   Named needs write permission on the directory containing the file. Named
   writes the new cache file to a temporary file then renames it to the name
   specified in named.conf to ensure that the contents are always complete.
   This is to prevent named loading a partial zone in the event of power
   failure or similar interrupting the write of the master file.
d413 3
a415 2
   Note file names are relative to the directory specified in options and any
   chroot directory ([<chroot dir>/][<options dir>]).
d417 1
a417 3
   If named is invoked as "named -t /chroot/DNS" with the following named.conf
   then "/chroot/DNS/var/named/sl" needs to be writable by the user named is
   running as.
a418 3
   options {
           directory "/var/named";
   };
d420 2
a421 5
   zone "example.net" {
           type slave;
           file "sl/example.net";
           masters { 192.168.4.12; };
   };
d423 1
a423 1
Q: How do I intergrate BIND 9 and Solaris SMF
a424 1
A: Sun has a blog entry describing how to do this.
d426 2
a427 1
   http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
d429 1
a429 1
Q: Can a NS record refer to a CNAME.
d431 19
a449 2
A: No. The rules for glue (copies of the *address* records in the parent zones)
   and additional section processing do not allow it to work.
a450 4
   You would have to add both the CNAME and address records (A/AAAA) as glue to
   the parent zone and have CNAMEs be followed when doing additional section
   processing to make it work. No namesever implementation supports either of
   these requirements.
d452 1
a452 1
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
d454 1
a454 6
A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
   using then you have failed to follow RFC 1918 usage rules and are leaking
   queries to the Internet. You should establish your own zones for these
   addresses to prevent you quering the Internet's name servers for these
   addresses. Please see http://as112.net/ for details of the problems you are
   causing and the counter measures that have had to be deployed.
a455 4
   If you are not using these private addresses then a client has queried for
   them. You can just ignore the messages, get the offending client to stop
   sending you these messages as they are most probably leaking them or setup
   your own zones empty zones to serve answers to these queries.
d457 1
a457 21
   zone "10.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "16.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   ...

   zone "31.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "168.192.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };
d459 2
a460 4
   empty:
   @@ 10800 IN SOA <name-of-server>. <contact-email>. (
                  1 3600 1200 604800 10800 )
   @@ 10800 IN NS <name-of-server>.
d462 7
a468 1
   Note
a469 1
   Future versions of named are likely to do this automatically.
@


1.1.1.2.2.1.4.1
log
@MFC upgrade to version 9.3.3

Approved by:    re (kensmith)
@
text
@d7 6
a12 6
A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
   particular, setuid() operates only on the current thread, not the full process.
   Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
   all other supported platforms. setuid() cannot be called before creating
   threads, since the server does not start listening on reserved ports until
   after threads have started.
d16 2
a17 2
   setuid() early, while retaining the ability to bind reserved ports. This is a
   Linux-specific hack.
d19 2
a20 2
   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
   a security risk than a root process that has not dropped privileges.
a26 10
Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

d43 3
a45 6
   threads running is n+4, where n is the number of CPUs. Note that the amount of
   memory used is not cumulative; if each process is using 10M of memory, only a
   total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and require -L
   to display them.
d50 4
a53 4
A: On Linux, BIND 9 drops most of its root privileges on startup. This including
   the privilege to open files owned by other users. Therefore, if the server is
   running as root, the configuration files and zone files should also be owned by
   root.
d55 2
a56 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
   ran out of space"?
d58 2
a59 2
A: This is often caused by TXT records with missing close quotes. Check that all
   TXT records containing quoted strings have both open and close quotes.
d71 4
a74 4
A: Put a "version" option containing something other than the real version in the
   "options" section of named.conf. Note doing this will not prevent attacks and
   may impede people trying to diagnose problems with your server. Also it is
   possible to "fingerprint" nameservers to determine their version.
d78 3
a80 3
A: The following view statement will intercept lookups as the internal view that
   holds the version information will be matched last. The caveats of the previous
   answer still apply, of course.
d94 5
a98 4
A: The server requires a source of entropy to perform certain operations, mostly
   DNSSEC related. These messages indicate that you have no source of entropy. On
   systems with /dev/random or an equivalent, it is used by default. A source of
   entropy can also be defined using the random-device option in named.conf.
d105 3
a107 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
   sure I have the keys set up correctly, but the server is rejecting the TSIG.
   Why?
d109 2
a110 2
A: This may be a clock skew problem. Check that the the clocks on the client and
   server are properly synchronised (e.g., using ntp).
d116 2
a117 1
   doesn't work. If you are using one of these, use normal make or gmake instead.
d119 7
a125 7
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
   messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
   wrong?

A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
   8.2.4. It can be safely ignored - the notify has been acted on by the slave
   despite the error message.
d130 2
a131 1
   failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
d133 3
a135 3
A: DNS updates allow the update request to test to see if certain conditions are
   met prior to proceeding with the update. The message above is saying that
   conditions were not met and the update is not proceeding. See doc/rfc/
d143 5
a147 5
   protocol. Windows 2000 machines have a habit of sending dynamic update requests
   to DNS servers without being specifically configured to do so. If the update
   requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
   how to turn them off.
d155 19
a173 19
   create a /var/run/named directory owned by the named user and set pid-file to "
   /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
   file in the directory specified by the directory option (which, in this case,
   must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are missing.
   Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the way
   BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
   promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root server
   addresses as additional data in an authoritative response from a root server,
   and these records are eligible for inclusion as additional data in responses.
   Subsequently it receives a subset of the root server addresses as additional
   data in a non-authoritative (referral) response from a root server. This causes
   the addresses to now be considered non-authoritative (glue) data, which is not
   eligible for inclusion in responses.
d177 2
a178 2
   whether they were last received as answers or as glue. You can always look up
   the addresses with explicit queries like "dig a.root-servers.net A".
d182 6
a187 6
A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
   larger than 16K are not handled properly. This can be worked around by setting
   the option "transfer-format one-answer;". Also check whether your zone contains
   domain names with embedded spaces or other special characters, like "John\
   032Doe\213s\032Computer", since such names have been known to cause Windows
   2000 slaves to incorrectly reject the zone.
d191 4
a194 4
A: A zone can be updated either by editing zone files and reloading the server or
   by dynamic update, but not both. If you have enabled dynamic update for a zone
   using the "allow-update" option, you are not supposed to edit the zone file by
   hand, and the server will not attempt to reload it.
d199 2
a200 2
A: This is usually the result of the firewall configuration stopping the queries
   and / or the replies.
d203 2
a204 2
   the same time? When I tried, both views on the slave were transferred from the
   same view on the master.
d206 2
a207 2
A: You will need to give the master and slave multiple IP addresses and use those
   to make sure you reach the correct view on the other machine.
d235 2
a236 2
   You put the external address on the alias so that all the other dns clients on
   these boxes see the internal view by default.
d251 1
a251 1
                   server 10.0.1.2 { keys external; };
d267 1
a267 1
                   server 10.0.1.1 { keys external; };
d275 2
a276 2
   certain interrupts as a source of random events. You can make this permanent by
   setting rand_irqs in /etc/rc.conf.
d286 2
a287 2
   behaviour can be overridden by using query-source to lock down the port and/or
   address. See also notify-source and transfer-source.
d289 2
a290 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
   data" when transferring a zone. What does this mean?
d293 2
a294 1
   involved by transferring the zone using dig then running named-checkzone on it.
d299 2
a300 2
   A CNAME record cannot exist with the same name as another record except for the
   DNSSEC records which prove its existance (NSEC).
d304 2
a305 2
   aliases cannot be different. This rule also insures that a cached CNAME can be
   used without checking with an authoritative server for other RR types."
d307 2
a308 2
Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
   the last line of named.conf.
d311 3
a313 3
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
   blank line to the end of the file. Named expects to see EOF immediately after
   EOL and treats text files where this is not met as truncated.
d322 2
a323 2
   You could be generating queries faster than the slave can cope with. Lower the
   serial query rate.
d329 2
a330 2
A: You choose one view to be master and the second a slave and transfer the zone
   between views.
d373 3
a375 3
   space (tab/space) but the is no current record owner name to inherit the name
   from. Usually this is the result of putting white space before a comment.
   Forgeting the "@@" for the SOA record or indenting the master file.
d379 2
a380 2
A: You are running chrooted (-t) and have not supplied local timzone information
   in the chroot area.
d398 3
a400 3
   First ensure that named is running and no errors are being reported at startup
   (/var/log/messages or equivalent). Running "named -g <usual arguments>" from a
   title can help at this point.
d403 2
a404 2
   -a", rndc-confgen or manually. The Administrators Reference manual has details
   on how to do this.
d411 4
a414 4
   If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
   etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
   You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
   arguments.
d422 2
a423 2
A: This is the service manager saying that named exited. You need to examine the
   Application log in the EventViewer to find out why.
d425 3
a427 2
   Common causes are that you failed to create "named.conf" (usually "C:\windows\
   dns\etc\named.conf") or failed to specify the directory in named.conf.
d442 5
a446 5
   Named needs write permission on the directory containing the file. Named writes
   the new cache file to a temporary file then renames it to the name specified in
   named.conf to ensure that the contents are always complete. This is to prevent
   named loading a partial zone in the event of power failure or similar
   interrupting the write of the master file.
d492 2
a493 2
   sending you these messages as they are most probably leaking them or setup your
   own zones empty zones to serve answers to these queries.
a525 99
Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones from
   journals?

   Why can't named create custom log files?

A: Red Hat Security Enhanced Linux (SELinux) policy security protections :

   Red Hat have adopted the National Security Agency's SELinux security policy (
   see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
   are more secure than running named in a chroot and make use of the bind-chroot
   environment unecessary .

   By default, named is not allowed by the SELinux policy to write, create or
   delete any files EXCEPT in these directories:

   $ROOTDIR/var/named/slaves
   $ROOTDIR/var/named/data
   $ROOTDIR/var/tmp


   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.

   The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
   /named directory, the default location for master zone database files.

   SELinux policy overrules file access permissions - so even if all the files
   under /var/named have ownership named:named and mode rw-rw-r--, named will
   still not be able to write or create files except in the directories above,
   with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to locate
   them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:

   zone "slave.zone." IN {
           type slave;
           file "slaves/slave.zone.db";
           ...
   };
   zone "ddns.zone." IN  {
           type master;
           allow-updates {...};
           file "slaves/ddns.zone.db";
   };


   To allow named to create its cache dump and statistics files, for example, you
   could use named.conf options statements such as:

   options {
           ...
           dump-file "/var/named/data/cache_dump.db";
           statistics-file "/var/named/data/named_stats.txt";
           ...
   };


   You can also tell SELinux to allow named to update any zone database files, by
   setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
   using the system-config-securitylevel GUI, using the 'setsebool' command, or in
   /etc/selinux/targeted/booleans.

   You can disable SELinux protection for named entirely by setting the
   'named_disable_trans=1' SELinux tunable boolean parameter.

   The SELinux named policy defines these SELinux contexts for named:

   named_zone_t : for zone database files       - $ROOTDIR/var/named/*
   named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
   named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


   If you want to retain use of the SELinux policy for named, and put named files
   in different locations, you can do so by changing the context of the custom
   file locations .

   To create a custom configuration file location, eg. '/root/named.conf', to use
   with the 'named -c' option, do:

   # chcon system_u:object_r:named_conf_t /root/named.conf


   To create a custom modifiable named data location, eg. '/var/log/named' for a
   log file, do:

   # chcon system_u:object_r:named_cache_t /var/log/named


   To create a custom zone file location, eg. /root/zones/, do:

   # chcon system_u:object_r:named_zone_t /root/zones/{.,*}


   See these man-pages for more information : selinux(8), named_selinux(8), chcon
   (1), setsebool(8)

@


1.1.1.2.2.2
log
@MFC upgrade to version 9.3.3

Approved by:	re (kensmith)
@
text
@d7 6
a12 6
A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
   particular, setuid() operates only on the current thread, not the full process.
   Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
   all other supported platforms. setuid() cannot be called before creating
   threads, since the server does not start listening on reserved ports until
   after threads have started.
d16 2
a17 2
   setuid() early, while retaining the ability to bind reserved ports. This is a
   Linux-specific hack.
d19 2
a20 2
   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
   a security risk than a root process that has not dropped privileges.
a26 10
Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

d43 3
a45 6
   threads running is n+4, where n is the number of CPUs. Note that the amount of
   memory used is not cumulative; if each process is using 10M of memory, only a
   total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and require -L
   to display them.
d50 4
a53 4
A: On Linux, BIND 9 drops most of its root privileges on startup. This including
   the privilege to open files owned by other users. Therefore, if the server is
   running as root, the configuration files and zone files should also be owned by
   root.
d55 2
a56 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
   ran out of space"?
d58 2
a59 2
A: This is often caused by TXT records with missing close quotes. Check that all
   TXT records containing quoted strings have both open and close quotes.
d71 4
a74 4
A: Put a "version" option containing something other than the real version in the
   "options" section of named.conf. Note doing this will not prevent attacks and
   may impede people trying to diagnose problems with your server. Also it is
   possible to "fingerprint" nameservers to determine their version.
d78 3
a80 3
A: The following view statement will intercept lookups as the internal view that
   holds the version information will be matched last. The caveats of the previous
   answer still apply, of course.
d94 5
a98 4
A: The server requires a source of entropy to perform certain operations, mostly
   DNSSEC related. These messages indicate that you have no source of entropy. On
   systems with /dev/random or an equivalent, it is used by default. A source of
   entropy can also be defined using the random-device option in named.conf.
d105 3
a107 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
   sure I have the keys set up correctly, but the server is rejecting the TSIG.
   Why?
d109 2
a110 2
A: This may be a clock skew problem. Check that the the clocks on the client and
   server are properly synchronised (e.g., using ntp).
d116 2
a117 1
   doesn't work. If you are using one of these, use normal make or gmake instead.
d119 7
a125 7
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
   messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
   wrong?

A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
   8.2.4. It can be safely ignored - the notify has been acted on by the slave
   despite the error message.
d130 2
a131 1
   failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
d133 3
a135 3
A: DNS updates allow the update request to test to see if certain conditions are
   met prior to proceeding with the update. The message above is saying that
   conditions were not met and the update is not proceeding. See doc/rfc/
d143 5
a147 5
   protocol. Windows 2000 machines have a habit of sending dynamic update requests
   to DNS servers without being specifically configured to do so. If the update
   requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
   how to turn them off.
d155 19
a173 19
   create a /var/run/named directory owned by the named user and set pid-file to "
   /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
   file in the directory specified by the directory option (which, in this case,
   must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are missing.
   Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the way
   BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
   promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root server
   addresses as additional data in an authoritative response from a root server,
   and these records are eligible for inclusion as additional data in responses.
   Subsequently it receives a subset of the root server addresses as additional
   data in a non-authoritative (referral) response from a root server. This causes
   the addresses to now be considered non-authoritative (glue) data, which is not
   eligible for inclusion in responses.
d177 2
a178 2
   whether they were last received as answers or as glue. You can always look up
   the addresses with explicit queries like "dig a.root-servers.net A".
d182 6
a187 6
A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
   larger than 16K are not handled properly. This can be worked around by setting
   the option "transfer-format one-answer;". Also check whether your zone contains
   domain names with embedded spaces or other special characters, like "John\
   032Doe\213s\032Computer", since such names have been known to cause Windows
   2000 slaves to incorrectly reject the zone.
d191 4
a194 4
A: A zone can be updated either by editing zone files and reloading the server or
   by dynamic update, but not both. If you have enabled dynamic update for a zone
   using the "allow-update" option, you are not supposed to edit the zone file by
   hand, and the server will not attempt to reload it.
d199 2
a200 2
A: This is usually the result of the firewall configuration stopping the queries
   and / or the replies.
d203 2
a204 2
   the same time? When I tried, both views on the slave were transferred from the
   same view on the master.
d206 2
a207 2
A: You will need to give the master and slave multiple IP addresses and use those
   to make sure you reach the correct view on the other machine.
d235 2
a236 2
   You put the external address on the alias so that all the other dns clients on
   these boxes see the internal view by default.
d251 1
a251 1
                   server 10.0.1.2 { keys external; };
d267 1
a267 1
                   server 10.0.1.1 { keys external; };
d275 2
a276 2
   certain interrupts as a source of random events. You can make this permanent by
   setting rand_irqs in /etc/rc.conf.
d286 2
a287 2
   behaviour can be overridden by using query-source to lock down the port and/or
   address. See also notify-source and transfer-source.
d289 2
a290 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
   data" when transferring a zone. What does this mean?
d293 2
a294 1
   involved by transferring the zone using dig then running named-checkzone on it.
d299 2
a300 2
   A CNAME record cannot exist with the same name as another record except for the
   DNSSEC records which prove its existance (NSEC).
d304 2
a305 2
   aliases cannot be different. This rule also insures that a cached CNAME can be
   used without checking with an authoritative server for other RR types."
d307 2
a308 2
Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
   the last line of named.conf.
d311 3
a313 3
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
   blank line to the end of the file. Named expects to see EOF immediately after
   EOL and treats text files where this is not met as truncated.
d322 2
a323 2
   You could be generating queries faster than the slave can cope with. Lower the
   serial query rate.
d329 2
a330 2
A: You choose one view to be master and the second a slave and transfer the zone
   between views.
d373 3
a375 3
   space (tab/space) but the is no current record owner name to inherit the name
   from. Usually this is the result of putting white space before a comment.
   Forgeting the "@@" for the SOA record or indenting the master file.
d379 2
a380 2
A: You are running chrooted (-t) and have not supplied local timzone information
   in the chroot area.
d398 3
a400 3
   First ensure that named is running and no errors are being reported at startup
   (/var/log/messages or equivalent). Running "named -g <usual arguments>" from a
   title can help at this point.
d403 2
a404 2
   -a", rndc-confgen or manually. The Administrators Reference manual has details
   on how to do this.
d411 4
a414 4
   If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
   etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
   You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
   arguments.
d422 2
a423 2
A: This is the service manager saying that named exited. You need to examine the
   Application log in the EventViewer to find out why.
d425 3
a427 2
   Common causes are that you failed to create "named.conf" (usually "C:\windows\
   dns\etc\named.conf") or failed to specify the directory in named.conf.
d442 5
a446 5
   Named needs write permission on the directory containing the file. Named writes
   the new cache file to a temporary file then renames it to the name specified in
   named.conf to ensure that the contents are always complete. This is to prevent
   named loading a partial zone in the event of power failure or similar
   interrupting the write of the master file.
d492 2
a493 2
   sending you these messages as they are most probably leaking them or setup your
   own zones empty zones to serve answers to these queries.
a525 99
Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones from
   journals?

   Why can't named create custom log files?

A: Red Hat Security Enhanced Linux (SELinux) policy security protections :

   Red Hat have adopted the National Security Agency's SELinux security policy (
   see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
   are more secure than running named in a chroot and make use of the bind-chroot
   environment unecessary .

   By default, named is not allowed by the SELinux policy to write, create or
   delete any files EXCEPT in these directories:

   $ROOTDIR/var/named/slaves
   $ROOTDIR/var/named/data
   $ROOTDIR/var/tmp


   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.

   The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
   /named directory, the default location for master zone database files.

   SELinux policy overrules file access permissions - so even if all the files
   under /var/named have ownership named:named and mode rw-rw-r--, named will
   still not be able to write or create files except in the directories above,
   with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to locate
   them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:

   zone "slave.zone." IN {
           type slave;
           file "slaves/slave.zone.db";
           ...
   };
   zone "ddns.zone." IN  {
           type master;
           allow-updates {...};
           file "slaves/ddns.zone.db";
   };


   To allow named to create its cache dump and statistics files, for example, you
   could use named.conf options statements such as:

   options {
           ...
           dump-file "/var/named/data/cache_dump.db";
           statistics-file "/var/named/data/named_stats.txt";
           ...
   };


   You can also tell SELinux to allow named to update any zone database files, by
   setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
   using the system-config-securitylevel GUI, using the 'setsebool' command, or in
   /etc/selinux/targeted/booleans.

   You can disable SELinux protection for named entirely by setting the
   'named_disable_trans=1' SELinux tunable boolean parameter.

   The SELinux named policy defines these SELinux contexts for named:

   named_zone_t : for zone database files       - $ROOTDIR/var/named/*
   named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
   named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


   If you want to retain use of the SELinux policy for named, and put named files
   in different locations, you can do so by changing the context of the custom
   file locations .

   To create a custom configuration file location, eg. '/root/named.conf', to use
   with the 'named -c' option, do:

   # chcon system_u:object_r:named_conf_t /root/named.conf


   To create a custom modifiable named data location, eg. '/var/log/named' for a
   log file, do:

   # chcon system_u:object_r:named_cache_t /var/log/named


   To create a custom zone file location, eg. /root/zones/, do:

   # chcon system_u:object_r:named_zone_t /root/zones/{.,*}


   See these man-pages for more information : selinux(8), named_selinux(8), chcon
   (1), setsebool(8)

@


1.1.1.2.2.3
log
@MFC the upgrade to BIND 9.3.4
@
text
@a2 4
Copyright  2004-2007 Internet Systems Consortium, Inc. ("ISC")

Copyright  2000-2003 Internet Software Consortium.

a632 39
Q: I want to forward all DNS queries from my caching nameserver to another server.
   But there are some domains which have to be served locally, via rbldnsd.

   How do I achieve this ?

A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Will named be affected by the 2007 changes to daylight savings rules in the US.

A: No, so long as the machines internal clock (as reported by "date -u") remains
   at UTC. The only visible change if you fail to upgrade your OS, if you are in a
   affected area, will be that log messages will be a hour out during the period
   where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the conversion
   rules from UTC to local time. Normally this involves updating a file in /etc
   (which sets the default timezone for the machine) and possibly a directory
   which has all the conversion rules for the world (e.g. /usr/share/zoneinfo).
   When updating the OS do not forget to update any chroot areas as well. See your
   OS's documetation for more details.

   The local timezone conversion rules can also be done on a individual basis by
   setting the TZ envirionment variable appropriately. See your OS's documentation
   for more details.

@


1.1.1.2.2.4
log
@SVN rev 179502 on 2008-06-03 05:38:10Z by dougb

Update to version 9.3.5. It contains the latest bug fixes, updates
to root server addresses, and a fix for the vulnerability mentioned
here: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0122

Users of BIND 9.3.x are strongly encouraged to upgrade to this
version. Also, the 9.3.x branch is now in maintenance-only mode.
Users are encouraged to investigate BIND 9.4.x or perhaps 9.5.x.

http://www.isc.org/index.pl?/sw/bind/versions_and_support.php

This udpate is being done by updating the files directly in this
branch rather than an import + MFC because BIND in HEAD is 9.4.x.
@
text
@d3 1
a3 1
Copyright  2004-2008 Internet Systems Consortium, Inc. ("ISC")
d7 1
a7 1
-----------------------------------------------------------------------
d9 1
a9 1
1. Compilation and Installation Questions
d11 6
a16 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not
   being found. Why?
d18 4
a21 3
A: Using a parallel or distributed "make" to build BIND 9 is not
   supported, and doesn't work. If you are using one of these, use normal
   make or gmake instead.
d23 2
a24 1
Q: Isn't "make install" supposed to generate a default named.conf?
d26 1
a26 1
A: Short Answer: No.
d28 2
a29 5
   Long Answer: There really isn't a default configuration which fits any
   site perfectly. There are lots of decisions that need to be made and
   there is no consensus on what the defaults should be. For example
   FreeBSD uses /etc/namedb as the location where the configuration files
   for named are stored. Others use /var/named.
d31 1
a31 2
   What addresses to listen on? For a laptop on the move a lot you may
   only want to listen on the loop back interfaces.
d33 3
a35 5
   Who do you offer recursive service to? Is there are firewall to
   consider? If so is it stateless or stateful. Are you directly on the
   Internet? Are you on a private network? Are you on a NAT'd network? The
   answers to all these questions change how you configure even a caching
   name server.
d37 3
a39 1
2. Configuration and Setup Questions
d41 2
a42 2
Q: Why does named log the warning message "no TTL specified - using SOA
   MINTTL instead"?
d44 2
a45 2
A: Your zone file is illegal according to RFC1035. It must either have a
   line like:
d49 2
a50 2
   at the beginning, or the first record in it must have a TTL field, like
   the "84600" in this example:
d54 1
a54 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master
   file bar: ran out of space"?
d56 29
a84 3
A: This is often caused by TXT records with missing close quotes. Check
   that all TXT records containing quoted strings have both open and close
   quotes.
d88 4
a91 5
A: Put a "version" option containing something other than the real version
   in the "options" section of named.conf. Note doing this will not
   prevent attacks and may impede people trying to diagnose problems with
   your server. Also it is possible to "fingerprint" nameservers to
   determine their version.
d95 3
a97 3
A: The following view statement will intercept lookups as the internal
   view that holds the version information will be matched last. The
   caveats of the previous answer still apply, of course.
d108 35
a142 2
Q: What do "no source of entropy found" or "could not open entropy source
   foo" mean?
d144 2
a145 9
A: The server requires a source of entropy to perform certain operations,
   mostly DNSSEC related. These messages indicate that you have no source
   of entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the
   random-device option in named.conf.

Q: I'm trying to use TSIG to authenticate dynamic updates or zone
   transfers. I'm sure I have the keys set up correctly, but the server is
   rejecting the TSIG. Why?
d147 15
a161 2
A: This may be a clock skew problem. Check that the the clocks on the
   client and server are properly synchronised (e.g., using ntp).
d167 45
a211 17
A: You are most likely running named as a non-root user, and that user
   does not have permission to write in /var/run. The common ways of
   fixing this are to create a /var/run/named directory owned by the named
   user and set pid-file to "/var/run/named/named.pid", or set pid-file to
   "named.pid", which will put the file in the directory specified by the
   directory option (which, in this case, must be writable by the named
   user).

Q: I can query the nameserver from the nameserver but not from other
   machines. Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external
   view at the same time? When I tried, both views on the slave were
   transferred from the same view on the master.
d213 9
a221 2
A: You will need to give the master and slave multiple IP addresses and
   use those to make sure you reach the correct view on the other machine.
d249 2
a250 2
   You put the external address on the alias so that all the other dns
   clients on these boxes see the internal view by default.
d286 19
a304 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME
   and other data" when transferring a zone. What does this mean?
d306 2
a307 3
A: These indicate a malformed master zone. You can identify the exact
   records involved by transferring the zone using dig then running
   named-checkzone on it.
d312 25
a336 2
   A CNAME record cannot exist with the same name as another record except
   for the DNSSEC records which prove its existence (NSEC).
d338 1
a338 14
   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other
   data should be present; this ensures that the data for a canonical name
   and its aliases cannot be different. This rule also insures that a
   cached CNAME can be used without checking with an authoritative server
   for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input"
   where 99 is the last line of named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title
   indication (e.g. CR/LF) on the last line of a text file. This can be
   fixed by "adding" a blank line to the end of the file. Named expects to
   see EOF immediately after EOL and treats text files where this is not
   met as truncated.
d342 2
a343 2
A: You choose one view to be master and the second a slave and transfer
   the zone between views.
d357 1
a357 1
                   match-clients { !key external; 10.0.1/24; };
d371 1
a371 1
                   match-clients { key external; any; };
d382 2
a383 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
   master file primaries/wireless.ietf56.ietf.org: no owner".
d385 4
a388 5
A: This error is produced when a line in the master file contains leading
   white space (tab/space) but the is no current record owner name to
   inherit the name from. Usually this is the result of putting white
   space before a comment, forgetting the "@@" for the SOA record, or
   indenting the master file.
d392 2
a393 2
A: You are running chrooted (-t) and have not supplied local timezone
   information in the chroot area.
d401 7
a407 2
Q: I get "rndc: connect failed: connection refused" when I try to run
   rndc.
d411 33
a443 18
   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by
   "rndc-confgen -a", rndc-confgen or manually. The Administrators
   Reference manual has details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /
   etc/rndc.conf for the default server. Update /etc/rndc.conf if
   necessary so that the default server listed in /etc/rndc.conf matches
   the addresses used in named.conf. "localhost" has two address
   (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure
   that /etc/rndc.conf has the correct ownership and that a copy is in the
   chroot area. You can do this by re-running "rndc-confgen -a" with
   appropriate -t and -u arguments.
d448 3
a450 3
A: These indicate a filesystem permission error preventing named creating
   / renaming the temporary file. These will usually also have other
   associated error messages like
d454 12
a465 12
   Named needs write permission on the directory containing the file.
   Named writes the new cache file to a temporary file then renames it to
   the name specified in named.conf to ensure that the contents are always
   complete. This is to prevent named loading a partial zone in the event
   of power failure or similar interrupting the write of the master file.

   Note file names are relative to the directory specified in options and
   any chroot directory ([<chroot dir>/][<options dir>]).

   If named is invoked as "named -t /chroot/DNS" with the following
   named.conf then "/chroot/DNS/var/named/sl" needs to be writable by the
   user named is running as.
d477 1
a477 3
Q: I want to forward all DNS queries from my caching nameserver to another
   server. But there are some domains which have to be served locally, via
   rbldnsd.
d479 1
a479 1
   How do I achieve this ?
d481 1
a481 115
A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Can you help me understand how BIND 9 uses memory to store DNS zones?

   Some times it seems to take several times the amount of memory it needs
   to store the zone.

A: When reloading a zone named my have multiple copies of the zone in
   memory at one time. The zone it is serving and the one it is loading.
   If reloads are ultra fast it can have more still.

   e.g. Ones that are transferring out, the one that it is serving and the
   one that is loading.

   BIND 8 destroyed the zone before loading and also killed off outgoing
   transfers of the zone.

   The new strategy allows slaves to get copies of the new zone regardless
   of how often the master is loaded compared to the transfer time. The
   slave might skip some intermediate versions but the transfers will
   complete and it will keep reasonably in sync with the master.

   The new strategy also allows the master to recover from syntax and
   other errors in the master file as it still has an in-core copy of the
   old contents.

3. General Questions

Q: I keep getting log messages like the following. Why?

   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
   update failed: 'RRset exists (value dependent)' prerequisite not
   satisfied (NXRRSET)

A: DNS updates allow the update request to test to see if certain
   conditions are met prior to proceeding with the update. The message
   above is saying that conditions were not met and the update is not
   proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.

Q: I keep getting log messages like the following. Why?

   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied

A: Someone is trying to update your DNS data using the RFC2136 Dynamic
   Update protocol. Windows 2000 machines have a habit of sending dynamic
   update requests to DNS servers without being specifically configured to
   do so. If the update requests are coming from a Windows 2000 machine,
   see http://support.microsoft.com/support/kb/articles/q246/8/04.asp for
   information about how to turn them off.

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of
   the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
   makes to avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a
   root server, and these records are eligible for inclusion as additional
   data in responses. Subsequently it receives a subset of the root server
   addresses as additional data in a non-authoritative (referral) response
   from a root server. This causes the addresses to now be considered
   non-authoritative (glue) data, which is not eligible for inclusion in
   responses.

   The server does have a complete set of root server addresses cached at
   all times, it just may not include all of them as additional data,
   depending on whether they were last received as answers or as glue. You
   can always look up the addresses with explicit queries like "dig
   a.root-servers.net A".

Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?

A: A zone can be updated either by editing zone files and reloading the
   server or by dynamic update, but not both. If you have enabled dynamic
   update for a zone using the "allow-update" option, you are not supposed
   to edit the zone file by hand, and the server will not attempt to
   reload it.

Q: Why is named listening on UDP port other than 53?

A: Named uses a system selected port to make queries of other nameservers.
   This behaviour can be overridden by using query-source to lock down the
   port and/or address. See also notify-source and transfer-source.

Q: I get warning messages like "zone example.com/IN: refresh: failure
   trying master 1.2.3.4#53: timed out".

A: Check that you can make UDP queries from the slave to the master

   dig +norec example.com soa @@1.2.3.4

   You could be generating queries faster than the slave can cope with.
   Lower the serial query rate.

   serial-query-rate 5; // default 20

Q: I don't get RRSIG's returned when I use "dig +dnssec".

A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
d485 2
a486 7
A: No. The rules for glue (copies of the *address* records in the parent
   zones) and additional section processing do not allow it to work.

   You would have to add both the CNAME and address records (A/AAAA) as
   glue to the parent zone and have CNAMEs be followed when doing
   additional section processing to make it work. No nameserver
   implementation supports either of these requirements.
d488 18
a505 15
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
   mean?

A: If the IN-ADDR.ARPA name covered refers to a internal address space you
   are using then you have failed to follow RFC 1918 usage rules and are
   leaking queries to the Internet. You should establish your own zones
   for these addresses to prevent you querying the Internet's name servers
   for these addresses. Please see http://as112.net/ for details of the
   problems you are causing and the counter measures that have had to be
   deployed.

   If you are not using these private addresses then a client has queried
   for them. You can just ignore the messages, get the offending client to
   stop sending you these messages as they are most probably leaking them
   or setup your own zones empty zones to serve answers to these queries.
a537 93
Q: Will named be affected by the 2007 changes to daylight savings rules in
   the US.

A: No, so long as the machines internal clock (as reported by "date -u")
   remains at UTC. The only visible change if you fail to upgrade your OS,
   if you are in a affected area, will be that log messages will be a hour
   out during the period where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the
   conversion rules from UTC to local time. Normally this involves
   updating a file in /etc (which sets the default timezone for the
   machine) and possibly a directory which has all the conversion rules
   for the world (e.g. /usr/share/zoneinfo). When updating the OS do not
   forget to update any chroot areas as well. See your OS's documentation
   for more details.

   The local timezone conversion rules can also be done on a individual
   basis by setting the TZ environment variable appropriately. See your
   OS's documentation for more details.

Q: Is there a bugzilla (or other tool) database that mere mortals can have
   (read-only) access to for bind?

A: No. The BIND 9 bug database is kept closed for a number of reasons.
   These include, but are not limited to, that the database contains
   proprietory information from people reporting bugs. The database has in
   the past and may in future contain unfixed bugs which are capable of
   bringing down most of the Internet's DNS infrastructure.

   The release pages for each version contain up to date lists of bugs
   that have been fixed post release. That is as close as we can get to
   providing a bug database.

4. Operating-System Specific Questions

4.1. HPUX

Q: I get the following error trying to configure BIND:

   checking if unistd.h or sys/types.h defines fd_set... no
   configure: error: need either working unistd.h or sys/select.h

A: You have attempted to configure BIND with the bundled C compiler. This
   compiler does not meet the minimum compiler requirements to for
   building BIND. You need to install a ANSI C compiler and / or teach
   configure how to find the ANSI C compiler. The later can be done by
   adjusting the PATH environment variable and / or specifying the
   compiler via CC.

   ./configure CC=<compiler> ...

4.2. Linux

Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

Q: Why do I see 5 (or more) copies of named on Linux?

A: Linux threads each show up as a process under ps. The approximate
   number of threads running is n+4, where n is the number of CPUs. Note
   that the amount of memory used is not cumulative; if each process is
   using 10M of memory, only a total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and
   require -L to display them.

Q: Why does BIND 9 log "permission denied" errors accessing its
   configuration files or zones on my Linux system even though it is
   running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore,
   if the server is running as root, the configuration files and zone
   files should also be owned by root.

Q: I get the error message "named: capset failed: Operation not permitted"
   when starting named.

A: The capability module, part of "Linux Security Modules/LSM", has not
   been loaded into the kernel. See insmod(8), modprobe(8).

   The relevant modules can be loaded by running:

   modprobe commoncap
   modprobe capability

d542 2
a543 2
   Why can't named create DDNS journal files or update the master zones
   from journals?
d549 4
a552 4
   Red Hat have adopted the National Security Agency's SELinux security
   policy ( see http://www.nsa.gov/selinux ) and recommendations for BIND
   security , which are more secure than running named in a chroot and
   make use of the bind-chroot environment unnecessary .
d554 2
a555 2
   By default, named is not allowed by the SELinux policy to write, create
   or delete any files EXCEPT in these directories:
d562 4
a565 2
   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
   installed.
d567 7
a573 12
   The SELinux policy particularly does NOT allow named to modify the
   $ROOTDIR/var/named directory, the default location for master zone
   database files.

   SELinux policy overrules file access permissions - so even if all the
   files under /var/named have ownership named:named and mode rw-rw-r--,
   named will still not be able to write or create files except in the
   directories above, with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to
   locate them in $ROOTDIR/var/named/slaves, with named.conf zone
   statements such as:
d587 2
a588 2
   To allow named to create its cache dump and statistics files, for
   example, you could use named.conf options statements such as:
d598 4
a601 5
   You can also tell SELinux to allow named to update any zone database
   files, by setting the SELinux tunable boolean parameter
   'named_write_master_zones=1', using the system-config-securitylevel
   GUI, using the 'setsebool' command, or in /etc/selinux/targeted/
   booleans.
d613 3
a615 3
   If you want to retain use of the SELinux policy for named, and put
   named files in different locations, you can do so by changing the
   context of the custom file locations .
d617 2
a618 2
   To create a custom configuration file location, e.g. '/root/
   named.conf', to use with the 'named -c' option, do:
d623 2
a624 2
   To create a custom modifiable named data location, e.g. '/var/log/
   named' for a log file, do:
d629 1
a629 1
   To create a custom zone file location, e.g. /root/zones/, do:
d634 2
a635 2
   See these man-pages for more information : selinux(8), named_selinux
   (8), chcon(1), setsebool(8)
d637 2
a638 1
Q: Listening on individual IPv6 interfaces does not work.
d640 1
a640 3
A: This is usually due to "/proc/net/if_inet6" not being available in the
   chroot file system. Mount another instance of "proc" in the chroot file
   system.
d642 4
a645 2
   This can be be made permanent by adding a second instance to /etc/
   fstab.
d647 3
a649 27
   proc /proc           proc defaults 0 0
   proc /var/named/proc proc defaults 0 0

4.3. Windows

Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail.
   Why?

A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked
   around by setting the option "transfer-format one-answer;". Also check
   whether your zone contains domain names with embedded spaces or other
   special characters, like "John\032Doe\213s\032Computer", since such
   names have been known to cause Windows 2000 slaves to incorrectly
   reject the zone.

Q: I get "Error 1067" when starting named under Windows.

A: This is the service manager saying that named exited. You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.

   options {
           Directory "C:\windows\dns\etc";
d652 3
a654 34
4.4. FreeBSD

Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to
   use certain interrupts as a source of random events. You can make this
   permanent by setting rand_irqs in /etc/rc.conf.

   /etc/rc.conf
   rand_irqs="3 14 15"

   See also http://people.freebsd.org/~dougb/randomness.html

4.5. Solaris

Q: How do I integrate BIND 9 and Solaris SMF

A: Sun has a blog entry describing how to do this.

   http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris

4.6. Apple Mac OS X

Q: How do I run BIND 9 on Apple Mac OS X?

A: If you run Tiger(Mac OS 10.4) or later then this is all you need to do:

   % sudo rndc-confgen  > /etc/rndc.conf

   Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:

   key "rndc-key" {
           algorithm hmac-md5;
           secret "uvceheVuqf17ZwIcTydddw==";
a656 1
   Then start the relevant service:
d658 1
a658 1
   % sudo service org.isc.named start
d660 11
a670 1
   This is persistent upon a reboot, so you will have to do it only once.
d672 3
a674 11
A: Alternatively you can just generate /etc/rndc.key by running:

   % sudo rndc-confgen -a

   Then start the relevant service:

   % sudo service org.isc.named start

   Named will look for /etc/rndc.key when it starts if it doesn't have a
   controls section or the existing controls are missing keys sub-clauses.
   This is persistent upon a reboot, so you will have to do it only once.
@


1.1.1.2.2.5
log
@SVN rev 186999 on 2009-01-10 04:30:27Z by dougb

Merge from vendor/bind9/dist-9.3 as of the 9.3.6-P1 import
@
text
@a207 2
A: There are unbalanced quotes in named.conf.

d378 1
a378 54
Q: I want to use IPv6 locally but I don't have a external IPv6 connection.
   External lookups are slow.

A: You can use server clauses to stop named making external lookups over
   IPv6.

   server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
   server ::/0 { bogus yes; };

3. Operations Questions

Q: How to change the nameservers for a zone?

A: Step 1: Ensure all nameservers, new and old, are serving the same zone
   content.

   Step 2: Work out the maximum TTL of the NS RRset in the parent and
   child zones. This is the time it will take caches to be clear of a
   particular version of the NS RRset. If you are just removing
   nameservers you can skip to Step 6.

   Step 3: Add new nameservers to the NS RRset for the zone and wait until
   all the servers for the zone are answering with this new NS RRset.

   Step 4: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 5: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long. If you are just adding nameservers you are done.

   Step 6: Remove any old nameservers from the zones NS RRset and wait for
   all the servers for the zone to be serving the new NS RRset.

   Step 7: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 8: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long.

   Step 9: Turn off the old nameservers or remove the zone entry from the
   configuration of the old nameservers.

   Step 10: Increment the serial number and wait for the change to be
   visible in all nameservers for the zone. This ensures that zone
   transfers are still working after the old servers are decommissioned.

   Note: the above procedure is designed to be transparent to dns clients.
   Decommissioning the old servers too early will result in some clients
   not being able to look up answers in the zone.

   Note: while it is possible to run the addition and removal stages
   together it is not recommended.

4. General Questions
d399 2
a400 2
   see <http://support.microsoft.com/support/kb/articles/q246/8/04.asp>
   for information about how to turn them off.
d471 1
a471 1
   for these addresses. Please see <http://as112.net/> for details of the
d544 1
a544 1
Q: Why do queries for NSEC3 records fail to return the NSEC3 record?
d546 1
a546 8
A: NSEC3 records are strictly meta data and can only be returned in the
   authority section. This is done so that signing the zone using NSEC3
   records does not bring names into existance that do not exist in the
   unsigned version of the zone.

5. Operating-System Specific Questions

5.1. HPUX
d562 1
a562 1
5.2. Linux
d572 1
a572 14
   See: <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=
   2>

Q: Why does named lock up when it attempts to connect over IPSEC tunnels?

A: This is due to a kernel bug where the fact that a socket is marked
   non-blocking is ignored. It is reported that setting xfrm_larval_drop
   to 1 helps but this may have negative side effects. See: <https://
   bugzilla.redhat.com/show_bug.cgi?id=427629> and <http://lkml.org/lkml/
   2007/12/4/260>.

   xfrm_larval_drop can be set to 1 by the following procedure:

   echo "1" > proc/sys/net/core/xfrm_larval_drop
d616 1
a616 1
   policy (see <http://www.nsa.gov/selinux>) and recommendations for BIND
d719 1
a719 1
5.3. Windows
d745 1
a745 1
5.4. FreeBSD
d756 1
a756 1
   See also <http://people.freebsd.org/~dougb/randomness.html>.
d758 1
a758 1
5.5. Solaris
d764 1
a764 1
   <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>
d766 1
a766 1
5.6. Apple Mac OS X
@


1.1.1.3
log
@Vendor import of BIND 9.3.2
@
text
@d1 3
a5 1
-------------------------------------------------------------------------------
d10 15
a24 15
   In particular, setuid() operates only on the current thread, not the full
   process. Because of this limitation, BIND 9 cannot use setuid() on Linux as
   it can on all other supported platforms. setuid() cannot be called before
   creating threads, since the server does not start listening on reserved
   ports until after threads have started.

   In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
   capabilities across a setuid() call is present. This allows BIND 9 to call
   setuid() early, while retaining the ability to bind reserved ports. This is
   a Linux-specific hack.

   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
   of a security risk than a root process that has not dropped privileges.

   If Linux threads ever work correctly, this restriction will go away.
d26 2
a27 2
   Configuring BIND9 with the --disable-threads option (the default) causes a
   non-threaded version to be built, which will allow -u to be used.
a28 2
Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
   instead"?
d30 5
a34 2
A: Your zone file is illegal according to RFC1035. It must either have a line
   like:
d38 2
a39 2
   at the beginning, or the first record in it must have a TTL field, like the
   "84600" in this example:
d45 15
a59 12
A: Linux threads each show up as a process under ps. The approximate number of
   threads running is n+4, where n is the number of CPUs. Note that the amount
   of memory used is not cumulative; if each process is using 10M of memory,
   only a total of 10M is used.

Q: Why does BIND 9 log "permission denied" errors accessing its configuration
   files or zones on my Linux system even though it is running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore, if
   the server is running as root, the configuration files and zone files should
   also be owned by root.
d62 4
a65 1
   bar: ran out of space"?
a66 2
A: This is often caused by TXT records with missing close quotes. Check that
   all TXT records containing quoted strings have both open and close quotes.
d70 6
a75 5
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
   (that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
   apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
   kernel. This patch will cause multithreaded programs to dump the correct
   thread.
d79 23
a101 19
A: Put a "version" option containing something other than the real version in
   the "options" section of named.conf. Note doing this will not prevent
   attacks and may impede people trying to diagnose problems with your server.
   Also it is possible to "fingerprint" nameservers to determine their version.

Q: How do I restrict only remote users from looking up the server version?

A: The following view statement will intercept lookups as the internal view
   that holds the version information will be matched last. The caveats of the
   previous answer still apply, of course.

   view "chaos" chaos {
           match-clients { <those to be refused>; };
           allow-query { none; };
           zone "." {
                   type hint;
                   file "/dev/null";  // or any empty file
           };
   };
d104 1
a104 1
   mean?
d107 4
a110 4
   mostly DNSSEC related. These messages indicate that you have no source of
   entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the random-device
   option in named.conf.
a111 1
Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
d113 1
a113 2
A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
   under /usr. Check that the correct named is running.
d115 2
a116 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers.
   I'm sure I have the keys set up correctly, but the server is rejecting the
   TSIG. Why?
a117 2
A: This may be a clock skew problem. Check that the the clocks on the client
   and server are properly synchronised (e.g., using ntp).
d119 3
a121 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
   found. Why?
d123 2
a124 3
A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
   doesn't work. If you are using one of these, use normal make or gmake
   instead.
a125 3
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging
   error messages like "notify to 10.0.0.1#53 failed: unexpected end of input".
   What's wrong?
d127 2
a128 3
A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in
   BIND 8.2.4. It can be safely ignored - the notify has been acted on by the
   slave despite the error message.
d130 3
a132 1
Q: I keep getting log messages like the following. Why?
a133 3
   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
   failed: 'RRset exists (value dependent)' prerequisite not satisfied
   (NXRRSET)
d135 3
a137 4
A: DNS updates allow the update request to test to see if certain conditions
   are met prior to proceeding with the update. The message above is saying
   that conditions were not met and the update is not proceeding. See doc/rfc/
   rfc2136.txt for more details on prerequisites.
d139 3
a141 1
Q: I keep getting log messages like the following. Why?
a142 1
   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
d144 1
a144 6
A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
   protocol. Windows 2000 machines have a habit of sending dynamic update
   requests to DNS servers without being specifically configured to do so. If
   the update requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information
   about how to turn them off.
d146 3
a148 1
Q: I see a log message like the following. Why?
d150 4
a153 1
   couldn't open pid file '/var/run/named.pid': Permission denied
a154 35
A: You are most likely running named as a non-root user, and that user does not
   have permission to write in /var/run. The common ways of fixing this are to
   create a /var/run/named directory owned by the named user and set pid-file
   to "/var/run/named/named.pid", or set pid-file to "named.pid", which will
   put the file in the directory specified by the directory option (which, in
   this case, must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the
   way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to
   avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a root
   server, and these records are eligible for inclusion as additional data in
   responses. Subsequently it receives a subset of the root server addresses as
   additional data in a non-authoritative (referral) response from a root
   server. This causes the addresses to now be considered non-authoritative
   (glue) data, which is not eligible for inclusion in responses.

   The server does have a complete set of root server addresses cached at all
   times, it just may not include all of them as additional data, depending on
   whether they were last received as answers or as glue. You can always look
   up the addresses with explicit queries like "dig a.root-servers.net A".

Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?

A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked around
   by setting the option "transfer-format one-answer;". Also check whether your
   zone contains domain names with embedded spaces or other special characters,
   like "John\032Doe\213s\032Computer", since such names have been known to
   cause Windows 2000 slaves to incorrectly reject the zone.
d156 1
a156 1
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
d158 1
a158 86
A: A zone can be updated either by editing zone files and reloading the server
   or by dynamic update, but not both. If you have enabled dynamic update for a
   zone using the "allow-update" option, you are not supposed to edit the zone
   file by hand, and the server will not attempt to reload it.

Q: I can query the nameserver from the nameserver but not from other machines.
   Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external view at
   the same time? When I tried, both views on the slave were transferred from
   the same view on the master.

A: You will need to give the master and slave multiple IP addresses and use
   those to make sure you reach the correct view on the other machine.

   Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
                   notify-source 10.0.1.1;
                   transfer-source 10.0.1.1;
                   query-source address 10.0.1.1;
       external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.2;
           transfer-source 10.0.1.2;
           query-source address 10.0.1.2;

   Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
           notify-source 10.0.1.3;
           transfer-source 10.0.1.3;
           query-source address 10.0.1.3;
      external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.4;
           transfer-source 10.0.1.4;
           query-source address 10.0.1.4;

   You put the external address on the alias so that all the other dns clients
   on these boxes see the internal view by default.

A: BIND 9.3 and later: Use TSIG to select the appropriate view.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.0.2 { keys external; };
                   recursion no;
                   ...
           };

   Slave 10.0.1.2:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.0.1 { keys external; };
                   recursion no;
                   ...
           };

Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
   certain interrupts as a source of random events. You can make this permanent
   by setting rand_irqs in /etc/rc.conf.
d160 6
a165 2
   /etc/rc.conf
   rand_irqs="3 14 15"
a166 1
   See also http://people.freebsd.org/~dougb/randomness.html
d168 1
a168 1
Q: Why is named listening on UDP port other than 53?
d170 1
a170 29
A: Named uses a system selected port to make queries of other nameservers. This
   behaviour can be overridden by using query-source to lock down the port and/
   or address. See also notify-source and transfer-source.

Q: I get error messages like "multiple RRs of singleton type" and "CNAME and
   other data" when transferring a zone. What does this mean?

A: These indicate a malformed master zone. You can identify the exact records
   involved by transferring the zone using dig then running named-checkzone on
   it.

   dig axfr example.com @@master-server > tmp
   named-checkzone example.com tmp

   A CNAME record cannot exist with the same name as another record except for
   the DNSSEC records which prove its existance (NSEC).

   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
   should be present; this ensures that the data for a canonical name and its
   aliases cannot be different. This rule also insures that a cached CNAME can
   be used without checking with an authoritative server for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input" where 99
   is the last line of named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title indication
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding"
   a blank line to the end of the file. Named expects to see EOF immediately
   after EOL and treats text files where this is not met as truncated.
d172 42
a213 2
Q: I get warning messages like "zone example.com/IN: refresh: failure trying
   master 1.2.3.4#53: timed out".
a214 1
A: Check that you can make UDP queries from the slave to the master
d216 1
a216 1
   dig +norec example.com soa @@1.2.3.4
d218 94
a311 2
   You could be generating queries faster than the slave can cope with. Lower
   the serial query rate.
d313 1
a313 1
   serial-query-rate 5; // default 20
a314 1
Q: How do I share a dynamic zone between multiple views?
d316 1
a316 2
A: You choose one view to be master and the second a slave and transfer the
   zone between views.
d318 3
a320 36
   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };

           key "mykey" {
                   algorithm hmac-md5;
                   secret "yyyyyyyy";
           };

           view "internal" {
                   match-clients { !external; 10.0.1/24; };
                   server 10.0.1.1 {
                           /* Deliver notify messages to external view. */
                           keys { external; };
                   };
                   zone "example.com" {
                           type master;
                           file "internal/example.db";
                           allow-update { key mykey; };
                           notify-also { 10.0.1.1; };
                   };
           };

           view "external" {
                   match-clients { external; any; };
                   zone "example.com" {
                           type slave;
                           file "external/example.db";
                           masters { 10.0.1.1; };
                           transfer-source { 10.0.1.1; };
                           // allow-update-forwarding { any; };
                           // allow-notify { ... };
                   };
           };
a321 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
   file primaries/wireless.ietf56.ietf.org: no owner".
d323 2
a324 4
A: This error is produced when a line in the master file contains leading white
   space (tab/space) but the is no current record owner name to inherit the
   name from. Usually this is the result of putting white space before a
   comment. Forgeting the "@@" for the SOA record or indenting the master file.
d326 3
a328 1
Q: Why are my logs in GMT (UTC).
d330 3
a332 2
A: You are running chrooted (-t) and have not supplied local timzone
   information in the chroot area.
a333 3
   FreeBSD: /etc/localtime
   Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
   OSF: /etc/zoneinfo/localtime
d335 2
a336 1
   See also tzset(3) and zic(8).
d338 4
a341 2
Q: I get the error message "named: capset failed: Operation not permitted" when
   starting named.
a342 2
A: The capability module, part of "Linux Security Modules/LSM", has not been
   loaded into the kernel. See insmod(8).
d344 2
a345 1
Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
d347 1
a347 1
A: This is usually a configuration error.
d349 1
a349 17
   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by "rndc-confgen
   -a", rndc-confgen or manually. The Administrators Reference manual has
   details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
   rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
   the default server listed in /etc/rndc.conf matches the addresses used in
   named.conf. "localhost" has two address (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure that
   /etc/rndc.conf has the correct ownership and that a copy is in the chroot
   area. You can do this by re-running "rndc-confgen -a" with appropriate -t
   and -u arguments.
d351 2
a352 1
Q: I don't get RRSIG's returned when I use "dig +dnssec".
d354 1
a354 1
A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
d356 1
a356 1
Q: I get "Error 1067" when starting named under Windows.
d358 2
a359 2
A: This is the service manager saying that named exited. You need to examine
   the Application log in the EventViewer to find out why.
d361 36
a396 3
   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.
d398 2
a399 3
   options {
           Directory "C:\windows\dns\etc";
   };
d401 5
a405 2
Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
   receiving responses: permission denied" error messages.
a406 3
A: These indicate a filesystem permission error preventing named creating /
   renaming the temporary file. These will usually also have other associated
   error messages like
d408 1
a408 1
   "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
d410 2
a411 5
   Named needs write permission on the directory containing the file. Named
   writes the new cache file to a temporary file then renames it to the name
   specified in named.conf to ensure that the contents are always complete.
   This is to prevent named loading a partial zone in the event of power
   failure or similar interrupting the write of the master file.
d413 3
a415 2
   Note file names are relative to the directory specified in options and any
   chroot directory ([<chroot dir>/][<options dir>]).
d417 1
a417 3
   If named is invoked as "named -t /chroot/DNS" with the following named.conf
   then "/chroot/DNS/var/named/sl" needs to be writable by the user named is
   running as.
a418 3
   options {
           directory "/var/named";
   };
d420 2
a421 5
   zone "example.net" {
           type slave;
           file "sl/example.net";
           masters { 192.168.4.12; };
   };
d423 1
a423 1
Q: How do I intergrate BIND 9 and Solaris SMF
a424 1
A: Sun has a blog entry describing how to do this.
d426 2
a427 1
   http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
d429 1
a429 1
Q: Can a NS record refer to a CNAME.
d431 19
a449 2
A: No. The rules for glue (copies of the *address* records in the parent zones)
   and additional section processing do not allow it to work.
a450 4
   You would have to add both the CNAME and address records (A/AAAA) as glue to
   the parent zone and have CNAMEs be followed when doing additional section
   processing to make it work. No namesever implementation supports either of
   these requirements.
d452 1
a452 1
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
d454 1
a454 6
A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
   using then you have failed to follow RFC 1918 usage rules and are leaking
   queries to the Internet. You should establish your own zones for these
   addresses to prevent you quering the Internet's name servers for these
   addresses. Please see http://as112.net/ for details of the problems you are
   causing and the counter measures that have had to be deployed.
a455 4
   If you are not using these private addresses then a client has queried for
   them. You can just ignore the messages, get the offending client to stop
   sending you these messages as they are most probably leaking them or setup
   your own zones empty zones to serve answers to these queries.
d457 1
a457 21
   zone "10.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "16.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   ...

   zone "31.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "168.192.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };
d459 2
a460 4
   empty:
   @@ 10800 IN SOA <name-of-server>. <contact-email>. (
                  1 3600 1200 604800 10800 )
   @@ 10800 IN NS <name-of-server>.
d462 7
a468 1
   Note
a469 1
   Future versions of named are likely to do this automatically.
@


1.1.1.4
log
@Vendor import of BIND 9.3.3
@
text
@d7 6
a12 6
A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
   particular, setuid() operates only on the current thread, not the full process.
   Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
   all other supported platforms. setuid() cannot be called before creating
   threads, since the server does not start listening on reserved ports until
   after threads have started.
d16 2
a17 2
   setuid() early, while retaining the ability to bind reserved ports. This is a
   Linux-specific hack.
d19 2
a20 2
   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
   a security risk than a root process that has not dropped privileges.
a26 10
Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

d43 3
a45 6
   threads running is n+4, where n is the number of CPUs. Note that the amount of
   memory used is not cumulative; if each process is using 10M of memory, only a
   total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and require -L
   to display them.
d50 4
a53 4
A: On Linux, BIND 9 drops most of its root privileges on startup. This including
   the privilege to open files owned by other users. Therefore, if the server is
   running as root, the configuration files and zone files should also be owned by
   root.
d55 2
a56 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
   ran out of space"?
d58 2
a59 2
A: This is often caused by TXT records with missing close quotes. Check that all
   TXT records containing quoted strings have both open and close quotes.
d71 4
a74 4
A: Put a "version" option containing something other than the real version in the
   "options" section of named.conf. Note doing this will not prevent attacks and
   may impede people trying to diagnose problems with your server. Also it is
   possible to "fingerprint" nameservers to determine their version.
d78 3
a80 3
A: The following view statement will intercept lookups as the internal view that
   holds the version information will be matched last. The caveats of the previous
   answer still apply, of course.
d94 5
a98 4
A: The server requires a source of entropy to perform certain operations, mostly
   DNSSEC related. These messages indicate that you have no source of entropy. On
   systems with /dev/random or an equivalent, it is used by default. A source of
   entropy can also be defined using the random-device option in named.conf.
d105 3
a107 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
   sure I have the keys set up correctly, but the server is rejecting the TSIG.
   Why?
d109 2
a110 2
A: This may be a clock skew problem. Check that the the clocks on the client and
   server are properly synchronised (e.g., using ntp).
d116 2
a117 1
   doesn't work. If you are using one of these, use normal make or gmake instead.
d119 7
a125 7
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
   messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
   wrong?

A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
   8.2.4. It can be safely ignored - the notify has been acted on by the slave
   despite the error message.
d130 2
a131 1
   failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
d133 3
a135 3
A: DNS updates allow the update request to test to see if certain conditions are
   met prior to proceeding with the update. The message above is saying that
   conditions were not met and the update is not proceeding. See doc/rfc/
d143 5
a147 5
   protocol. Windows 2000 machines have a habit of sending dynamic update requests
   to DNS servers without being specifically configured to do so. If the update
   requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
   how to turn them off.
d155 19
a173 19
   create a /var/run/named directory owned by the named user and set pid-file to "
   /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
   file in the directory specified by the directory option (which, in this case,
   must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are missing.
   Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the way
   BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
   promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root server
   addresses as additional data in an authoritative response from a root server,
   and these records are eligible for inclusion as additional data in responses.
   Subsequently it receives a subset of the root server addresses as additional
   data in a non-authoritative (referral) response from a root server. This causes
   the addresses to now be considered non-authoritative (glue) data, which is not
   eligible for inclusion in responses.
d177 2
a178 2
   whether they were last received as answers or as glue. You can always look up
   the addresses with explicit queries like "dig a.root-servers.net A".
d182 6
a187 6
A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
   larger than 16K are not handled properly. This can be worked around by setting
   the option "transfer-format one-answer;". Also check whether your zone contains
   domain names with embedded spaces or other special characters, like "John\
   032Doe\213s\032Computer", since such names have been known to cause Windows
   2000 slaves to incorrectly reject the zone.
d191 4
a194 4
A: A zone can be updated either by editing zone files and reloading the server or
   by dynamic update, but not both. If you have enabled dynamic update for a zone
   using the "allow-update" option, you are not supposed to edit the zone file by
   hand, and the server will not attempt to reload it.
d199 2
a200 2
A: This is usually the result of the firewall configuration stopping the queries
   and / or the replies.
d203 2
a204 2
   the same time? When I tried, both views on the slave were transferred from the
   same view on the master.
d206 2
a207 2
A: You will need to give the master and slave multiple IP addresses and use those
   to make sure you reach the correct view on the other machine.
d235 2
a236 2
   You put the external address on the alias so that all the other dns clients on
   these boxes see the internal view by default.
d251 1
a251 1
                   server 10.0.1.2 { keys external; };
d267 1
a267 1
                   server 10.0.1.1 { keys external; };
d275 2
a276 2
   certain interrupts as a source of random events. You can make this permanent by
   setting rand_irqs in /etc/rc.conf.
d286 2
a287 2
   behaviour can be overridden by using query-source to lock down the port and/or
   address. See also notify-source and transfer-source.
d289 2
a290 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
   data" when transferring a zone. What does this mean?
d293 2
a294 1
   involved by transferring the zone using dig then running named-checkzone on it.
d299 2
a300 2
   A CNAME record cannot exist with the same name as another record except for the
   DNSSEC records which prove its existance (NSEC).
d304 2
a305 2
   aliases cannot be different. This rule also insures that a cached CNAME can be
   used without checking with an authoritative server for other RR types."
d307 2
a308 2
Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
   the last line of named.conf.
d311 3
a313 3
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
   blank line to the end of the file. Named expects to see EOF immediately after
   EOL and treats text files where this is not met as truncated.
d322 2
a323 2
   You could be generating queries faster than the slave can cope with. Lower the
   serial query rate.
d329 2
a330 2
A: You choose one view to be master and the second a slave and transfer the zone
   between views.
d373 3
a375 3
   space (tab/space) but the is no current record owner name to inherit the name
   from. Usually this is the result of putting white space before a comment.
   Forgeting the "@@" for the SOA record or indenting the master file.
d379 2
a380 2
A: You are running chrooted (-t) and have not supplied local timzone information
   in the chroot area.
d398 3
a400 3
   First ensure that named is running and no errors are being reported at startup
   (/var/log/messages or equivalent). Running "named -g <usual arguments>" from a
   title can help at this point.
d403 2
a404 2
   -a", rndc-confgen or manually. The Administrators Reference manual has details
   on how to do this.
d411 4
a414 4
   If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
   etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
   You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
   arguments.
d422 2
a423 2
A: This is the service manager saying that named exited. You need to examine the
   Application log in the EventViewer to find out why.
d425 3
a427 2
   Common causes are that you failed to create "named.conf" (usually "C:\windows\
   dns\etc\named.conf") or failed to specify the directory in named.conf.
d442 5
a446 5
   Named needs write permission on the directory containing the file. Named writes
   the new cache file to a temporary file then renames it to the name specified in
   named.conf to ensure that the contents are always complete. This is to prevent
   named loading a partial zone in the event of power failure or similar
   interrupting the write of the master file.
d492 2
a493 2
   sending you these messages as they are most probably leaking them or setup your
   own zones empty zones to serve answers to these queries.
a525 99
Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones from
   journals?

   Why can't named create custom log files?

A: Red Hat Security Enhanced Linux (SELinux) policy security protections :

   Red Hat have adopted the National Security Agency's SELinux security policy (
   see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
   are more secure than running named in a chroot and make use of the bind-chroot
   environment unecessary .

   By default, named is not allowed by the SELinux policy to write, create or
   delete any files EXCEPT in these directories:

   $ROOTDIR/var/named/slaves
   $ROOTDIR/var/named/data
   $ROOTDIR/var/tmp


   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.

   The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
   /named directory, the default location for master zone database files.

   SELinux policy overrules file access permissions - so even if all the files
   under /var/named have ownership named:named and mode rw-rw-r--, named will
   still not be able to write or create files except in the directories above,
   with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to locate
   them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:

   zone "slave.zone." IN {
           type slave;
           file "slaves/slave.zone.db";
           ...
   };
   zone "ddns.zone." IN  {
           type master;
           allow-updates {...};
           file "slaves/ddns.zone.db";
   };


   To allow named to create its cache dump and statistics files, for example, you
   could use named.conf options statements such as:

   options {
           ...
           dump-file "/var/named/data/cache_dump.db";
           statistics-file "/var/named/data/named_stats.txt";
           ...
   };


   You can also tell SELinux to allow named to update any zone database files, by
   setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
   using the system-config-securitylevel GUI, using the 'setsebool' command, or in
   /etc/selinux/targeted/booleans.

   You can disable SELinux protection for named entirely by setting the
   'named_disable_trans=1' SELinux tunable boolean parameter.

   The SELinux named policy defines these SELinux contexts for named:

   named_zone_t : for zone database files       - $ROOTDIR/var/named/*
   named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
   named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


   If you want to retain use of the SELinux policy for named, and put named files
   in different locations, you can do so by changing the context of the custom
   file locations .

   To create a custom configuration file location, eg. '/root/named.conf', to use
   with the 'named -c' option, do:

   # chcon system_u:object_r:named_conf_t /root/named.conf


   To create a custom modifiable named data location, eg. '/var/log/named' for a
   log file, do:

   # chcon system_u:object_r:named_cache_t /var/log/named


   To create a custom zone file location, eg. /root/zones/, do:

   # chcon system_u:object_r:named_zone_t /root/zones/{.,*}


   See these man-pages for more information : selinux(8), named_selinux(8), chcon
   (1), setsebool(8)

@


1.1.1.5
log
@Vendor import of BIND 9.3.4
@
text
@a2 4
Copyright  2004-2007 Internet Systems Consortium, Inc. ("ISC")

Copyright  2000-2003 Internet Software Consortium.

a632 39
Q: I want to forward all DNS queries from my caching nameserver to another server.
   But there are some domains which have to be served locally, via rbldnsd.

   How do I achieve this ?

A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Will named be affected by the 2007 changes to daylight savings rules in the US.

A: No, so long as the machines internal clock (as reported by "date -u") remains
   at UTC. The only visible change if you fail to upgrade your OS, if you are in a
   affected area, will be that log messages will be a hour out during the period
   where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the conversion
   rules from UTC to local time. Normally this involves updating a file in /etc
   (which sets the default timezone for the machine) and possibly a directory
   which has all the conversion rules for the world (e.g. /usr/share/zoneinfo).
   When updating the OS do not forget to update any chroot areas as well. See your
   OS's documetation for more details.

   The local timezone conversion rules can also be done on a individual basis by
   setting the TZ envirionment variable appropriately. See your OS's documentation
   for more details.

@


1.1.1.6
log
@Vendor import of BIND 9.4.1
@
text
@d78 1
a78 1
Q: How do I produce a usable core file from a multi-threaded named on Linux?
d80 1
a80 1
A: If the Linux kernel is 2.4.7 or newer, multi-threaded core dumps are usable
d83 1
a83 1
   kernel. This patch will cause multi-threaded programs to dump the correct
d313 1
a313 1
   DNSSEC records which prove its existence (NSEC).
d388 1
a388 1
   Forgetting the "@@" for the SOA record or indenting the master file.
d392 1
a392 1
A: You are running chrooted (-t) and have not supplied local timezone information
d477 1
a477 1
Q: How do I integrate BIND 9 and Solaris SMF
d490 1
a490 1
   processing to make it work. No nameserver implementation supports either of
d498 1
a498 1
   addresses to prevent you querying the Internet's name servers for these
d552 1
a552 1
   environment unnecessary .
d617 1
a617 1
   To create a custom configuration file location, e.g. '/root/named.conf', to use
d623 1
a623 1
   To create a custom modifiable named data location, e.g. '/var/log/named' for a
d629 1
a629 1
   To create a custom zone file location, e.g. /root/zones/, do:
d670 1
a670 1
   OS's documentation for more details.
d673 1
a673 1
   setting the TZ environment variable appropriately. See your OS's documentation
a675 46
Q: Why do we get the following warning at run time:

   kernel: process `named' is using obsolete setsockopt SO_BSDCOMPAT

A: The early Linux kernels broke sendto() by having it return that a ICMP
   unreachable had be received for non connected UDP sockets. This made non
   connected UDP sockets work like connected UDP socket which is fine when you are
   only talking to one destination. Named however talks to multiple destinations
   and it caused problems.

   Rather than fix sendto() to just have BSD behaviour they added SO_BSDCOMPAT to
   turn BSD behaviour on/off on a per socket basis.

   Later they decided to make BSD behaviour the default and to aggressively track
   down applications that used SO_BSDCOMPAT by issuing a warning. This is the sort
   of things vendors do in alpha/beta stages of a release so that their code is
   clean. They then turn the warning *off* for release code.

   We still have customers that have kernels that require SO_BSDCOMPAT to operate.
   We therefore cannot remove the setsockopt(SO_BSDCOMPAT) call.

   Now most/all portable applications that use SO_BSDCOMPAT use it conditionally
   manner so just removing SO_BSDCOMPAT from the header file would be safe as long
   as the binary was not to be moved between systems. BIND's use is conditional.

   In short, the Linux developers should either, remove the #define for
   SO_BSDCOMPAT, and/or remove the warning.

Q: Isn't "make install" supposed to generate a default named.conf?

A: Short Answer: No.

   Long Answer: There really isn't a default configuration which fits any site
   perfectly. There are lots of decisions that need to be made and there is no
   consensus on what the defaults should be. For example FreeBSD uses /etc/namedb
   as the location where the configuration files for named are stored. Others use
   /var/named.

   What addresses to listen on? For a laptop on the move a lot you may only want
   to listen on the loop back interfaces.

   Who do you offer recursive service to? Is there are firewall to consider? If so
   is it stateless or stateful. Are you directly on the Internet? Are you on a
   private network? Are you on a NAT'd network? The answers to all these questions
   change how you configure even a caching name server.

@


1.1.1.6.2.1
log
@MFC contrib code and bmake changes for BIND version 9.4.2

Approved by:	re (kensmith)
@
text
@d7 1
a7 1
-----------------------------------------------------------------------
d9 1
a9 1
1. Compilation and Installation Questions
d11 6
a16 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not
   being found. Why?
d18 4
a21 3
A: Using a parallel or distributed "make" to build BIND 9 is not
   supported, and doesn't work. If you are using one of these, use normal
   make or gmake instead.
d23 9
a31 1
Q: Isn't "make install" supposed to generate a default named.conf?
d33 3
a35 1
A: Short Answer: No.
d37 1
a37 14
   Long Answer: There really isn't a default configuration which fits any
   site perfectly. There are lots of decisions that need to be made and
   there is no consensus on what the defaults should be. For example
   FreeBSD uses /etc/namedb as the location where the configuration files
   for named are stored. Others use /var/named.

   What addresses to listen on? For a laptop on the move a lot you may
   only want to listen on the loop back interfaces.

   Who do you offer recursive service to? Is there are firewall to
   consider? If so is it stateless or stateful. Are you directly on the
   Internet? Are you on a private network? Are you on a NAT'd network? The
   answers to all these questions change how you configure even a caching
   name server.
d39 1
a39 1
2. Configuration and Setup Questions
d41 2
a42 2
Q: Why does named log the warning message "no TTL specified - using SOA
   MINTTL instead"?
d44 2
a45 2
A: Your zone file is illegal according to RFC1035. It must either have a
   line like:
d49 2
a50 2
   at the beginning, or the first record in it must have a TTL field, like
   the "84600" in this example:
d54 1
a54 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master
   file bar: ran out of space"?
d56 29
a84 3
A: This is often caused by TXT records with missing close quotes. Check
   that all TXT records containing quoted strings have both open and close
   quotes.
d88 4
a91 5
A: Put a "version" option containing something other than the real version
   in the "options" section of named.conf. Note doing this will not
   prevent attacks and may impede people trying to diagnose problems with
   your server. Also it is possible to "fingerprint" nameservers to
   determine their version.
d95 3
a97 3
A: The following view statement will intercept lookups as the internal
   view that holds the version information will be matched last. The
   caveats of the previous answer still apply, of course.
d108 38
a145 2
Q: What do "no source of entropy found" or "could not open entropy source
   foo" mean?
d147 4
a150 9
A: The server requires a source of entropy to perform certain operations,
   mostly DNSSEC related. These messages indicate that you have no source
   of entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the
   random-device option in named.conf.

Q: I'm trying to use TSIG to authenticate dynamic updates or zone
   transfers. I'm sure I have the keys set up correctly, but the server is
   rejecting the TSIG. Why?
d152 10
a161 2
A: This may be a clock skew problem. Check that the the clocks on the
   client and server are properly synchronised (e.g., using ntp).
d167 48
a214 17
A: You are most likely running named as a non-root user, and that user
   does not have permission to write in /var/run. The common ways of
   fixing this are to create a /var/run/named directory owned by the named
   user and set pid-file to "/var/run/named/named.pid", or set pid-file to
   "named.pid", which will put the file in the directory specified by the
   directory option (which, in this case, must be writable by the named
   user).

Q: I can query the nameserver from the nameserver but not from other
   machines. Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external
   view at the same time? When I tried, both views on the slave were
   transferred from the same view on the master.
d216 6
a221 2
A: You will need to give the master and slave multiple IP addresses and
   use those to make sure you reach the correct view on the other machine.
d249 2
a250 2
   You put the external address on the alias so that all the other dns
   clients on these boxes see the internal view by default.
d286 19
a304 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME
   and other data" when transferring a zone. What does this mean?
d306 2
a307 3
A: These indicate a malformed master zone. You can identify the exact
   records involved by transferring the zone using dig then running
   named-checkzone on it.
d312 2
a313 2
   A CNAME record cannot exist with the same name as another record except
   for the DNSSEC records which prove its existence (NSEC).
d315 24
a338 14
   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other
   data should be present; this ensures that the data for a canonical name
   and its aliases cannot be different. This rule also insures that a
   cached CNAME can be used without checking with an authoritative server
   for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input"
   where 99 is the last line of named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title
   indication (e.g. CR/LF) on the last line of a text file. This can be
   fixed by "adding" a blank line to the end of the file. Named expects to
   see EOF immediately after EOL and treats text files where this is not
   met as truncated.
d342 2
a343 2
A: You choose one view to be master and the second a slave and transfer
   the zone between views.
d357 1
a357 1
                   match-clients { !key external; 10.0.1/24; };
d371 1
a371 1
                   match-clients { key external; any; };
d382 2
a383 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
   master file primaries/wireless.ietf56.ietf.org: no owner".
d385 4
a388 5
A: This error is produced when a line in the master file contains leading
   white space (tab/space) but the is no current record owner name to
   inherit the name from. Usually this is the result of putting white
   space before a comment, forgetting the "@@" for the SOA record, or
   indenting the master file.
d392 2
a393 2
A: You are running chrooted (-t) and have not supplied local timezone
   information in the chroot area.
d401 7
a407 2
Q: I get "rndc: connect failed: connection refused" when I try to run
   rndc.
d411 33
a443 18
   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by
   "rndc-confgen -a", rndc-confgen or manually. The Administrators
   Reference manual has details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /
   etc/rndc.conf for the default server. Update /etc/rndc.conf if
   necessary so that the default server listed in /etc/rndc.conf matches
   the addresses used in named.conf. "localhost" has two address
   (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure
   that /etc/rndc.conf has the correct ownership and that a copy is in the
   chroot area. You can do this by re-running "rndc-confgen -a" with
   appropriate -t and -u arguments.
d448 3
a450 3
A: These indicate a filesystem permission error preventing named creating
   / renaming the temporary file. These will usually also have other
   associated error messages like
d454 12
a465 12
   Named needs write permission on the directory containing the file.
   Named writes the new cache file to a temporary file then renames it to
   the name specified in named.conf to ensure that the contents are always
   complete. This is to prevent named loading a partial zone in the event
   of power failure or similar interrupting the write of the master file.

   Note file names are relative to the directory specified in options and
   any chroot directory ([<chroot dir>/][<options dir>]).

   If named is invoked as "named -t /chroot/DNS" with the following
   named.conf then "/chroot/DNS/var/named/sl" needs to be writable by the
   user named is running as.
d477 1
a477 3
Q: I want to forward all DNS queries from my caching nameserver to another
   server. But there are some domains which have to be served locally, via
   rbldnsd.
d479 1
a479 1
   How do I achieve this ?
d481 1
a481 115
A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Can you help me understand how BIND 9 uses memory to store DNS zones?

   Some times it seems to take several times the amount of memory it needs
   to store the zone.

A: When reloading a zone named my have multiple copies of the zone in
   memory at one time. The zone it is serving and the one it is loading.
   If reloads are ultra fast it can have more still.

   e.g. Ones that are transferring out, the one that it is serving and the
   one that is loading.

   BIND 8 destroyed the zone before loading and also killed off outgoing
   transfers of the zone.

   The new strategy allows slaves to get copies of the new zone regardless
   of how often the master is loaded compared to the transfer time. The
   slave might skip some intermediate versions but the transfers will
   complete and it will keep reasonably in sync with the master.

   The new strategy also allows the master to recover from syntax and
   other errors in the master file as it still has an in-core copy of the
   old contents.

3. General Questions

Q: I keep getting log messages like the following. Why?

   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
   update failed: 'RRset exists (value dependent)' prerequisite not
   satisfied (NXRRSET)

A: DNS updates allow the update request to test to see if certain
   conditions are met prior to proceeding with the update. The message
   above is saying that conditions were not met and the update is not
   proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.

Q: I keep getting log messages like the following. Why?

   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied

A: Someone is trying to update your DNS data using the RFC2136 Dynamic
   Update protocol. Windows 2000 machines have a habit of sending dynamic
   update requests to DNS servers without being specifically configured to
   do so. If the update requests are coming from a Windows 2000 machine,
   see http://support.microsoft.com/support/kb/articles/q246/8/04.asp for
   information about how to turn them off.

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of
   the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
   makes to avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a
   root server, and these records are eligible for inclusion as additional
   data in responses. Subsequently it receives a subset of the root server
   addresses as additional data in a non-authoritative (referral) response
   from a root server. This causes the addresses to now be considered
   non-authoritative (glue) data, which is not eligible for inclusion in
   responses.

   The server does have a complete set of root server addresses cached at
   all times, it just may not include all of them as additional data,
   depending on whether they were last received as answers or as glue. You
   can always look up the addresses with explicit queries like "dig
   a.root-servers.net A".

Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?

A: A zone can be updated either by editing zone files and reloading the
   server or by dynamic update, but not both. If you have enabled dynamic
   update for a zone using the "allow-update" option, you are not supposed
   to edit the zone file by hand, and the server will not attempt to
   reload it.

Q: Why is named listening on UDP port other than 53?

A: Named uses a system selected port to make queries of other nameservers.
   This behaviour can be overridden by using query-source to lock down the
   port and/or address. See also notify-source and transfer-source.

Q: I get warning messages like "zone example.com/IN: refresh: failure
   trying master 1.2.3.4#53: timed out".

A: Check that you can make UDP queries from the slave to the master

   dig +norec example.com soa @@1.2.3.4

   You could be generating queries faster than the slave can cope with.
   Lower the serial query rate.

   serial-query-rate 5; // default 20

Q: I don't get RRSIG's returned when I use "dig +dnssec".

A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
d485 2
a486 2
A: No. The rules for glue (copies of the *address* records in the parent
   zones) and additional section processing do not allow it to work.
d488 18
a505 20
   You would have to add both the CNAME and address records (A/AAAA) as
   glue to the parent zone and have CNAMEs be followed when doing
   additional section processing to make it work. No nameserver
   implementation supports either of these requirements.

Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
   mean?

A: If the IN-ADDR.ARPA name covered refers to a internal address space you
   are using then you have failed to follow RFC 1918 usage rules and are
   leaking queries to the Internet. You should establish your own zones
   for these addresses to prevent you querying the Internet's name servers
   for these addresses. Please see http://as112.net/ for details of the
   problems you are causing and the counter measures that have had to be
   deployed.

   If you are not using these private addresses then a client has queried
   for them. You can just ignore the messages, get the offending client to
   stop sending you these messages as they are most probably leaking them
   or setup your own zones empty zones to serve answers to these queries.
a537 88
Q: Will named be affected by the 2007 changes to daylight savings rules in
   the US.

A: No, so long as the machines internal clock (as reported by "date -u")
   remains at UTC. The only visible change if you fail to upgrade your OS,
   if you are in a affected area, will be that log messages will be a hour
   out during the period where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the
   conversion rules from UTC to local time. Normally this involves
   updating a file in /etc (which sets the default timezone for the
   machine) and possibly a directory which has all the conversion rules
   for the world (e.g. /usr/share/zoneinfo). When updating the OS do not
   forget to update any chroot areas as well. See your OS's documentation
   for more details.

   The local timezone conversion rules can also be done on a individual
   basis by setting the TZ environment variable appropriately. See your
   OS's documentation for more details.

Q: Is there a bugzilla (or other tool) database that mere mortals can have
   (read-only) access to for bind?

A: No. The BIND 9 bug database is kept closed for a number of reasons.
   These include, but are not limited to, that the database contains
   proprietory information from people reporting bugs. The database has in
   the past and may in future contain unfixed bugs which are capable of
   bringing down most of the Internet's DNS infrastructure.

   The release pages for each version contain up to date lists of bugs
   that have been fixed post release. That is as close as we can get to
   providing a bug database.

4. Operating-System Specific Questions

4.1. HPUX

Q: I get the following error trying to configure BIND:

   checking if unistd.h or sys/types.h defines fd_set... no
   configure: error: need either working unistd.h or sys/select.h

A: You have attempted to configure BIND with the bundled C compiler. This
   compiler does not meet the minimum compiler requirements to for
   building BIND. You need to install a ANSI C compiler and / or teach
   configure how to find the ANSI C compiler. The later can be done by
   adjusting the PATH environment variable and / or specifying the
   compiler via CC.

   ./configure CC=<compiler> ...

4.2. Linux

Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

Q: Why do I see 5 (or more) copies of named on Linux?

A: Linux threads each show up as a process under ps. The approximate
   number of threads running is n+4, where n is the number of CPUs. Note
   that the amount of memory used is not cumulative; if each process is
   using 10M of memory, only a total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and
   require -L to display them.

Q: Why does BIND 9 log "permission denied" errors accessing its
   configuration files or zones on my Linux system even though it is
   running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore,
   if the server is running as root, the configuration files and zone
   files should also be owned by root.

Q: I get the error message "named: capset failed: Operation not permitted"
   when starting named.

A: The capability module, part of "Linux Security Modules/LSM", has not
   been loaded into the kernel. See insmod(8).

d542 2
a543 2
   Why can't named create DDNS journal files or update the master zones
   from journals?
d549 4
a552 4
   Red Hat have adopted the National Security Agency's SELinux security
   policy ( see http://www.nsa.gov/selinux ) and recommendations for BIND
   security , which are more secure than running named in a chroot and
   make use of the bind-chroot environment unnecessary .
d554 2
a555 2
   By default, named is not allowed by the SELinux policy to write, create
   or delete any files EXCEPT in these directories:
d562 1
a562 2
   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
   installed.
d564 10
a573 12
   The SELinux policy particularly does NOT allow named to modify the
   $ROOTDIR/var/named directory, the default location for master zone
   database files.

   SELinux policy overrules file access permissions - so even if all the
   files under /var/named have ownership named:named and mode rw-rw-r--,
   named will still not be able to write or create files except in the
   directories above, with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to
   locate them in $ROOTDIR/var/named/slaves, with named.conf zone
   statements such as:
d587 2
a588 2
   To allow named to create its cache dump and statistics files, for
   example, you could use named.conf options statements such as:
d598 4
a601 5
   You can also tell SELinux to allow named to update any zone database
   files, by setting the SELinux tunable boolean parameter
   'named_write_master_zones=1', using the system-config-securitylevel
   GUI, using the 'setsebool' command, or in /etc/selinux/targeted/
   booleans.
d613 3
a615 3
   If you want to retain use of the SELinux policy for named, and put
   named files in different locations, you can do so by changing the
   context of the custom file locations .
d617 2
a618 2
   To create a custom configuration file location, e.g. '/root/
   named.conf', to use with the 'named -c' option, do:
d623 2
a624 2
   To create a custom modifiable named data location, e.g. '/var/log/
   named' for a log file, do:
d634 2
a635 2
   See these man-pages for more information : selinux(8), named_selinux
   (8), chcon(1), setsebool(8)
d637 2
a638 1
4.3. Windows
d640 1
a640 2
Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail.
   Why?
d642 4
a645 7
A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked
   around by setting the option "transfer-format one-answer;". Also check
   whether your zone contains domain names with embedded spaces or other
   special characters, like "John\032Doe\213s\032Computer", since such
   names have been known to cause Windows 2000 slaves to incorrectly
   reject the zone.
d647 4
a650 1
Q: I get "Error 1067" when starting named under Windows.
d652 3
a654 9
A: This is the service manager saying that named exited. You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.

   options {
           Directory "C:\windows\dns\etc";
a656 1
4.4. FreeBSD
d658 1
a658 1
Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
d660 11
a670 3
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to
   use certain interrupts as a source of random events. You can make this
   permanent by setting rand_irqs in /etc/rc.conf.
d672 3
a674 2
   /etc/rc.conf
   rand_irqs="3 14 15"
d676 1
a676 1
   See also http://people.freebsd.org/~dougb/randomness.html
d678 1
a678 1
4.5. Solaris
d680 5
a684 1
Q: How do I integrate BIND 9 and Solaris SMF
d686 2
a687 1
A: Sun has a blog entry describing how to do this.
d689 4
a692 1
   http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
d694 2
a695 1
4.6. Apple Mac OS X
d697 3
a699 1
Q: How do I run BIND 9 on Apple Mac OS X?
d701 2
a702 1
A: If you run Tiger(Mac OS 10.4) or later then this is all you need to do:
d704 1
a704 1
   % sudo rndc-confgen  > /etc/rndc.conf
d706 1
a706 20
   Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:

   key "rndc-key" {
           algorithm hmac-md5;
           secret "uvceheVuqf17ZwIcTydddw==";
   };

   Then start the relevant service:

   % sudo service org.isc.named start

   This is persistent upon a reboot, so you will have to do it only once.

A: Alternatively you can just generate /etc/rndc.key by running:

   % sudo rndc-confgen -a

   Then start the relevant service:

   % sudo service org.isc.named start
d708 13
a720 3
   Named will look for /etc/rndc.key when it starts if it doesn't have a
   controls section or the existing controls are missing keys sub-clauses.
   This is persistent upon a reboot, so you will have to do it only once.
@


1.1.1.6.2.2
log
@SVN rev 186996 on 2009-01-10 03:00:21Z by dougb

MFC the BIND 9.4.3 and 9.4.3-P1 updates
@
text
@d3 1
a3 1
Copyright  2004-2008 Internet Systems Consortium, Inc. ("ISC")
a207 2
A: There are unbalanced quotes in named.conf.

d378 1
a378 54
Q: I want to use IPv6 locally but I don't have a external IPv6 connection.
   External lookups are slow.

A: You can use server clauses to stop named making external lookups over
   IPv6.

   server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
   server ::/0 { bogus yes; };

3. Operations Questions

Q: How to change the nameservers for a zone?

A: Step 1: Ensure all nameservers, new and old, are serving the same zone
   content.

   Step 2: Work out the maximum TTL of the NS RRset in the parent and
   child zones. This is the time it will take caches to be clear of a
   particular version of the NS RRset. If you are just removing
   nameservers you can skip to Step 6.

   Step 3: Add new nameservers to the NS RRset for the zone and wait until
   all the servers for the zone are answering with this new NS RRset.

   Step 4: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 5: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long. If you are just adding nameservers you are done.

   Step 6: Remove any old nameservers from the zones NS RRset and wait for
   all the servers for the zone to be serving the new NS RRset.

   Step 7: Inform the parent zone of the new NS RRset then wait for all
   the parent servers to be answering with the new NS RRset.

   Step 8: Wait for cache to be clear of the old NS RRset. See Step 2 for
   how long.

   Step 9: Turn off the old nameservers or remove the zone entry from the
   configuration of the old nameservers.

   Step 10: Increment the serial number and wait for the change to be
   visible in all nameservers for the zone. This ensures that zone
   transfers are still working after the old servers are decommissioned.

   Note: the above procedure is designed to be transparent to dns clients.
   Decommissioning the old servers too early will result in some clients
   not being able to look up answers in the zone.

   Note: while it is possible to run the addition and removal stages
   together it is not recommended.

4. General Questions
d399 2
a400 2
   see <http://support.microsoft.com/support/kb/articles/q246/8/04.asp>
   for information about how to turn them off.
d471 1
a471 1
   for these addresses. Please see <http://as112.net/> for details of the
d544 1
a544 6
Q: Why do queries for NSEC3 records fail to return the NSEC3 record?

A: NSEC3 records are strictly meta data and can only be returned in the
   authority section. This is done so that signing the zone using NSEC3
   records does not bring names into existance that do not exist in the
   unsigned version of the zone.
d546 1
a546 3
5. Operating-System Specific Questions

5.1. HPUX
d562 1
a562 1
5.2. Linux
d572 1
a572 14
   See: <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=
   2>

Q: Why does named lock up when it attempts to connect over IPSEC tunnels?

A: This is due to a kernel bug where the fact that a socket is marked
   non-blocking is ignored. It is reported that setting xfrm_larval_drop
   to 1 helps but this may have negative side effects. See: <https://
   bugzilla.redhat.com/show_bug.cgi?id=427629> and <http://lkml.org/lkml/
   2007/12/4/260>.

   xfrm_larval_drop can be set to 1 by the following procedure:

   echo "1" > proc/sys/net/core/xfrm_larval_drop
d597 1
a597 6
   been loaded into the kernel. See insmod(8), modprobe(8).

   The relevant modules can be loaded by running:

   modprobe commoncap
   modprobe capability
d611 1
a611 1
   policy (see <http://www.nsa.gov/selinux>) and recommendations for BIND
d702 1
a702 13
Q: Listening on individual IPv6 interfaces does not work.

A: This is usually due to "/proc/net/if_inet6" not being available in the
   chroot file system. Mount another instance of "proc" in the chroot file
   system.

   This can be be made permanent by adding a second instance to /etc/
   fstab.

   proc /proc           proc defaults 0 0
   proc /var/named/proc proc defaults 0 0

5.3. Windows
d728 1
a728 1
5.4. FreeBSD
d739 1
a739 1
   See also <http://people.freebsd.org/~dougb/randomness.html>.
d741 1
a741 1
5.5. Solaris
d747 1
a747 1
   <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>
d749 1
a749 1
5.6. Apple Mac OS X
@


1.1.1.6.2.2.4.1
log
@SVN rev 203961 on 2010-02-16 18:10:35Z by dougb

Merge from stable/7, version 203948:

Upgrade to BIND 9.4-ESV. This version incorporates all bug and security
fixes since the release of 9.4.3, including the most recent -P5 security
fix detailed below.

From the README:
BIND 9.4-ESV will be supported until December 31, 2010, at
which time you will need to upgrade to the current release
of BIND.

This versions address the following vulnerabilities:

BIND 9 Cache Update from Additional Section
https://www.isc.org/advisories/CVE-2009-4022v6
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022
A nameserver with DNSSEC validation enabled may incorrectly add
unauthenticated records to its cache that are received during the
resolution of a recursive client query

BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses
https://www.isc.org/advisories/CVE-2010-0097
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097
There was an error in the DNSSEC NSEC/NSEC3 validation code that could
cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records
proven by NSEC or NSEC3 to exist) to be cached as if they had validated
correctly

These issues only affect systems with DNSSEC validation enabled.

Approved by:	re (kensmith)
@
text
@d3 1
a3 1
Copyright  2004-2009 Internet Systems Consortium, Inc. ("ISC")
d156 2
a157 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d160 1
a160 3
                   match-clients { !key external; // reject message ment for the
                                                  // external view.
                                   10.0.1/24; };  // accept from these addresses.
d165 1
a165 4
                   server 10.0.1.2 { keys external; };  // tag messages from the
                                                        // external view to the
                                                        // other servers for the
                                                        // view.
d172 2
a173 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d223 2
a224 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d228 2
a229 2
                   algorithm hmac-sha256;
                   secret "yyyyyyyyyyyyyyyyyyyyyyyy";
d603 1
a603 1
   records does not bring names into existence that do not exist in the
d828 1
@


1.1.1.6.2.3
log
@SVN rev 203948 on 2010-02-16 05:14:51Z by dougb

Upgrade to BIND 9.4-ESV. This version incorporates all bug and security
fixes since the release of 9.4.3, including the most recent -P5 security
fix detailed below.

From the README:
BIND 9.4-ESV will be supported until December 31, 2010, at
which time you will need to upgrade to the current release
of BIND.

This versions address the following vulnerabilities:

BIND 9 Cache Update from Additional Section
https://www.isc.org/advisories/CVE-2009-4022v6
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022
A nameserver with DNSSEC validation enabled may incorrectly add
unauthenticated records to its cache that are received during the
resolution of a recursive client query

BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses
https://www.isc.org/advisories/CVE-2010-0097
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097
There was an error in the DNSSEC NSEC/NSEC3 validation code that could
cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records
proven by NSEC or NSEC3 to exist) to be cached as if they had validated
correctly

These issues only affect systems with DNSSEC validation enabled.

Approved by:	re (kensmith)
@
text
@d3 1
a3 1
Copyright  2004-2009 Internet Systems Consortium, Inc. ("ISC")
d156 2
a157 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d160 1
a160 3
                   match-clients { !key external; // reject message ment for the
                                                  // external view.
                                   10.0.1/24; };  // accept from these addresses.
d165 1
a165 4
                   server 10.0.1.2 { keys external; };  // tag messages from the
                                                        // external view to the
                                                        // other servers for the
                                                        // view.
d172 2
a173 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d223 2
a224 2
                   algorithm hmac-sha256;
                   secret "xxxxxxxxxxxxxxxxxxxxxxxx";
d228 2
a229 2
                   algorithm hmac-sha256;
                   secret "yyyyyyyyyyyyyyyyyyyyyyyy";
d603 1
a603 1
   records does not bring names into existence that do not exist in the
d828 1
@


1.1.1.7
log
@Vendor import of BIND 9.4.2
@
text
@d7 1
a7 1
-----------------------------------------------------------------------
d9 1
a9 1
1. Compilation and Installation Questions
d11 6
a16 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not
   being found. Why?
d18 4
a21 3
A: Using a parallel or distributed "make" to build BIND 9 is not
   supported, and doesn't work. If you are using one of these, use normal
   make or gmake instead.
d23 9
a31 1
Q: Isn't "make install" supposed to generate a default named.conf?
d33 3
a35 1
A: Short Answer: No.
d37 1
a37 14
   Long Answer: There really isn't a default configuration which fits any
   site perfectly. There are lots of decisions that need to be made and
   there is no consensus on what the defaults should be. For example
   FreeBSD uses /etc/namedb as the location where the configuration files
   for named are stored. Others use /var/named.

   What addresses to listen on? For a laptop on the move a lot you may
   only want to listen on the loop back interfaces.

   Who do you offer recursive service to? Is there are firewall to
   consider? If so is it stateless or stateful. Are you directly on the
   Internet? Are you on a private network? Are you on a NAT'd network? The
   answers to all these questions change how you configure even a caching
   name server.
d39 1
a39 1
2. Configuration and Setup Questions
d41 2
a42 2
Q: Why does named log the warning message "no TTL specified - using SOA
   MINTTL instead"?
d44 2
a45 2
A: Your zone file is illegal according to RFC1035. It must either have a
   line like:
d49 2
a50 2
   at the beginning, or the first record in it must have a TTL field, like
   the "84600" in this example:
d54 1
a54 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master
   file bar: ran out of space"?
d56 29
a84 3
A: This is often caused by TXT records with missing close quotes. Check
   that all TXT records containing quoted strings have both open and close
   quotes.
d88 4
a91 5
A: Put a "version" option containing something other than the real version
   in the "options" section of named.conf. Note doing this will not
   prevent attacks and may impede people trying to diagnose problems with
   your server. Also it is possible to "fingerprint" nameservers to
   determine their version.
d95 3
a97 3
A: The following view statement will intercept lookups as the internal
   view that holds the version information will be matched last. The
   caveats of the previous answer still apply, of course.
d108 38
a145 2
Q: What do "no source of entropy found" or "could not open entropy source
   foo" mean?
d147 4
a150 9
A: The server requires a source of entropy to perform certain operations,
   mostly DNSSEC related. These messages indicate that you have no source
   of entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the
   random-device option in named.conf.

Q: I'm trying to use TSIG to authenticate dynamic updates or zone
   transfers. I'm sure I have the keys set up correctly, but the server is
   rejecting the TSIG. Why?
d152 10
a161 2
A: This may be a clock skew problem. Check that the the clocks on the
   client and server are properly synchronised (e.g., using ntp).
d167 48
a214 17
A: You are most likely running named as a non-root user, and that user
   does not have permission to write in /var/run. The common ways of
   fixing this are to create a /var/run/named directory owned by the named
   user and set pid-file to "/var/run/named/named.pid", or set pid-file to
   "named.pid", which will put the file in the directory specified by the
   directory option (which, in this case, must be writable by the named
   user).

Q: I can query the nameserver from the nameserver but not from other
   machines. Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external
   view at the same time? When I tried, both views on the slave were
   transferred from the same view on the master.
d216 6
a221 2
A: You will need to give the master and slave multiple IP addresses and
   use those to make sure you reach the correct view on the other machine.
d249 2
a250 2
   You put the external address on the alias so that all the other dns
   clients on these boxes see the internal view by default.
d286 19
a304 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME
   and other data" when transferring a zone. What does this mean?
d306 2
a307 3
A: These indicate a malformed master zone. You can identify the exact
   records involved by transferring the zone using dig then running
   named-checkzone on it.
d312 2
a313 2
   A CNAME record cannot exist with the same name as another record except
   for the DNSSEC records which prove its existence (NSEC).
d315 24
a338 14
   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other
   data should be present; this ensures that the data for a canonical name
   and its aliases cannot be different. This rule also insures that a
   cached CNAME can be used without checking with an authoritative server
   for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input"
   where 99 is the last line of named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title
   indication (e.g. CR/LF) on the last line of a text file. This can be
   fixed by "adding" a blank line to the end of the file. Named expects to
   see EOF immediately after EOL and treats text files where this is not
   met as truncated.
d342 2
a343 2
A: You choose one view to be master and the second a slave and transfer
   the zone between views.
d357 1
a357 1
                   match-clients { !key external; 10.0.1/24; };
d371 1
a371 1
                   match-clients { key external; any; };
d382 2
a383 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
   master file primaries/wireless.ietf56.ietf.org: no owner".
d385 4
a388 5
A: This error is produced when a line in the master file contains leading
   white space (tab/space) but the is no current record owner name to
   inherit the name from. Usually this is the result of putting white
   space before a comment, forgetting the "@@" for the SOA record, or
   indenting the master file.
d392 2
a393 2
A: You are running chrooted (-t) and have not supplied local timezone
   information in the chroot area.
d401 7
a407 2
Q: I get "rndc: connect failed: connection refused" when I try to run
   rndc.
d411 33
a443 18
   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by
   "rndc-confgen -a", rndc-confgen or manually. The Administrators
   Reference manual has details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /
   etc/rndc.conf for the default server. Update /etc/rndc.conf if
   necessary so that the default server listed in /etc/rndc.conf matches
   the addresses used in named.conf. "localhost" has two address
   (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure
   that /etc/rndc.conf has the correct ownership and that a copy is in the
   chroot area. You can do this by re-running "rndc-confgen -a" with
   appropriate -t and -u arguments.
d448 3
a450 3
A: These indicate a filesystem permission error preventing named creating
   / renaming the temporary file. These will usually also have other
   associated error messages like
d454 12
a465 12
   Named needs write permission on the directory containing the file.
   Named writes the new cache file to a temporary file then renames it to
   the name specified in named.conf to ensure that the contents are always
   complete. This is to prevent named loading a partial zone in the event
   of power failure or similar interrupting the write of the master file.

   Note file names are relative to the directory specified in options and
   any chroot directory ([<chroot dir>/][<options dir>]).

   If named is invoked as "named -t /chroot/DNS" with the following
   named.conf then "/chroot/DNS/var/named/sl" needs to be writable by the
   user named is running as.
d477 1
a477 3
Q: I want to forward all DNS queries from my caching nameserver to another
   server. But there are some domains which have to be served locally, via
   rbldnsd.
d479 1
a479 1
   How do I achieve this ?
d481 1
a481 115
A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Can you help me understand how BIND 9 uses memory to store DNS zones?

   Some times it seems to take several times the amount of memory it needs
   to store the zone.

A: When reloading a zone named my have multiple copies of the zone in
   memory at one time. The zone it is serving and the one it is loading.
   If reloads are ultra fast it can have more still.

   e.g. Ones that are transferring out, the one that it is serving and the
   one that is loading.

   BIND 8 destroyed the zone before loading and also killed off outgoing
   transfers of the zone.

   The new strategy allows slaves to get copies of the new zone regardless
   of how often the master is loaded compared to the transfer time. The
   slave might skip some intermediate versions but the transfers will
   complete and it will keep reasonably in sync with the master.

   The new strategy also allows the master to recover from syntax and
   other errors in the master file as it still has an in-core copy of the
   old contents.

3. General Questions

Q: I keep getting log messages like the following. Why?

   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
   update failed: 'RRset exists (value dependent)' prerequisite not
   satisfied (NXRRSET)

A: DNS updates allow the update request to test to see if certain
   conditions are met prior to proceeding with the update. The message
   above is saying that conditions were not met and the update is not
   proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.

Q: I keep getting log messages like the following. Why?

   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied

A: Someone is trying to update your DNS data using the RFC2136 Dynamic
   Update protocol. Windows 2000 machines have a habit of sending dynamic
   update requests to DNS servers without being specifically configured to
   do so. If the update requests are coming from a Windows 2000 machine,
   see http://support.microsoft.com/support/kb/articles/q246/8/04.asp for
   information about how to turn them off.

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of
   the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
   makes to avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a
   root server, and these records are eligible for inclusion as additional
   data in responses. Subsequently it receives a subset of the root server
   addresses as additional data in a non-authoritative (referral) response
   from a root server. This causes the addresses to now be considered
   non-authoritative (glue) data, which is not eligible for inclusion in
   responses.

   The server does have a complete set of root server addresses cached at
   all times, it just may not include all of them as additional data,
   depending on whether they were last received as answers or as glue. You
   can always look up the addresses with explicit queries like "dig
   a.root-servers.net A".

Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?

A: A zone can be updated either by editing zone files and reloading the
   server or by dynamic update, but not both. If you have enabled dynamic
   update for a zone using the "allow-update" option, you are not supposed
   to edit the zone file by hand, and the server will not attempt to
   reload it.

Q: Why is named listening on UDP port other than 53?

A: Named uses a system selected port to make queries of other nameservers.
   This behaviour can be overridden by using query-source to lock down the
   port and/or address. See also notify-source and transfer-source.

Q: I get warning messages like "zone example.com/IN: refresh: failure
   trying master 1.2.3.4#53: timed out".

A: Check that you can make UDP queries from the slave to the master

   dig +norec example.com soa @@1.2.3.4

   You could be generating queries faster than the slave can cope with.
   Lower the serial query rate.

   serial-query-rate 5; // default 20

Q: I don't get RRSIG's returned when I use "dig +dnssec".

A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
d485 2
a486 2
A: No. The rules for glue (copies of the *address* records in the parent
   zones) and additional section processing do not allow it to work.
d488 18
a505 20
   You would have to add both the CNAME and address records (A/AAAA) as
   glue to the parent zone and have CNAMEs be followed when doing
   additional section processing to make it work. No nameserver
   implementation supports either of these requirements.

Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
   mean?

A: If the IN-ADDR.ARPA name covered refers to a internal address space you
   are using then you have failed to follow RFC 1918 usage rules and are
   leaking queries to the Internet. You should establish your own zones
   for these addresses to prevent you querying the Internet's name servers
   for these addresses. Please see http://as112.net/ for details of the
   problems you are causing and the counter measures that have had to be
   deployed.

   If you are not using these private addresses then a client has queried
   for them. You can just ignore the messages, get the offending client to
   stop sending you these messages as they are most probably leaking them
   or setup your own zones empty zones to serve answers to these queries.
a537 88
Q: Will named be affected by the 2007 changes to daylight savings rules in
   the US.

A: No, so long as the machines internal clock (as reported by "date -u")
   remains at UTC. The only visible change if you fail to upgrade your OS,
   if you are in a affected area, will be that log messages will be a hour
   out during the period where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the
   conversion rules from UTC to local time. Normally this involves
   updating a file in /etc (which sets the default timezone for the
   machine) and possibly a directory which has all the conversion rules
   for the world (e.g. /usr/share/zoneinfo). When updating the OS do not
   forget to update any chroot areas as well. See your OS's documentation
   for more details.

   The local timezone conversion rules can also be done on a individual
   basis by setting the TZ environment variable appropriately. See your
   OS's documentation for more details.

Q: Is there a bugzilla (or other tool) database that mere mortals can have
   (read-only) access to for bind?

A: No. The BIND 9 bug database is kept closed for a number of reasons.
   These include, but are not limited to, that the database contains
   proprietory information from people reporting bugs. The database has in
   the past and may in future contain unfixed bugs which are capable of
   bringing down most of the Internet's DNS infrastructure.

   The release pages for each version contain up to date lists of bugs
   that have been fixed post release. That is as close as we can get to
   providing a bug database.

4. Operating-System Specific Questions

4.1. HPUX

Q: I get the following error trying to configure BIND:

   checking if unistd.h or sys/types.h defines fd_set... no
   configure: error: need either working unistd.h or sys/select.h

A: You have attempted to configure BIND with the bundled C compiler. This
   compiler does not meet the minimum compiler requirements to for
   building BIND. You need to install a ANSI C compiler and / or teach
   configure how to find the ANSI C compiler. The later can be done by
   adjusting the PATH environment variable and / or specifying the
   compiler via CC.

   ./configure CC=<compiler> ...

4.2. Linux

Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

Q: Why do I see 5 (or more) copies of named on Linux?

A: Linux threads each show up as a process under ps. The approximate
   number of threads running is n+4, where n is the number of CPUs. Note
   that the amount of memory used is not cumulative; if each process is
   using 10M of memory, only a total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and
   require -L to display them.

Q: Why does BIND 9 log "permission denied" errors accessing its
   configuration files or zones on my Linux system even though it is
   running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore,
   if the server is running as root, the configuration files and zone
   files should also be owned by root.

Q: I get the error message "named: capset failed: Operation not permitted"
   when starting named.

A: The capability module, part of "Linux Security Modules/LSM", has not
   been loaded into the kernel. See insmod(8).

d542 2
a543 2
   Why can't named create DDNS journal files or update the master zones
   from journals?
d549 4
a552 4
   Red Hat have adopted the National Security Agency's SELinux security
   policy ( see http://www.nsa.gov/selinux ) and recommendations for BIND
   security , which are more secure than running named in a chroot and
   make use of the bind-chroot environment unnecessary .
d554 2
a555 2
   By default, named is not allowed by the SELinux policy to write, create
   or delete any files EXCEPT in these directories:
d562 1
a562 2
   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
   installed.
d564 10
a573 12
   The SELinux policy particularly does NOT allow named to modify the
   $ROOTDIR/var/named directory, the default location for master zone
   database files.

   SELinux policy overrules file access permissions - so even if all the
   files under /var/named have ownership named:named and mode rw-rw-r--,
   named will still not be able to write or create files except in the
   directories above, with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to
   locate them in $ROOTDIR/var/named/slaves, with named.conf zone
   statements such as:
d587 2
a588 2
   To allow named to create its cache dump and statistics files, for
   example, you could use named.conf options statements such as:
d598 4
a601 5
   You can also tell SELinux to allow named to update any zone database
   files, by setting the SELinux tunable boolean parameter
   'named_write_master_zones=1', using the system-config-securitylevel
   GUI, using the 'setsebool' command, or in /etc/selinux/targeted/
   booleans.
d613 3
a615 3
   If you want to retain use of the SELinux policy for named, and put
   named files in different locations, you can do so by changing the
   context of the custom file locations .
d617 2
a618 2
   To create a custom configuration file location, e.g. '/root/
   named.conf', to use with the 'named -c' option, do:
d623 2
a624 2
   To create a custom modifiable named data location, e.g. '/var/log/
   named' for a log file, do:
d634 2
a635 2
   See these man-pages for more information : selinux(8), named_selinux
   (8), chcon(1), setsebool(8)
d637 2
a638 1
4.3. Windows
d640 1
a640 2
Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail.
   Why?
d642 4
a645 7
A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked
   around by setting the option "transfer-format one-answer;". Also check
   whether your zone contains domain names with embedded spaces or other
   special characters, like "John\032Doe\213s\032Computer", since such
   names have been known to cause Windows 2000 slaves to incorrectly
   reject the zone.
d647 4
a650 1
Q: I get "Error 1067" when starting named under Windows.
d652 3
a654 9
A: This is the service manager saying that named exited. You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.

   options {
           Directory "C:\windows\dns\etc";
a656 1
4.4. FreeBSD
d658 1
a658 1
Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
d660 11
a670 3
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to
   use certain interrupts as a source of random events. You can make this
   permanent by setting rand_irqs in /etc/rc.conf.
d672 3
a674 2
   /etc/rc.conf
   rand_irqs="3 14 15"
d676 1
a676 1
   See also http://people.freebsd.org/~dougb/randomness.html
d678 1
a678 1
4.5. Solaris
d680 5
a684 1
Q: How do I integrate BIND 9 and Solaris SMF
d686 2
a687 1
A: Sun has a blog entry describing how to do this.
d689 4
a692 1
   http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
d694 2
a695 1
4.6. Apple Mac OS X
d697 3
a699 1
Q: How do I run BIND 9 on Apple Mac OS X?
d701 2
a702 1
A: If you run Tiger(Mac OS 10.4) or later then this is all you need to do:
d704 1
a704 1
   % sudo rndc-confgen  > /etc/rndc.conf
d706 1
a706 20
   Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:

   key "rndc-key" {
           algorithm hmac-md5;
           secret "uvceheVuqf17ZwIcTydddw==";
   };

   Then start the relevant service:

   % sudo service org.isc.named start

   This is persistent upon a reboot, so you will have to do it only once.

A: Alternatively you can just generate /etc/rndc.key by running:

   % sudo rndc-confgen -a

   Then start the relevant service:

   % sudo service org.isc.named start
d708 13
a720 3
   Named will look for /etc/rndc.key when it starts if it doesn't have a
   controls section or the existing controls are missing keys sub-clauses.
   This is persistent upon a reboot, so you will have to do it only once.
@


1.1.1.1.2.1
log
@MFC: BIND 9 and related bits.

Approved by:	re
@
text
@@


1.1.1.1.2.2
log
@MFC BIND 9.3.1 and related bmake updates

Approved by:	re (kensmith)
@
text
@a454 16


Q: I get "Error 1067" when starting named under Windows.

A: This is the service manager saying that named exited.   You need to
   examine the Application log in the EventViewer to find out why.

   Common causes are that you failed to create "named.conf" (usually 
   "C:\windows\dns\etc\named.conf") or failed to specify the directory
   in named.conf.

        options {
                Directory "C:\windows\dns\etc";
        };


@


1.1.1.1.2.3
log
@MFC import of BIND 9.3.2
@
text
@d1 3
a5 1
-------------------------------------------------------------------------------
d10 15
a24 15
   In particular, setuid() operates only on the current thread, not the full
   process. Because of this limitation, BIND 9 cannot use setuid() on Linux as
   it can on all other supported platforms. setuid() cannot be called before
   creating threads, since the server does not start listening on reserved
   ports until after threads have started.

   In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
   capabilities across a setuid() call is present. This allows BIND 9 to call
   setuid() early, while retaining the ability to bind reserved ports. This is
   a Linux-specific hack.

   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
   of a security risk than a root process that has not dropped privileges.

   If Linux threads ever work correctly, this restriction will go away.
d26 2
a27 2
   Configuring BIND9 with the --disable-threads option (the default) causes a
   non-threaded version to be built, which will allow -u to be used.
a28 2
Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
   instead"?
d30 5
a34 2
A: Your zone file is illegal according to RFC1035. It must either have a line
   like:
d38 2
a39 2
   at the beginning, or the first record in it must have a TTL field, like the
   "84600" in this example:
d45 15
a59 12
A: Linux threads each show up as a process under ps. The approximate number of
   threads running is n+4, where n is the number of CPUs. Note that the amount
   of memory used is not cumulative; if each process is using 10M of memory,
   only a total of 10M is used.

Q: Why does BIND 9 log "permission denied" errors accessing its configuration
   files or zones on my Linux system even though it is running as root?

A: On Linux, BIND 9 drops most of its root privileges on startup. This
   including the privilege to open files owned by other users. Therefore, if
   the server is running as root, the configuration files and zone files should
   also be owned by root.
d62 4
a65 1
   bar: ran out of space"?
a66 2
A: This is often caused by TXT records with missing close quotes. Check that
   all TXT records containing quoted strings have both open and close quotes.
d70 6
a75 5
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
   (that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
   apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
   kernel. This patch will cause multithreaded programs to dump the correct
   thread.
d79 23
a101 19
A: Put a "version" option containing something other than the real version in
   the "options" section of named.conf. Note doing this will not prevent
   attacks and may impede people trying to diagnose problems with your server.
   Also it is possible to "fingerprint" nameservers to determine their version.

Q: How do I restrict only remote users from looking up the server version?

A: The following view statement will intercept lookups as the internal view
   that holds the version information will be matched last. The caveats of the
   previous answer still apply, of course.

   view "chaos" chaos {
           match-clients { <those to be refused>; };
           allow-query { none; };
           zone "." {
                   type hint;
                   file "/dev/null";  // or any empty file
           };
   };
d104 1
a104 1
   mean?
d107 4
a110 4
   mostly DNSSEC related. These messages indicate that you have no source of
   entropy. On systems with /dev/random or an equivalent, it is used by
   default. A source of entropy can also be defined using the random-device
   option in named.conf.
a111 1
Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
d113 1
a113 2
A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
   under /usr. Check that the correct named is running.
d115 2
a116 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers.
   I'm sure I have the keys set up correctly, but the server is rejecting the
   TSIG. Why?
a117 2
A: This may be a clock skew problem. Check that the the clocks on the client
   and server are properly synchronised (e.g., using ntp).
d119 3
a121 2
Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
   found. Why?
d123 2
a124 3
A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
   doesn't work. If you are using one of these, use normal make or gmake
   instead.
a125 3
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging
   error messages like "notify to 10.0.0.1#53 failed: unexpected end of input".
   What's wrong?
d127 2
a128 3
A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in
   BIND 8.2.4. It can be safely ignored - the notify has been acted on by the
   slave despite the error message.
d130 3
a132 1
Q: I keep getting log messages like the following. Why?
a133 3
   Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
   failed: 'RRset exists (value dependent)' prerequisite not satisfied
   (NXRRSET)
d135 3
a137 4
A: DNS updates allow the update request to test to see if certain conditions
   are met prior to proceeding with the update. The message above is saying
   that conditions were not met and the update is not proceeding. See doc/rfc/
   rfc2136.txt for more details on prerequisites.
d139 3
a141 1
Q: I keep getting log messages like the following. Why?
a142 1
   Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
d144 1
a144 6
A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
   protocol. Windows 2000 machines have a habit of sending dynamic update
   requests to DNS servers without being specifically configured to do so. If
   the update requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information
   about how to turn them off.
d146 3
a148 1
Q: I see a log message like the following. Why?
d150 4
a153 1
   couldn't open pid file '/var/run/named.pid': Permission denied
a154 35
A: You are most likely running named as a non-root user, and that user does not
   have permission to write in /var/run. The common ways of fixing this are to
   create a /var/run/named directory owned by the named user and set pid-file
   to "/var/run/named/named.pid", or set pid-file to "named.pid", which will
   put the file in the directory specified by the directory option (which, in
   this case, must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are
   missing. Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the
   way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to
   avoid promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root
   server addresses as additional data in an authoritative response from a root
   server, and these records are eligible for inclusion as additional data in
   responses. Subsequently it receives a subset of the root server addresses as
   additional data in a non-authoritative (referral) response from a root
   server. This causes the addresses to now be considered non-authoritative
   (glue) data, which is not eligible for inclusion in responses.

   The server does have a complete set of root server addresses cached at all
   times, it just may not include all of them as additional data, depending on
   whether they were last received as answers or as glue. You can always look
   up the addresses with explicit queries like "dig a.root-servers.net A".

Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?

A: This may be caused by a bug in the Windows 2000 DNS server where DNS
   messages larger than 16K are not handled properly. This can be worked around
   by setting the option "transfer-format one-answer;". Also check whether your
   zone contains domain names with embedded spaces or other special characters,
   like "John\032Doe\213s\032Computer", since such names have been known to
   cause Windows 2000 slaves to incorrectly reject the zone.
d156 1
a156 1
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
d158 1
a158 86
A: A zone can be updated either by editing zone files and reloading the server
   or by dynamic update, but not both. If you have enabled dynamic update for a
   zone using the "allow-update" option, you are not supposed to edit the zone
   file by hand, and the server will not attempt to reload it.

Q: I can query the nameserver from the nameserver but not from other machines.
   Why?

A: This is usually the result of the firewall configuration stopping the
   queries and / or the replies.

Q: How can I make a server a slave for both an internal and an external view at
   the same time? When I tried, both views on the slave were transferred from
   the same view on the master.

A: You will need to give the master and slave multiple IP addresses and use
   those to make sure you reach the correct view on the other machine.

   Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
                   notify-source 10.0.1.1;
                   transfer-source 10.0.1.1;
                   query-source address 10.0.1.1;
       external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.2;
           transfer-source 10.0.1.2;
           query-source address 10.0.1.2;

   Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
       internal:
           match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
           notify-source 10.0.1.3;
           transfer-source 10.0.1.3;
           query-source address 10.0.1.3;
      external:
           match-clients { any; };
           recursion no;   // don't offer recursion to the world
           notify-source 10.0.1.4;
           transfer-source 10.0.1.4;
           query-source address 10.0.1.4;

   You put the external address on the alias so that all the other dns clients
   on these boxes see the internal view by default.

A: BIND 9.3 and later: Use TSIG to select the appropriate view.

   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.0.2 { keys external; };
                   recursion no;
                   ...
           };

   Slave 10.0.1.2:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };
           view "internal" {
                   match-clients { !key external; 10.0.1/24; };
                   ...
           };
           view "external" {
                   match-clients { key external; any; };
                   server 10.0.0.1 { keys external; };
                   recursion no;
                   ...
           };

Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.

A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
   certain interrupts as a source of random events. You can make this permanent
   by setting rand_irqs in /etc/rc.conf.
d160 6
a165 2
   /etc/rc.conf
   rand_irqs="3 14 15"
a166 1
   See also http://people.freebsd.org/~dougb/randomness.html
d168 1
a168 1
Q: Why is named listening on UDP port other than 53?
d170 1
a170 29
A: Named uses a system selected port to make queries of other nameservers. This
   behaviour can be overridden by using query-source to lock down the port and/
   or address. See also notify-source and transfer-source.

Q: I get error messages like "multiple RRs of singleton type" and "CNAME and
   other data" when transferring a zone. What does this mean?

A: These indicate a malformed master zone. You can identify the exact records
   involved by transferring the zone using dig then running named-checkzone on
   it.

   dig axfr example.com @@master-server > tmp
   named-checkzone example.com tmp

   A CNAME record cannot exist with the same name as another record except for
   the DNSSEC records which prove its existance (NSEC).

   RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
   should be present; this ensures that the data for a canonical name and its
   aliases cannot be different. This rule also insures that a cached CNAME can
   be used without checking with an authoritative server for other RR types."

Q: I get error messages like "named.conf:99: unexpected end of input" where 99
   is the last line of named.conf.

A: Some text editors (notepad and wordpad) fail to put a line title indication
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding"
   a blank line to the end of the file. Named expects to see EOF immediately
   after EOL and treats text files where this is not met as truncated.
d172 42
a213 2
Q: I get warning messages like "zone example.com/IN: refresh: failure trying
   master 1.2.3.4#53: timed out".
a214 1
A: Check that you can make UDP queries from the slave to the master
d216 1
a216 1
   dig +norec example.com soa @@1.2.3.4
d218 94
a311 2
   You could be generating queries faster than the slave can cope with. Lower
   the serial query rate.
d313 1
a313 1
   serial-query-rate 5; // default 20
a314 1
Q: How do I share a dynamic zone between multiple views?
d316 1
a316 2
A: You choose one view to be master and the second a slave and transfer the
   zone between views.
d318 3
a320 36
   Master 10.0.1.1:
           key "external" {
                   algorithm hmac-md5;
                   secret "xxxxxxxx";
           };

           key "mykey" {
                   algorithm hmac-md5;
                   secret "yyyyyyyy";
           };

           view "internal" {
                   match-clients { !external; 10.0.1/24; };
                   server 10.0.1.1 {
                           /* Deliver notify messages to external view. */
                           keys { external; };
                   };
                   zone "example.com" {
                           type master;
                           file "internal/example.db";
                           allow-update { key mykey; };
                           notify-also { 10.0.1.1; };
                   };
           };

           view "external" {
                   match-clients { external; any; };
                   zone "example.com" {
                           type slave;
                           file "external/example.db";
                           masters { 10.0.1.1; };
                           transfer-source { 10.0.1.1; };
                           // allow-update-forwarding { any; };
                           // allow-notify { ... };
                   };
           };
a321 2
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
   file primaries/wireless.ietf56.ietf.org: no owner".
d323 2
a324 4
A: This error is produced when a line in the master file contains leading white
   space (tab/space) but the is no current record owner name to inherit the
   name from. Usually this is the result of putting white space before a
   comment. Forgeting the "@@" for the SOA record or indenting the master file.
d326 3
a328 1
Q: Why are my logs in GMT (UTC).
d330 3
a332 2
A: You are running chrooted (-t) and have not supplied local timzone
   information in the chroot area.
a333 3
   FreeBSD: /etc/localtime
   Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
   OSF: /etc/zoneinfo/localtime
d335 2
a336 1
   See also tzset(3) and zic(8).
d338 4
a341 2
Q: I get the error message "named: capset failed: Operation not permitted" when
   starting named.
a342 2
A: The capability module, part of "Linux Security Modules/LSM", has not been
   loaded into the kernel. See insmod(8).
d344 2
a345 1
Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
d347 1
a347 1
A: This is usually a configuration error.
d349 1
a349 17
   First ensure that named is running and no errors are being reported at
   startup (/var/log/messages or equivalent). Running "named -g <usual
   arguments>" from a title can help at this point.

   Secondly ensure that named is configured to use rndc either by "rndc-confgen
   -a", rndc-confgen or manually. The Administrators Reference manual has
   details on how to do this.

   Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
   rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
   the default server listed in /etc/rndc.conf matches the addresses used in
   named.conf. "localhost" has two address (127.0.0.1 and ::1).

   If you use "rndc-confgen -a" and named is running with -t or -u ensure that
   /etc/rndc.conf has the correct ownership and that a copy is in the chroot
   area. You can do this by re-running "rndc-confgen -a" with appropriate -t
   and -u arguments.
d351 2
a352 1
Q: I don't get RRSIG's returned when I use "dig +dnssec".
d354 1
a354 1
A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
d356 1
a356 1
Q: I get "Error 1067" when starting named under Windows.
d358 2
a359 2
A: This is the service manager saying that named exited. You need to examine
   the Application log in the EventViewer to find out why.
d361 36
a396 3
   Common causes are that you failed to create "named.conf" (usually "C:\
   windows\dns\etc\named.conf") or failed to specify the directory in
   named.conf.
d398 2
a399 3
   options {
           Directory "C:\windows\dns\etc";
   };
d401 5
a405 2
Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
   receiving responses: permission denied" error messages.
a406 3
A: These indicate a filesystem permission error preventing named creating /
   renaming the temporary file. These will usually also have other associated
   error messages like
d408 1
a408 1
   "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
d410 2
a411 5
   Named needs write permission on the directory containing the file. Named
   writes the new cache file to a temporary file then renames it to the name
   specified in named.conf to ensure that the contents are always complete.
   This is to prevent named loading a partial zone in the event of power
   failure or similar interrupting the write of the master file.
d413 3
a415 2
   Note file names are relative to the directory specified in options and any
   chroot directory ([<chroot dir>/][<options dir>]).
d417 1
a417 3
   If named is invoked as "named -t /chroot/DNS" with the following named.conf
   then "/chroot/DNS/var/named/sl" needs to be writable by the user named is
   running as.
a418 3
   options {
           directory "/var/named";
   };
d420 2
a421 5
   zone "example.net" {
           type slave;
           file "sl/example.net";
           masters { 192.168.4.12; };
   };
d423 1
a423 1
Q: How do I intergrate BIND 9 and Solaris SMF
a424 1
A: Sun has a blog entry describing how to do this.
d426 2
a427 1
   http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
d429 1
a429 1
Q: Can a NS record refer to a CNAME.
d431 19
a449 2
A: No. The rules for glue (copies of the *address* records in the parent zones)
   and additional section processing do not allow it to work.
a450 4
   You would have to add both the CNAME and address records (A/AAAA) as glue to
   the parent zone and have CNAMEs be followed when doing additional section
   processing to make it work. No namesever implementation supports either of
   these requirements.
d452 1
a452 1
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
d454 1
a454 6
A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
   using then you have failed to follow RFC 1918 usage rules and are leaking
   queries to the Internet. You should establish your own zones for these
   addresses to prevent you quering the Internet's name servers for these
   addresses. Please see http://as112.net/ for details of the problems you are
   causing and the counter measures that have had to be deployed.
a455 4
   If you are not using these private addresses then a client has queried for
   them. You can just ignore the messages, get the offending client to stop
   sending you these messages as they are most probably leaking them or setup
   your own zones empty zones to serve answers to these queries.
d457 1
a457 21
   zone "10.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "16.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   ...

   zone "31.172.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };

   zone "168.192.IN-ADDR.ARPA" {
           type master;
           file "empty";
   };
d459 2
a460 4
   empty:
   @@ 10800 IN SOA <name-of-server>. <contact-email>. (
                  1 3600 1200 604800 10800 )
   @@ 10800 IN NS <name-of-server>.
d462 7
a468 1
   Note
a469 1
   Future versions of named are likely to do this automatically.
@


1.1.1.1.2.4
log
@MFC upgrade to version 9.3.3
@
text
@d7 6
a12 6
A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
   particular, setuid() operates only on the current thread, not the full process.
   Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
   all other supported platforms. setuid() cannot be called before creating
   threads, since the server does not start listening on reserved ports until
   after threads have started.
d16 2
a17 2
   setuid() early, while retaining the ability to bind reserved ports. This is a
   Linux-specific hack.
d19 2
a20 2
   On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
   a security risk than a root process that has not dropped privileges.
a26 10
Q: Why do I get the following errors:

   general: errno2result.c:109: unexpected error:
   general: unable to convert errno to isc_result: 14: Bad address
   client: UDP client handler shutting down due to fatal receive error: unexpected error

A: This is the result of a Linux kernel bug.

   See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2

d43 3
a45 6
   threads running is n+4, where n is the number of CPUs. Note that the amount of
   memory used is not cumulative; if each process is using 10M of memory, only a
   total of 10M is used.

   Newer versions of Linux's ps command hide the individual threads and require -L
   to display them.
d50 4
a53 4
A: On Linux, BIND 9 drops most of its root privileges on startup. This including
   the privilege to open files owned by other users. Therefore, if the server is
   running as root, the configuration files and zone files should also be owned by
   root.
d55 2
a56 2
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
   ran out of space"?
d58 2
a59 2
A: This is often caused by TXT records with missing close quotes. Check that all
   TXT records containing quoted strings have both open and close quotes.
d71 4
a74 4
A: Put a "version" option containing something other than the real version in the
   "options" section of named.conf. Note doing this will not prevent attacks and
   may impede people trying to diagnose problems with your server. Also it is
   possible to "fingerprint" nameservers to determine their version.
d78 3
a80 3
A: The following view statement will intercept lookups as the internal view that
   holds the version information will be matched last. The caveats of the previous
   answer still apply, of course.
d94 5
a98 4
A: The server requires a source of entropy to perform certain operations, mostly
   DNSSEC related. These messages indicate that you have no source of entropy. On
   systems with /dev/random or an equivalent, it is used by default. A source of
   entropy can also be defined using the random-device option in named.conf.
d105 3
a107 3
Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
   sure I have the keys set up correctly, but the server is rejecting the TSIG.
   Why?
d109 2
a110 2
A: This may be a clock skew problem. Check that the the clocks on the client and
   server are properly synchronised (e.g., using ntp).
d116 2
a117 1
   doesn't work. If you are using one of these, use normal make or gmake instead.
d119 7
a125 7
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
   messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
   wrong?

A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
   8.2.4. It can be safely ignored - the notify has been acted on by the slave
   despite the error message.
d130 2
a131 1
   failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
d133 3
a135 3
A: DNS updates allow the update request to test to see if certain conditions are
   met prior to proceeding with the update. The message above is saying that
   conditions were not met and the update is not proceeding. See doc/rfc/
d143 5
a147 5
   protocol. Windows 2000 machines have a habit of sending dynamic update requests
   to DNS servers without being specifically configured to do so. If the update
   requests are coming from a Windows 2000 machine, see http://
   support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
   how to turn them off.
d155 19
a173 19
   create a /var/run/named directory owned by the named user and set pid-file to "
   /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
   file in the directory specified by the directory option (which, in this case,
   must be writable by the named user).

Q: When I do a "dig . ns", many of the A records for the root servers are missing.
   Why?

A: This is normal and harmless. It is a somewhat confusing side effect of the way
   BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
   promoting glue into answers.

   When BIND 9 first starts up and primes its cache, it receives the root server
   addresses as additional data in an authoritative response from a root server,
   and these records are eligible for inclusion as additional data in responses.
   Subsequently it receives a subset of the root server addresses as additional
   data in a non-authoritative (referral) response from a root server. This causes
   the addresses to now be considered non-authoritative (glue) data, which is not
   eligible for inclusion in responses.
d177 2
a178 2
   whether they were last received as answers or as glue. You can always look up
   the addresses with explicit queries like "dig a.root-servers.net A".
d182 6
a187 6
A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
   larger than 16K are not handled properly. This can be worked around by setting
   the option "transfer-format one-answer;". Also check whether your zone contains
   domain names with embedded spaces or other special characters, like "John\
   032Doe\213s\032Computer", since such names have been known to cause Windows
   2000 slaves to incorrectly reject the zone.
d191 4
a194 4
A: A zone can be updated either by editing zone files and reloading the server or
   by dynamic update, but not both. If you have enabled dynamic update for a zone
   using the "allow-update" option, you are not supposed to edit the zone file by
   hand, and the server will not attempt to reload it.
d199 2
a200 2
A: This is usually the result of the firewall configuration stopping the queries
   and / or the replies.
d203 2
a204 2
   the same time? When I tried, both views on the slave were transferred from the
   same view on the master.
d206 2
a207 2
A: You will need to give the master and slave multiple IP addresses and use those
   to make sure you reach the correct view on the other machine.
d235 2
a236 2
   You put the external address on the alias so that all the other dns clients on
   these boxes see the internal view by default.
d251 1
a251 1
                   server 10.0.1.2 { keys external; };
d267 1
a267 1
                   server 10.0.1.1 { keys external; };
d275 2
a276 2
   certain interrupts as a source of random events. You can make this permanent by
   setting rand_irqs in /etc/rc.conf.
d286 2
a287 2
   behaviour can be overridden by using query-source to lock down the port and/or
   address. See also notify-source and transfer-source.
d289 2
a290 2
Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
   data" when transferring a zone. What does this mean?
d293 2
a294 1
   involved by transferring the zone using dig then running named-checkzone on it.
d299 2
a300 2
   A CNAME record cannot exist with the same name as another record except for the
   DNSSEC records which prove its existance (NSEC).
d304 2
a305 2
   aliases cannot be different. This rule also insures that a cached CNAME can be
   used without checking with an authoritative server for other RR types."
d307 2
a308 2
Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
   the last line of named.conf.
d311 3
a313 3
   (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
   blank line to the end of the file. Named expects to see EOF immediately after
   EOL and treats text files where this is not met as truncated.
d322 2
a323 2
   You could be generating queries faster than the slave can cope with. Lower the
   serial query rate.
d329 2
a330 2
A: You choose one view to be master and the second a slave and transfer the zone
   between views.
d373 3
a375 3
   space (tab/space) but the is no current record owner name to inherit the name
   from. Usually this is the result of putting white space before a comment.
   Forgeting the "@@" for the SOA record or indenting the master file.
d379 2
a380 2
A: You are running chrooted (-t) and have not supplied local timzone information
   in the chroot area.
d398 3
a400 3
   First ensure that named is running and no errors are being reported at startup
   (/var/log/messages or equivalent). Running "named -g <usual arguments>" from a
   title can help at this point.
d403 2
a404 2
   -a", rndc-confgen or manually. The Administrators Reference manual has details
   on how to do this.
d411 4
a414 4
   If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
   etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
   You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
   arguments.
d422 2
a423 2
A: This is the service manager saying that named exited. You need to examine the
   Application log in the EventViewer to find out why.
d425 3
a427 2
   Common causes are that you failed to create "named.conf" (usually "C:\windows\
   dns\etc\named.conf") or failed to specify the directory in named.conf.
d442 5
a446 5
   Named needs write permission on the directory containing the file. Named writes
   the new cache file to a temporary file then renames it to the name specified in
   named.conf to ensure that the contents are always complete. This is to prevent
   named loading a partial zone in the event of power failure or similar
   interrupting the write of the master file.
d492 2
a493 2
   sending you these messages as they are most probably leaking them or setup your
   own zones empty zones to serve answers to these queries.
a525 99
Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

   Why can't named update slave zone database files?

   Why can't named create DDNS journal files or update the master zones from
   journals?

   Why can't named create custom log files?

A: Red Hat Security Enhanced Linux (SELinux) policy security protections :

   Red Hat have adopted the National Security Agency's SELinux security policy (
   see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
   are more secure than running named in a chroot and make use of the bind-chroot
   environment unecessary .

   By default, named is not allowed by the SELinux policy to write, create or
   delete any files EXCEPT in these directories:

   $ROOTDIR/var/named/slaves
   $ROOTDIR/var/named/data
   $ROOTDIR/var/tmp


   where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.

   The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
   /named directory, the default location for master zone database files.

   SELinux policy overrules file access permissions - so even if all the files
   under /var/named have ownership named:named and mode rw-rw-r--, named will
   still not be able to write or create files except in the directories above,
   with SELinux in Enforcing mode.

   So, to allow named to update slave or DDNS zone files, it is best to locate
   them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:

   zone "slave.zone." IN {
           type slave;
           file "slaves/slave.zone.db";
           ...
   };
   zone "ddns.zone." IN  {
           type master;
           allow-updates {...};
           file "slaves/ddns.zone.db";
   };


   To allow named to create its cache dump and statistics files, for example, you
   could use named.conf options statements such as:

   options {
           ...
           dump-file "/var/named/data/cache_dump.db";
           statistics-file "/var/named/data/named_stats.txt";
           ...
   };


   You can also tell SELinux to allow named to update any zone database files, by
   setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
   using the system-config-securitylevel GUI, using the 'setsebool' command, or in
   /etc/selinux/targeted/booleans.

   You can disable SELinux protection for named entirely by setting the
   'named_disable_trans=1' SELinux tunable boolean parameter.

   The SELinux named policy defines these SELinux contexts for named:

   named_zone_t : for zone database files       - $ROOTDIR/var/named/*
   named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
   named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


   If you want to retain use of the SELinux policy for named, and put named files
   in different locations, you can do so by changing the context of the custom
   file locations .

   To create a custom configuration file location, eg. '/root/named.conf', to use
   with the 'named -c' option, do:

   # chcon system_u:object_r:named_conf_t /root/named.conf


   To create a custom modifiable named data location, eg. '/var/log/named' for a
   log file, do:

   # chcon system_u:object_r:named_cache_t /var/log/named


   To create a custom zone file location, eg. /root/zones/, do:

   # chcon system_u:object_r:named_zone_t /root/zones/{.,*}


   See these man-pages for more information : selinux(8), named_selinux(8), chcon
   (1), setsebool(8)

@


1.1.1.1.2.5
log
@MFC the upgrade to BIND 9.3.4
@
text
@a2 4
Copyright  2004-2007 Internet Systems Consortium, Inc. ("ISC")

Copyright  2000-2003 Internet Software Consortium.

a632 39
Q: I want to forward all DNS queries from my caching nameserver to another server.
   But there are some domains which have to be served locally, via rbldnsd.

   How do I achieve this ?

A: options {
           forward only;
           forwarders { <ip.of.primary.nameserver>; };
   };

   zone "sbl-xbl.spamhaus.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };

   zone "list.dsbl.org" {
           type forward; forward only;
           forwarders { <ip.of.rbldns.server> port 530; };
   };


Q: Will named be affected by the 2007 changes to daylight savings rules in the US.

A: No, so long as the machines internal clock (as reported by "date -u") remains
   at UTC. The only visible change if you fail to upgrade your OS, if you are in a
   affected area, will be that log messages will be a hour out during the period
   where the old rules do not match the new rules.

   For most OS's this change just means that you need to update the conversion
   rules from UTC to local time. Normally this involves updating a file in /etc
   (which sets the default timezone for the machine) and possibly a directory
   which has all the conversion rules for the world (e.g. /usr/share/zoneinfo).
   When updating the OS do not forget to update any chroot areas as well. See your
   OS's documetation for more details.

   The local timezone conversion rules can also be done on a individual basis by
   setting the TZ envirionment variable appropriately. See your OS's documentation
   for more details.

@


