1 Frequently Asked Questions about BIND 9
3 Copyright © 2004-2007 Internet Systems Consortium, Inc. ("ISC")
5 Copyright © 2000-2003 Internet Software Consortium.
7 -------------------------------------------------------------------------------
9 Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
11 A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
12 particular, setuid() operates only on the current thread, not the full process.
13 Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
14 all other supported platforms. setuid() cannot be called before creating
15 threads, since the server does not start listening on reserved ports until
16 after threads have started.
18 In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
19 capabilities across a setuid() call is present. This allows BIND 9 to call
20 setuid() early, while retaining the ability to bind reserved ports. This is a
23 On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
24 a security risk than a root process that has not dropped privileges.
26 If Linux threads ever work correctly, this restriction will go away.
28 Configuring BIND9 with the --disable-threads option (the default) causes a
29 non-threaded version to be built, which will allow -u to be used.
31 Q: Why do I get the following errors:
33 general: errno2result.c:109: unexpected error:
34 general: unable to convert errno to isc_result: 14: Bad address
35 client: UDP client handler shutting down due to fatal receive error: unexpected error
37 A: This is the result of a Linux kernel bug.
39 See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2
41 Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
44 A: Your zone file is illegal according to RFC1035. It must either have a line
49 at the beginning, or the first record in it must have a TTL field, like the
50 "84600" in this example:
52 example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
54 Q: Why do I see 5 (or more) copies of named on Linux?
56 A: Linux threads each show up as a process under ps. The approximate number of
57 threads running is n+4, where n is the number of CPUs. Note that the amount of
58 memory used is not cumulative; if each process is using 10M of memory, only a
61 Newer versions of Linux's ps command hide the individual threads and require -L
64 Q: Why does BIND 9 log "permission denied" errors accessing its configuration
65 files or zones on my Linux system even though it is running as root?
67 A: On Linux, BIND 9 drops most of its root privileges on startup. This including
68 the privilege to open files owned by other users. Therefore, if the server is
69 running as root, the configuration files and zone files should also be owned by
72 Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
75 A: This is often caused by TXT records with missing close quotes. Check that all
76 TXT records containing quoted strings have both open and close quotes.
78 Q: How do I produce a usable core file from a multithreaded named on Linux?
80 A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
81 (that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
82 apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
83 kernel. This patch will cause multithreaded programs to dump the correct
86 Q: How do I restrict people from looking up the server version?
88 A: Put a "version" option containing something other than the real version in the
89 "options" section of named.conf. Note doing this will not prevent attacks and
90 may impede people trying to diagnose problems with your server. Also it is
91 possible to "fingerprint" nameservers to determine their version.
93 Q: How do I restrict only remote users from looking up the server version?
95 A: The following view statement will intercept lookups as the internal view that
96 holds the version information will be matched last. The caveats of the previous
97 answer still apply, of course.
100 match-clients { <those to be refused>; };
101 allow-query { none; };
104 file "/dev/null"; // or any empty file
108 Q: What do "no source of entropy found" or "could not open entropy source foo"
111 A: The server requires a source of entropy to perform certain operations, mostly
112 DNSSEC related. These messages indicate that you have no source of entropy. On
113 systems with /dev/random or an equivalent, it is used by default. A source of
114 entropy can also be defined using the random-device option in named.conf.
116 Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
118 A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
119 under /usr. Check that the correct named is running.
121 Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
122 sure I have the keys set up correctly, but the server is rejecting the TSIG.
125 A: This may be a clock skew problem. Check that the the clocks on the client and
126 server are properly synchronised (e.g., using ntp).
128 Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
131 A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
132 doesn't work. If you are using one of these, use normal make or gmake instead.
134 Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
135 messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
138 A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
139 8.2.4. It can be safely ignored - the notify has been acted on by the slave
140 despite the error message.
142 Q: I keep getting log messages like the following. Why?
144 Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
145 failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
147 A: DNS updates allow the update request to test to see if certain conditions are
148 met prior to proceeding with the update. The message above is saying that
149 conditions were not met and the update is not proceeding. See doc/rfc/
150 rfc2136.txt for more details on prerequisites.
152 Q: I keep getting log messages like the following. Why?
154 Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
156 A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
157 protocol. Windows 2000 machines have a habit of sending dynamic update requests
158 to DNS servers without being specifically configured to do so. If the update
159 requests are coming from a Windows 2000 machine, see http://
160 support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
161 how to turn them off.
163 Q: I see a log message like the following. Why?
165 couldn't open pid file '/var/run/named.pid': Permission denied
167 A: You are most likely running named as a non-root user, and that user does not
168 have permission to write in /var/run. The common ways of fixing this are to
169 create a /var/run/named directory owned by the named user and set pid-file to "
170 /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
171 file in the directory specified by the directory option (which, in this case,
172 must be writable by the named user).
174 Q: When I do a "dig . ns", many of the A records for the root servers are missing.
177 A: This is normal and harmless. It is a somewhat confusing side effect of the way
178 BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
179 promoting glue into answers.
181 When BIND 9 first starts up and primes its cache, it receives the root server
182 addresses as additional data in an authoritative response from a root server,
183 and these records are eligible for inclusion as additional data in responses.
184 Subsequently it receives a subset of the root server addresses as additional
185 data in a non-authoritative (referral) response from a root server. This causes
186 the addresses to now be considered non-authoritative (glue) data, which is not
187 eligible for inclusion in responses.
189 The server does have a complete set of root server addresses cached at all
190 times, it just may not include all of them as additional data, depending on
191 whether they were last received as answers or as glue. You can always look up
192 the addresses with explicit queries like "dig a.root-servers.net A".
194 Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?
196 A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
197 larger than 16K are not handled properly. This can be worked around by setting
198 the option "transfer-format one-answer;". Also check whether your zone contains
199 domain names with embedded spaces or other special characters, like "John\
200 032Doe\213s\032Computer", since such names have been known to cause Windows
201 2000 slaves to incorrectly reject the zone.
203 Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
205 A: A zone can be updated either by editing zone files and reloading the server or
206 by dynamic update, but not both. If you have enabled dynamic update for a zone
207 using the "allow-update" option, you are not supposed to edit the zone file by
208 hand, and the server will not attempt to reload it.
210 Q: I can query the nameserver from the nameserver but not from other machines.
213 A: This is usually the result of the firewall configuration stopping the queries
214 and / or the replies.
216 Q: How can I make a server a slave for both an internal and an external view at
217 the same time? When I tried, both views on the slave were transferred from the
218 same view on the master.
220 A: You will need to give the master and slave multiple IP addresses and use those
221 to make sure you reach the correct view on the other machine.
223 Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
225 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
226 notify-source 10.0.1.1;
227 transfer-source 10.0.1.1;
228 query-source address 10.0.1.1;
230 match-clients { any; };
231 recursion no; // don't offer recursion to the world
232 notify-source 10.0.1.2;
233 transfer-source 10.0.1.2;
234 query-source address 10.0.1.2;
236 Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
238 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
239 notify-source 10.0.1.3;
240 transfer-source 10.0.1.3;
241 query-source address 10.0.1.3;
243 match-clients { any; };
244 recursion no; // don't offer recursion to the world
245 notify-source 10.0.1.4;
246 transfer-source 10.0.1.4;
247 query-source address 10.0.1.4;
249 You put the external address on the alias so that all the other dns clients on
250 these boxes see the internal view by default.
252 A: BIND 9.3 and later: Use TSIG to select the appropriate view.
260 match-clients { !key external; 10.0.1/24; };
264 match-clients { key external; any; };
265 server 10.0.1.2 { keys external; };
276 match-clients { !key external; 10.0.1/24; };
280 match-clients { key external; any; };
281 server 10.0.1.1 { keys external; };
286 Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
288 A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
289 certain interrupts as a source of random events. You can make this permanent by
290 setting rand_irqs in /etc/rc.conf.
295 See also http://people.freebsd.org/~dougb/randomness.html
297 Q: Why is named listening on UDP port other than 53?
299 A: Named uses a system selected port to make queries of other nameservers. This
300 behaviour can be overridden by using query-source to lock down the port and/or
301 address. See also notify-source and transfer-source.
303 Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
304 data" when transferring a zone. What does this mean?
306 A: These indicate a malformed master zone. You can identify the exact records
307 involved by transferring the zone using dig then running named-checkzone on it.
309 dig axfr example.com @master-server > tmp
310 named-checkzone example.com tmp
312 A CNAME record cannot exist with the same name as another record except for the
313 DNSSEC records which prove its existance (NSEC).
315 RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
316 should be present; this ensures that the data for a canonical name and its
317 aliases cannot be different. This rule also insures that a cached CNAME can be
318 used without checking with an authoritative server for other RR types."
320 Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
321 the last line of named.conf.
323 A: Some text editors (notepad and wordpad) fail to put a line title indication
324 (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
325 blank line to the end of the file. Named expects to see EOF immediately after
326 EOL and treats text files where this is not met as truncated.
328 Q: I get warning messages like "zone example.com/IN: refresh: failure trying
329 master 1.2.3.4#53: timed out".
331 A: Check that you can make UDP queries from the slave to the master
333 dig +norec example.com soa @1.2.3.4
335 You could be generating queries faster than the slave can cope with. Lower the
338 serial-query-rate 5; // default 20
340 Q: How do I share a dynamic zone between multiple views?
342 A: You choose one view to be master and the second a slave and transfer the zone
357 match-clients { !external; 10.0.1/24; };
359 /* Deliver notify messages to external view. */
364 file "internal/example.db";
365 allow-update { key mykey; };
366 notify-also { 10.0.1.1; };
371 match-clients { external; any; };
374 file "external/example.db";
375 masters { 10.0.1.1; };
376 transfer-source { 10.0.1.1; };
377 // allow-update-forwarding { any; };
378 // allow-notify { ... };
382 Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
383 file primaries/wireless.ietf56.ietf.org: no owner".
385 A: This error is produced when a line in the master file contains leading white
386 space (tab/space) but the is no current record owner name to inherit the name
387 from. Usually this is the result of putting white space before a comment.
388 Forgeting the "@" for the SOA record or indenting the master file.
390 Q: Why are my logs in GMT (UTC).
392 A: You are running chrooted (-t) and have not supplied local timzone information
395 FreeBSD: /etc/localtime
396 Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
397 OSF: /etc/zoneinfo/localtime
399 See also tzset(3) and zic(8).
401 Q: I get the error message "named: capset failed: Operation not permitted" when
404 A: The capability module, part of "Linux Security Modules/LSM", has not been
405 loaded into the kernel. See insmod(8).
407 Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
409 A: This is usually a configuration error.
411 First ensure that named is running and no errors are being reported at startup
412 (/var/log/messages or equivalent). Running "named -g <usual arguments>" from a
413 title can help at this point.
415 Secondly ensure that named is configured to use rndc either by "rndc-confgen
416 -a", rndc-confgen or manually. The Administrators Reference manual has details
419 Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
420 rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
421 the default server listed in /etc/rndc.conf matches the addresses used in
422 named.conf. "localhost" has two address (127.0.0.1 and ::1).
424 If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
425 etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
426 You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
429 Q: I don't get RRSIG's returned when I use "dig +dnssec".
431 A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
433 Q: I get "Error 1067" when starting named under Windows.
435 A: This is the service manager saying that named exited. You need to examine the
436 Application log in the EventViewer to find out why.
438 Common causes are that you failed to create "named.conf" (usually "C:\windows\
439 dns\etc\named.conf") or failed to specify the directory in named.conf.
442 Directory "C:\windows\dns\etc";
445 Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
446 receiving responses: permission denied" error messages.
448 A: These indicate a filesystem permission error preventing named creating /
449 renaming the temporary file. These will usually also have other associated
452 "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
454 Named needs write permission on the directory containing the file. Named writes
455 the new cache file to a temporary file then renames it to the name specified in
456 named.conf to ensure that the contents are always complete. This is to prevent
457 named loading a partial zone in the event of power failure or similar
458 interrupting the write of the master file.
460 Note file names are relative to the directory specified in options and any
461 chroot directory ([<chroot dir>/][<options dir>]).
463 If named is invoked as "named -t /chroot/DNS" with the following named.conf
464 then "/chroot/DNS/var/named/sl" needs to be writable by the user named is
468 directory "/var/named";
473 file "sl/example.net";
474 masters { 192.168.4.12; };
477 Q: How do I intergrate BIND 9 and Solaris SMF
479 A: Sun has a blog entry describing how to do this.
481 http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
483 Q: Can a NS record refer to a CNAME.
485 A: No. The rules for glue (copies of the *address* records in the parent zones)
486 and additional section processing do not allow it to work.
488 You would have to add both the CNAME and address records (A/AAAA) as glue to
489 the parent zone and have CNAMEs be followed when doing additional section
490 processing to make it work. No namesever implementation supports either of
493 Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
495 A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
496 using then you have failed to follow RFC 1918 usage rules and are leaking
497 queries to the Internet. You should establish your own zones for these
498 addresses to prevent you quering the Internet's name servers for these
499 addresses. Please see http://as112.net/ for details of the problems you are
500 causing and the counter measures that have had to be deployed.
502 If you are not using these private addresses then a client has queried for
503 them. You can just ignore the messages, get the offending client to stop
504 sending you these messages as they are most probably leaking them or setup your
505 own zones empty zones to serve answers to these queries.
507 zone "10.IN-ADDR.ARPA" {
512 zone "16.172.IN-ADDR.ARPA" {
519 zone "31.172.IN-ADDR.ARPA" {
524 zone "168.192.IN-ADDR.ARPA" {
530 @ 10800 IN SOA <name-of-server>. <contact-email>. (
531 1 3600 1200 604800 10800 )
532 @ 10800 IN NS <name-of-server>.
536 Future versions of named are likely to do this automatically.
538 Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
540 Why can't named update slave zone database files?
542 Why can't named create DDNS journal files or update the master zones from
545 Why can't named create custom log files?
547 A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
549 Red Hat have adopted the National Security Agency's SELinux security policy (
550 see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
551 are more secure than running named in a chroot and make use of the bind-chroot
552 environment unecessary .
554 By default, named is not allowed by the SELinux policy to write, create or
555 delete any files EXCEPT in these directories:
557 $ROOTDIR/var/named/slaves
558 $ROOTDIR/var/named/data
562 where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.
564 The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
565 /named directory, the default location for master zone database files.
567 SELinux policy overrules file access permissions - so even if all the files
568 under /var/named have ownership named:named and mode rw-rw-r--, named will
569 still not be able to write or create files except in the directories above,
570 with SELinux in Enforcing mode.
572 So, to allow named to update slave or DDNS zone files, it is best to locate
573 them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:
575 zone "slave.zone." IN {
577 file "slaves/slave.zone.db";
580 zone "ddns.zone." IN {
583 file "slaves/ddns.zone.db";
587 To allow named to create its cache dump and statistics files, for example, you
588 could use named.conf options statements such as:
592 dump-file "/var/named/data/cache_dump.db";
593 statistics-file "/var/named/data/named_stats.txt";
598 You can also tell SELinux to allow named to update any zone database files, by
599 setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
600 using the system-config-securitylevel GUI, using the 'setsebool' command, or in
601 /etc/selinux/targeted/booleans.
603 You can disable SELinux protection for named entirely by setting the
604 'named_disable_trans=1' SELinux tunable boolean parameter.
606 The SELinux named policy defines these SELinux contexts for named:
608 named_zone_t : for zone database files - $ROOTDIR/var/named/*
609 named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
610 named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
613 If you want to retain use of the SELinux policy for named, and put named files
614 in different locations, you can do so by changing the context of the custom
617 To create a custom configuration file location, eg. '/root/named.conf', to use
618 with the 'named -c' option, do:
620 # chcon system_u:object_r:named_conf_t /root/named.conf
623 To create a custom modifiable named data location, eg. '/var/log/named' for a
626 # chcon system_u:object_r:named_cache_t /var/log/named
629 To create a custom zone file location, eg. /root/zones/, do:
631 # chcon system_u:object_r:named_zone_t /root/zones/{.,*}
634 See these man-pages for more information : selinux(8), named_selinux(8), chcon
637 Q: I want to forward all DNS queries from my caching nameserver to another server.
638 But there are some domains which have to be served locally, via rbldnsd.
640 How do I achieve this ?
644 forwarders { <ip.of.primary.nameserver>; };
647 zone "sbl-xbl.spamhaus.org" {
648 type forward; forward only;
649 forwarders { <ip.of.rbldns.server> port 530; };
652 zone "list.dsbl.org" {
653 type forward; forward only;
654 forwarders { <ip.of.rbldns.server> port 530; };
658 Q: Will named be affected by the 2007 changes to daylight savings rules in the US.
660 A: No, so long as the machines internal clock (as reported by "date -u") remains
661 at UTC. The only visible change if you fail to upgrade your OS, if you are in a
662 affected area, will be that log messages will be a hour out during the period
663 where the old rules do not match the new rules.
665 For most OS's this change just means that you need to update the conversion
666 rules from UTC to local time. Normally this involves updating a file in /etc
667 (which sets the default timezone for the machine) and possibly a directory
668 which has all the conversion rules for the world (e.g. /usr/share/zoneinfo).
669 When updating the OS do not forget to update any chroot areas as well. See your
670 OS's documetation for more details.
672 The local timezone conversion rules can also be done on a individual basis by
673 setting the TZ envirionment variable appropriately. See your OS's documentation