1 Frequently Asked Questions about BIND 9
3 -------------------------------------------------------------------------------
5 Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
7 A: Linux threads do not fully implement the Posix threads (pthreads) standard.
8 In particular, setuid() operates only on the current thread, not the full
9 process. Because of this limitation, BIND 9 cannot use setuid() on Linux as
10 it can on all other supported platforms. setuid() cannot be called before
11 creating threads, since the server does not start listening on reserved
12 ports until after threads have started.
14 In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
15 capabilities across a setuid() call is present. This allows BIND 9 to call
16 setuid() early, while retaining the ability to bind reserved ports. This is
17 a Linux-specific hack.
19 On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
20 of a security risk than a root process that has not dropped privileges.
22 If Linux threads ever work correctly, this restriction will go away.
24 Configuring BIND9 with the --disable-threads option (the default) causes a
25 non-threaded version to be built, which will allow -u to be used.
27 Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
30 A: Your zone file is illegal according to RFC1035. It must either have a line
35 at the beginning, or the first record in it must have a TTL field, like the
36 "84600" in this example:
38 example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
40 Q: Why do I see 5 (or more) copies of named on Linux?
42 A: Linux threads each show up as a process under ps. The approximate number of
43 threads running is n+4, where n is the number of CPUs. Note that the amount
44 of memory used is not cumulative; if each process is using 10M of memory,
45 only a total of 10M is used.
47 Q: Why does BIND 9 log "permission denied" errors accessing its configuration
48 files or zones on my Linux system even though it is running as root?
50 A: On Linux, BIND 9 drops most of its root privileges on startup. This
51 including the privilege to open files owned by other users. Therefore, if
52 the server is running as root, the configuration files and zone files should
53 also be owned by root.
55 Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file
56 bar: ran out of space"?
58 A: This is often caused by TXT records with missing close quotes. Check that
59 all TXT records containing quoted strings have both open and close quotes.
61 Q: How do I produce a usable core file from a multithreaded named on Linux?
63 A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
64 (that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
65 apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
66 kernel. This patch will cause multithreaded programs to dump the correct
69 Q: How do I restrict people from looking up the server version?
71 A: Put a "version" option containing something other than the real version in
72 the "options" section of named.conf. Note doing this will not prevent
73 attacks and may impede people trying to diagnose problems with your server.
74 Also it is possible to "fingerprint" nameservers to determine their version.
76 Q: How do I restrict only remote users from looking up the server version?
78 A: The following view statement will intercept lookups as the internal view
79 that holds the version information will be matched last. The caveats of the
80 previous answer still apply, of course.
83 match-clients { <those to be refused>; };
84 allow-query { none; };
87 file "/dev/null"; // or any empty file
91 Q: What do "no source of entropy found" or "could not open entropy source foo"
94 A: The server requires a source of entropy to perform certain operations,
95 mostly DNSSEC related. These messages indicate that you have no source of
96 entropy. On systems with /dev/random or an equivalent, it is used by
97 default. A source of entropy can also be defined using the random-device
100 Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
102 A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
103 under /usr. Check that the correct named is running.
105 Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers.
106 I'm sure I have the keys set up correctly, but the server is rejecting the
109 A: This may be a clock skew problem. Check that the the clocks on the client
110 and server are properly synchronised (e.g., using ntp).
112 Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
115 A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
116 doesn't work. If you are using one of these, use normal make or gmake
119 Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging
120 error messages like "notify to 10.0.0.1#53 failed: unexpected end of input".
123 A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in
124 BIND 8.2.4. It can be safely ignored - the notify has been acted on by the
125 slave despite the error message.
127 Q: I keep getting log messages like the following. Why?
129 Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
130 failed: 'RRset exists (value dependent)' prerequisite not satisfied
133 A: DNS updates allow the update request to test to see if certain conditions
134 are met prior to proceeding with the update. The message above is saying
135 that conditions were not met and the update is not proceeding. See doc/rfc/
136 rfc2136.txt for more details on prerequisites.
138 Q: I keep getting log messages like the following. Why?
140 Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
142 A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
143 protocol. Windows 2000 machines have a habit of sending dynamic update
144 requests to DNS servers without being specifically configured to do so. If
145 the update requests are coming from a Windows 2000 machine, see http://
146 support.microsoft.com/support/kb/articles/q246/8/04.asp for information
147 about how to turn them off.
149 Q: I see a log message like the following. Why?
151 couldn't open pid file '/var/run/named.pid': Permission denied
153 A: You are most likely running named as a non-root user, and that user does not
154 have permission to write in /var/run. The common ways of fixing this are to
155 create a /var/run/named directory owned by the named user and set pid-file
156 to "/var/run/named/named.pid", or set pid-file to "named.pid", which will
157 put the file in the directory specified by the directory option (which, in
158 this case, must be writable by the named user).
160 Q: When I do a "dig . ns", many of the A records for the root servers are
163 A: This is normal and harmless. It is a somewhat confusing side effect of the
164 way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to
165 avoid promoting glue into answers.
167 When BIND 9 first starts up and primes its cache, it receives the root
168 server addresses as additional data in an authoritative response from a root
169 server, and these records are eligible for inclusion as additional data in
170 responses. Subsequently it receives a subset of the root server addresses as
171 additional data in a non-authoritative (referral) response from a root
172 server. This causes the addresses to now be considered non-authoritative
173 (glue) data, which is not eligible for inclusion in responses.
175 The server does have a complete set of root server addresses cached at all
176 times, it just may not include all of them as additional data, depending on
177 whether they were last received as answers or as glue. You can always look
178 up the addresses with explicit queries like "dig a.root-servers.net A".
180 Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?
182 A: This may be caused by a bug in the Windows 2000 DNS server where DNS
183 messages larger than 16K are not handled properly. This can be worked around
184 by setting the option "transfer-format one-answer;". Also check whether your
185 zone contains domain names with embedded spaces or other special characters,
186 like "John\032Doe\213s\032Computer", since such names have been known to
187 cause Windows 2000 slaves to incorrectly reject the zone.
189 Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
191 A: A zone can be updated either by editing zone files and reloading the server
192 or by dynamic update, but not both. If you have enabled dynamic update for a
193 zone using the "allow-update" option, you are not supposed to edit the zone
194 file by hand, and the server will not attempt to reload it.
196 Q: I can query the nameserver from the nameserver but not from other machines.
199 A: This is usually the result of the firewall configuration stopping the
200 queries and / or the replies.
202 Q: How can I make a server a slave for both an internal and an external view at
203 the same time? When I tried, both views on the slave were transferred from
204 the same view on the master.
206 A: You will need to give the master and slave multiple IP addresses and use
207 those to make sure you reach the correct view on the other machine.
209 Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
211 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
212 notify-source 10.0.1.1;
213 transfer-source 10.0.1.1;
214 query-source address 10.0.1.1;
216 match-clients { any; };
217 recursion no; // don't offer recursion to the world
218 notify-source 10.0.1.2;
219 transfer-source 10.0.1.2;
220 query-source address 10.0.1.2;
222 Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
224 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
225 notify-source 10.0.1.3;
226 transfer-source 10.0.1.3;
227 query-source address 10.0.1.3;
229 match-clients { any; };
230 recursion no; // don't offer recursion to the world
231 notify-source 10.0.1.4;
232 transfer-source 10.0.1.4;
233 query-source address 10.0.1.4;
235 You put the external address on the alias so that all the other dns clients
236 on these boxes see the internal view by default.
238 A: BIND 9.3 and later: Use TSIG to select the appropriate view.
246 match-clients { !key external; 10.0.1/24; };
250 match-clients { key external; any; };
251 server 10.0.0.2 { keys external; };
262 match-clients { !key external; 10.0.1/24; };
266 match-clients { key external; any; };
267 server 10.0.0.1 { keys external; };
272 Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
274 A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
275 certain interrupts as a source of random events. You can make this permanent
276 by setting rand_irqs in /etc/rc.conf.
281 See also http://people.freebsd.org/~dougb/randomness.html
283 Q: Why is named listening on UDP port other than 53?
285 A: Named uses a system selected port to make queries of other nameservers. This
286 behaviour can be overridden by using query-source to lock down the port and/
287 or address. See also notify-source and transfer-source.
289 Q: I get error messages like "multiple RRs of singleton type" and "CNAME and
290 other data" when transferring a zone. What does this mean?
292 A: These indicate a malformed master zone. You can identify the exact records
293 involved by transferring the zone using dig then running named-checkzone on
296 dig axfr example.com @master-server > tmp
297 named-checkzone example.com tmp
299 A CNAME record cannot exist with the same name as another record except for
300 the DNSSEC records which prove its existance (NSEC).
302 RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
303 should be present; this ensures that the data for a canonical name and its
304 aliases cannot be different. This rule also insures that a cached CNAME can
305 be used without checking with an authoritative server for other RR types."
307 Q: I get error messages like "named.conf:99: unexpected end of input" where 99
308 is the last line of named.conf.
310 A: Some text editors (notepad and wordpad) fail to put a line title indication
311 (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding"
312 a blank line to the end of the file. Named expects to see EOF immediately
313 after EOL and treats text files where this is not met as truncated.
315 Q: I get warning messages like "zone example.com/IN: refresh: failure trying
316 master 1.2.3.4#53: timed out".
318 A: Check that you can make UDP queries from the slave to the master
320 dig +norec example.com soa @1.2.3.4
322 You could be generating queries faster than the slave can cope with. Lower
323 the serial query rate.
325 serial-query-rate 5; // default 20
327 Q: How do I share a dynamic zone between multiple views?
329 A: You choose one view to be master and the second a slave and transfer the
344 match-clients { !external; 10.0.1/24; };
346 /* Deliver notify messages to external view. */
351 file "internal/example.db";
352 allow-update { key mykey; };
353 notify-also { 10.0.1.1; };
358 match-clients { external; any; };
361 file "external/example.db";
362 masters { 10.0.1.1; };
363 transfer-source { 10.0.1.1; };
364 // allow-update-forwarding { any; };
365 // allow-notify { ... };
369 Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
370 file primaries/wireless.ietf56.ietf.org: no owner".
372 A: This error is produced when a line in the master file contains leading white
373 space (tab/space) but the is no current record owner name to inherit the
374 name from. Usually this is the result of putting white space before a
375 comment. Forgeting the "@" for the SOA record or indenting the master file.
377 Q: Why are my logs in GMT (UTC).
379 A: You are running chrooted (-t) and have not supplied local timzone
380 information in the chroot area.
382 FreeBSD: /etc/localtime
383 Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
384 OSF: /etc/zoneinfo/localtime
386 See also tzset(3) and zic(8).
388 Q: I get the error message "named: capset failed: Operation not permitted" when
391 A: The capability module, part of "Linux Security Modules/LSM", has not been
392 loaded into the kernel. See insmod(8).
394 Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
396 A: This is usually a configuration error.
398 First ensure that named is running and no errors are being reported at
399 startup (/var/log/messages or equivalent). Running "named -g <usual
400 arguments>" from a title can help at this point.
402 Secondly ensure that named is configured to use rndc either by "rndc-confgen
403 -a", rndc-confgen or manually. The Administrators Reference manual has
404 details on how to do this.
406 Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
407 rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
408 the default server listed in /etc/rndc.conf matches the addresses used in
409 named.conf. "localhost" has two address (127.0.0.1 and ::1).
411 If you use "rndc-confgen -a" and named is running with -t or -u ensure that
412 /etc/rndc.conf has the correct ownership and that a copy is in the chroot
413 area. You can do this by re-running "rndc-confgen -a" with appropriate -t
416 Q: I don't get RRSIG's returned when I use "dig +dnssec".
418 A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
420 Q: I get "Error 1067" when starting named under Windows.
422 A: This is the service manager saying that named exited. You need to examine
423 the Application log in the EventViewer to find out why.
425 Common causes are that you failed to create "named.conf" (usually "C:\
426 windows\dns\etc\named.conf") or failed to specify the directory in
430 Directory "C:\windows\dns\etc";
433 Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
434 receiving responses: permission denied" error messages.
436 A: These indicate a filesystem permission error preventing named creating /
437 renaming the temporary file. These will usually also have other associated
440 "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
442 Named needs write permission on the directory containing the file. Named
443 writes the new cache file to a temporary file then renames it to the name
444 specified in named.conf to ensure that the contents are always complete.
445 This is to prevent named loading a partial zone in the event of power
446 failure or similar interrupting the write of the master file.
448 Note file names are relative to the directory specified in options and any
449 chroot directory ([<chroot dir>/][<options dir>]).
451 If named is invoked as "named -t /chroot/DNS" with the following named.conf
452 then "/chroot/DNS/var/named/sl" needs to be writable by the user named is
456 directory "/var/named";
461 file "sl/example.net";
462 masters { 192.168.4.12; };
465 Q: How do I intergrate BIND 9 and Solaris SMF
467 A: Sun has a blog entry describing how to do this.
469 http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris
471 Q: Can a NS record refer to a CNAME.
473 A: No. The rules for glue (copies of the *address* records in the parent zones)
474 and additional section processing do not allow it to work.
476 You would have to add both the CNAME and address records (A/AAAA) as glue to
477 the parent zone and have CNAMEs be followed when doing additional section
478 processing to make it work. No namesever implementation supports either of
481 Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
483 A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
484 using then you have failed to follow RFC 1918 usage rules and are leaking
485 queries to the Internet. You should establish your own zones for these
486 addresses to prevent you quering the Internet's name servers for these
487 addresses. Please see http://as112.net/ for details of the problems you are
488 causing and the counter measures that have had to be deployed.
490 If you are not using these private addresses then a client has queried for
491 them. You can just ignore the messages, get the offending client to stop
492 sending you these messages as they are most probably leaking them or setup
493 your own zones empty zones to serve answers to these queries.
495 zone "10.IN-ADDR.ARPA" {
500 zone "16.172.IN-ADDR.ARPA" {
507 zone "31.172.IN-ADDR.ARPA" {
512 zone "168.192.IN-ADDR.ARPA" {
518 @ 10800 IN SOA <name-of-server>. <contact-email>. (
519 1 3600 1200 604800 10800 )
520 @ 10800 IN NS <name-of-server>.
524 Future versions of named are likely to do this automatically.