1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []>
4 - Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
5 - Copyright (C) 2000-2003 Internet Software Consortium.
7 - Permission to use, copy, modify, and/or distribute this software for any
8 - purpose with or without fee is hereby granted, provided that the above
9 - copyright notice and this permission notice appear in all copies.
11 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 - PERFORMANCE OF THIS SOFTWARE.
20 <!-- $Id: FAQ.xml,v 1.54 2010/01/19 23:48:55 tbox Exp $ -->
23 <title>Frequently Asked Questions about BIND 9</title>
33 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
40 <holder>Internet Software Consortium.</holder>
43 <qandaset defaultlabel='qanda'>
45 <qandadiv><title>Compilation and Installation Questions</title>
50 I'm trying to compile BIND 9, and "make" is failing due to
51 files not being found. Why?
56 Using a parallel or distributed "make" to build BIND 9 is
57 not supported, and doesn't work. If you are using one of
58 these, use normal make or gmake instead.
66 Isn't "make install" supposed to generate a default named.conf?
74 Long Answer: There really isn't a default configuration which fits
75 any site perfectly. There are lots of decisions that need to
76 be made and there is no consensus on what the defaults should be.
77 For example FreeBSD uses /etc/namedb as the location where the
78 configuration files for named are stored. Others use /var/named.
81 What addresses to listen on? For a laptop on the move a lot
82 you may only want to listen on the loop back interfaces.
85 Who do you offer recursive service to? Is there are firewall
86 to consider? If so is it stateless or stateful. Are you
87 directly on the Internet? Are you on a private network? Are
88 you on a NAT'd network? The answers
89 to all these questions change how you configure even a
95 </qandadiv> <!-- Compilation and Installation Questions -->
97 <qandadiv><title>Configuration and Setup Questions</title>
100 <!-- configuration, log -->
103 Why does named log the warning message <quote>no TTL specified -
104 using SOA MINTTL instead</quote>?
109 Your zone file is illegal according to RFC1035. It must either
114 $TTL 86400</programlisting>
117 at the beginning, or the first record in it must have a TTL field,
118 like the "84600" in this example:
122 example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )</programlisting>
128 <!-- configuration -->
131 Why do I get errors like <quote>dns_zone_load: zone foo/IN: loading
132 master file bar: ran out of space</quote>?
137 This is often caused by TXT records with missing close
138 quotes. Check that all TXT records containing quoted strings
139 have both open and close quotes.
148 How do I restrict people from looking up the server version?
153 Put a "version" option containing something other than the
154 real version in the "options" section of named.conf. Note
155 doing this will not prevent attacks and may impede people
156 trying to diagnose problems with your server. Also it is
157 possible to "fingerprint" nameservers to determine their
167 How do I restrict only remote users from looking up the
173 The following view statement will intercept lookups as the
174 internal view that holds the version information will be
175 matched last. The caveats of the previous answer still
181 match-clients { <those to be refused>; };
182 allow-query { none; };
185 file "/dev/null"; // or any empty file
193 <!-- configuration -->
196 What do <quote>no source of entropy found</quote> or <quote>could not
197 open entropy source foo</quote> mean?
202 The server requires a source of entropy to perform certain
203 operations, mostly DNSSEC related. These messages indicate
204 that you have no source of entropy. On systems with
205 /dev/random or an equivalent, it is used by default. A
206 source of entropy can also be defined using the random-device
207 option in named.conf.
213 <!-- configuration -->
216 I'm trying to use TSIG to authenticate dynamic updates or
217 zone transfers. I'm sure I have the keys set up correctly,
218 but the server is rejecting the TSIG. Why?
223 This may be a clock skew problem. Check that the the clocks
224 on the client and server are properly synchronised (e.g.,
233 I see a log message like the following. Why?
236 couldn't open pid file '/var/run/named.pid': Permission denied
241 You are most likely running named as a non-root user, and
242 that user does not have permission to write in /var/run.
243 The common ways of fixing this are to create a /var/run/named
244 directory owned by the named user and set pid-file to
245 "/var/run/named/named.pid", or set pid-file to "named.pid",
246 which will put the file in the directory specified by the
247 directory option (which, in this case, must be writable by
256 I can query the nameserver from the nameserver but not from other
262 This is usually the result of the firewall configuration stopping
263 the queries and / or the replies.
271 How can I make a server a slave for both an internal and
272 an external view at the same time? When I tried, both views
273 on the slave were transferred from the same view on the master.
278 You will need to give the master and slave multiple IP
279 addresses and use those to make sure you reach the correct
280 view on the other machine.
284 Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
286 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
287 notify-source 10.0.1.1;
288 transfer-source 10.0.1.1;
289 query-source address 10.0.1.1;
291 match-clients { any; };
292 recursion no; // don't offer recursion to the world
293 notify-source 10.0.1.2;
294 transfer-source 10.0.1.2;
295 query-source address 10.0.1.2;
297 Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
299 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
300 notify-source 10.0.1.3;
301 transfer-source 10.0.1.3;
302 query-source address 10.0.1.3;
304 match-clients { any; };
305 recursion no; // don't offer recursion to the world
306 notify-source 10.0.1.4;
307 transfer-source 10.0.1.4;
308 query-source address 10.0.1.4;</programlisting>
311 You put the external address on the alias so that all the other
312 dns clients on these boxes see the internal view by default.
317 BIND 9.3 and later: Use TSIG to select the appropriate view.
323 algorithm hmac-sha256;
324 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
327 match-clients { !key external; // reject message ment for the
329 10.0.1/24; }; // accept from these addresses.
333 match-clients { key external; any; };
334 server 10.0.1.2 { keys external; }; // tag messages from the
335 // external view to the
336 // other servers for the
344 algorithm hmac-sha256;
345 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
348 match-clients { !key external; 10.0.1/24; };
352 match-clients { key external; any; };
353 server 10.0.1.1 { keys external; };
364 I get error messages like <quote>multiple RRs of singleton type</quote>
365 and <quote>CNAME and other data</quote> when transferring a zone. What
371 These indicate a malformed master zone. You can identify
372 the exact records involved by transferring the zone using
373 dig then running named-checkzone on it.
377 dig axfr example.com @master-server > tmp
378 named-checkzone example.com tmp</programlisting>
381 A CNAME record cannot exist with the same name as another record
382 except for the DNSSEC records which prove its existence (NSEC).
385 RFC 1034, Section 3.6.2: <quote>If a CNAME RR is present at a node,
386 no other data should be present; this ensures that the data for a
387 canonical name and its aliases cannot be different. This rule also
388 insures that a cached CNAME can be used without checking with an
389 authoritative server for other RR types.</quote>
397 I get error messages like <quote>named.conf:99: unexpected end
398 of input</quote> where 99 is the last line of named.conf.
403 There are unbalanced quotes in named.conf.
408 Some text editors (notepad and wordpad) fail to put a line
409 title indication (e.g. CR/LF) on the last line of a
410 text file. This can be fixed by "adding" a blank line to
411 the end of the file. Named expects to see EOF immediately
412 after EOL and treats text files where this is not met as
421 How do I share a dynamic zone between multiple views?
426 You choose one view to be master and the second a slave and
427 transfer the zone between views.
433 algorithm hmac-sha256;
434 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
438 algorithm hmac-sha256;
439 secret "yyyyyyyyyyyyyyyyyyyyyyyy";
443 match-clients { !key external; 10.0.1/24; };
445 /* Deliver notify messages to external view. */
450 file "internal/example.db";
451 allow-update { key mykey; };
452 also-notify { 10.0.1.1; };
457 match-clients { key external; any; };
460 file "external/example.db";
461 masters { 10.0.1.1; };
462 transfer-source 10.0.1.1;
463 // allow-update-forwarding { any; };
464 // allow-notify { ... };
474 I get a error message like <quote>zone wireless.ietf56.ietf.org/IN:
475 loading master file primaries/wireless.ietf56.ietf.org: no
481 This error is produced when a line in the master file
482 contains leading white space (tab/space) but the is no
483 current record owner name to inherit the name from. Usually
484 this is the result of putting white space before a comment,
485 forgetting the "@" for the SOA record, or indenting the master
494 Why are my logs in GMT (UTC).
499 You are running chrooted (-t) and have not supplied local timezone
500 information in the chroot area.
503 <member>FreeBSD: /etc/localtime</member>
504 <member>Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo</member>
505 <member>OSF: /etc/zoneinfo/localtime</member>
508 See also tzset(3) and zic(8).
516 I get <quote>rndc: connect failed: connection refused</quote> when
522 This is usually a configuration error.
525 First ensure that named is running and no errors are being
526 reported at startup (/var/log/messages or equivalent).
527 Running "named -g <usual arguments>" from a title
528 can help at this point.
531 Secondly ensure that named is configured to use rndc either
532 by "rndc-confgen -a", rndc-confgen or manually. The
533 Administrators Reference manual has details on how to do
537 Old versions of rndc-confgen used localhost rather than
538 127.0.0.1 in /etc/rndc.conf for the default server. Update
539 /etc/rndc.conf if necessary so that the default server
540 listed in /etc/rndc.conf matches the addresses used in
541 named.conf. "localhost" has two address (127.0.0.1 and
545 If you use "rndc-confgen -a" and named is running with -t or -u
546 ensure that /etc/rndc.conf has the correct ownership and that
547 a copy is in the chroot area. You can do this by re-running
548 "rndc-confgen -a" with appropriate -t and -u arguments.
556 I get <quote>transfer of 'example.net/IN' from 192.168.4.12#53:
557 failed while receiving responses: permission denied</quote> error
563 These indicate a filesystem permission error preventing
564 named creating / renaming the temporary file. These will
565 usually also have other associated error messages like
569 "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"</programlisting>
572 Named needs write permission on the directory containing
573 the file. Named writes the new cache file to a temporary
574 file then renames it to the name specified in named.conf
575 to ensure that the contents are always complete. This is
576 to prevent named loading a partial zone in the event of
577 power failure or similar interrupting the write of the
581 Note file names are relative to the directory specified in
582 options and any chroot directory ([<chroot
583 dir>/][<options dir>]).
587 If named is invoked as "named -t /chroot/DNS" with
588 the following named.conf then "/chroot/DNS/var/named/sl"
589 needs to be writable by the user named is running as.
593 directory "/var/named";
598 file "sl/example.net";
599 masters { 192.168.4.12; };
608 I want to forward all DNS queries from my caching nameserver to
609 another server. But there are some domains which have to be
610 served locally, via rbldnsd.
613 How do I achieve this ?
620 forwarders { <ip.of.primary.nameserver>; };
623 zone "sbl-xbl.spamhaus.org" {
624 type forward; forward only;
625 forwarders { <ip.of.rbldns.server> port 530; };
628 zone "list.dsbl.org" {
629 type forward; forward only;
630 forwarders { <ip.of.rbldns.server> port 530; };
639 Can you help me understand how BIND 9 uses memory to store
643 Some times it seems to take several times the amount of
644 memory it needs to store the zone.
649 When reloading a zone named my have multiple copies of
650 the zone in memory at one time. The zone it is serving
651 and the one it is loading. If reloads are ultra fast it
655 e.g. Ones that are transferring out, the one that it is
656 serving and the one that is loading.
659 BIND 8 destroyed the zone before loading and also killed
660 off outgoing transfers of the zone.
663 The new strategy allows slaves to get copies of the new
664 zone regardless of how often the master is loaded compared
665 to the transfer time. The slave might skip some intermediate
666 versions but the transfers will complete and it will keep
667 reasonably in sync with the master.
670 The new strategy also allows the master to recover from
671 syntax and other errors in the master file as it still
672 has an in-core copy of the old contents.
680 I want to use IPv6 locally but I don't have a external IPv6
681 connection. External lookups are slow.
686 You can use server clauses to stop named making external lookups
690 server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
691 server ::/0 { bogus yes; };
696 </qandadiv> <!-- Configuration and Setup Questions -->
698 <qandadiv><title>Operations Questions</title>
703 How to change the nameservers for a zone?
708 Step 1: Ensure all nameservers, new and old, are serving the
712 Step 2: Work out the maximum TTL of the NS RRset in the parent and child
713 zones. This is the time it will take caches to be clear of a
714 particular version of the NS RRset.
715 If you are just removing nameservers you can skip to Step 6.
718 Step 3: Add new nameservers to the NS RRset for the zone and
719 wait until all the servers for the zone are answering with this
723 Step 4: Inform the parent zone of the new NS RRset then wait for all the
724 parent servers to be answering with the new NS RRset.
727 Step 5: Wait for cache to be clear of the old NS RRset.
728 See Step 2 for how long.
729 If you are just adding nameservers you are done.
732 Step 6: Remove any old nameservers from the zones NS RRset and
733 wait for all the servers for the zone to be serving the new NS RRset.
736 Step 7: Inform the parent zone of the new NS RRset then wait for all the
737 parent servers to be answering with the new NS RRset.
740 Step 8: Wait for cache to be clear of the old NS RRset.
741 See Step 2 for how long.
744 Step 9: Turn off the old nameservers or remove the zone entry from
745 the configuration of the old nameservers.
748 Step 10: Increment the serial number and wait for the change to
749 be visible in all nameservers for the zone. This ensures that
750 zone transfers are still working after the old servers are
754 Note: the above procedure is designed to be transparent
755 to dns clients. Decommissioning the old servers too early
756 will result in some clients not being able to look up
760 Note: while it is possible to run the addition and removal
761 stages together it is not recommended.
766 </qandadiv> <!-- Operations Questions -->
768 <qandadiv><title>General Questions</title>
773 I keep getting log messages like the following. Why?
776 Dec 4 23:47:59 client 10.0.0.1#1355: updating zone
777 'example.com/IN': update failed: 'RRset exists (value
778 dependent)' prerequisite not satisfied (NXRRSET)
783 DNS updates allow the update request to test to see if
784 certain conditions are met prior to proceeding with the
785 update. The message above is saying that conditions were
786 not met and the update is not proceeding. See doc/rfc/rfc2136.txt
787 for more details on prerequisites.
795 I keep getting log messages like the following. Why?
798 Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
803 Someone is trying to update your DNS data using the RFC2136
804 Dynamic Update protocol. Windows 2000 machines have a habit
805 of sending dynamic update requests to DNS servers without
806 being specifically configured to do so. If the update
807 requests are coming from a Windows 2000 machine, see
809 url="http://support.microsoft.com/support/kb/articles/q246/8/04.asp">
810 <http://support.microsoft.com/support/kb/articles/q246/8/04.asp></ulink>
811 for information about how to turn them off.
819 When I do a "dig . ns", many of the A records for the root
820 servers are missing. Why?
825 This is normal and harmless. It is a somewhat confusing
826 side effect of the way BIND 9 does RFC2181 trust ranking
827 and of the efforts BIND 9 makes to avoid promoting glue
831 When BIND 9 first starts up and primes its cache, it receives
832 the root server addresses as additional data in an authoritative
833 response from a root server, and these records are eligible
834 for inclusion as additional data in responses. Subsequently
835 it receives a subset of the root server addresses as
836 additional data in a non-authoritative (referral) response
837 from a root server. This causes the addresses to now be
838 considered non-authoritative (glue) data, which is not
839 eligible for inclusion in responses.
842 The server does have a complete set of root server addresses
843 cached at all times, it just may not include all of them
844 as additional data, depending on whether they were last
845 received as answers or as glue. You can always look up the
846 addresses with explicit queries like "dig a.root-servers.net A".
854 Why don't my zones reload when I do an "rndc reload" or SIGHUP?
859 A zone can be updated either by editing zone files and
860 reloading the server or by dynamic update, but not both.
861 If you have enabled dynamic update for a zone using the
862 "allow-update" option, you are not supposed to edit the
863 zone file by hand, and the server will not attempt to reload
872 Why is named listening on UDP port other than 53?
877 Named uses a system selected port to make queries of other
878 nameservers. This behaviour can be overridden by using
879 query-source to lock down the port and/or address. See
880 also notify-source and transfer-source.
888 I get warning messages like <quote>zone example.com/IN: refresh:
889 failure trying master 1.2.3.4#53: timed out</quote>.
894 Check that you can make UDP queries from the slave to the master
898 dig +norec example.com soa @1.2.3.4</programlisting>
901 You could be generating queries faster than the slave can
902 cope with. Lower the serial query rate.
906 serial-query-rate 5; // default 20</programlisting>
914 I don't get RRSIG's returned when I use "dig +dnssec".
919 You need to ensure DNSSEC is enabled (dnssec-enable yes;).
927 Can a NS record refer to a CNAME.
932 No. The rules for glue (copies of the *address* records
933 in the parent zones) and additional section processing do
934 not allow it to work.
937 You would have to add both the CNAME and address records
938 (A/AAAA) as glue to the parent zone and have CNAMEs be
939 followed when doing additional section processing to make
940 it work. No nameserver implementation supports either of
949 What does <quote>RFC 1918 response from Internet for
950 0.0.0.10.IN-ADDR.ARPA</quote> mean?
955 If the IN-ADDR.ARPA name covered refers to a internal address
956 space you are using then you have failed to follow RFC 1918
957 usage rules and are leaking queries to the Internet. You
958 should establish your own zones for these addresses to prevent
959 you querying the Internet's name servers for these addresses.
960 Please see <ulink url="http://as112.net/"><http://as112.net/></ulink>
961 for details of the problems you are causing and the counter
962 measures that have had to be deployed.
965 If you are not using these private addresses then a client
966 has queried for them. You can just ignore the messages,
967 get the offending client to stop sending you these messages
968 as they are most probably leaking them or setup your own zones
969 empty zones to serve answers to these queries.
973 zone "10.IN-ADDR.ARPA" {
978 zone "16.172.IN-ADDR.ARPA" {
985 zone "31.172.IN-ADDR.ARPA" {
990 zone "168.192.IN-ADDR.ARPA" {
996 @ 10800 IN SOA <name-of-server>. <contact-email>. (
997 1 3600 1200 604800 10800 )
998 @ 10800 IN NS <name-of-server>.</programlisting>
1002 Future versions of named are likely to do this automatically.
1011 Will named be affected by the 2007 changes to daylight savings
1017 No, so long as the machines internal clock (as reported
1018 by "date -u") remains at UTC. The only visible change
1019 if you fail to upgrade your OS, if you are in a affected
1020 area, will be that log messages will be a hour out during
1021 the period where the old rules do not match the new rules.
1024 For most OS's this change just means that you need to
1025 update the conversion rules from UTC to local time.
1026 Normally this involves updating a file in /etc (which
1027 sets the default timezone for the machine) and possibly
1028 a directory which has all the conversion rules for the
1029 world (e.g. /usr/share/zoneinfo). When updating the OS
1030 do not forget to update any chroot areas as well.
1031 See your OS's documentation for more details.
1034 The local timezone conversion rules can also be done on
1035 a individual basis by setting the TZ environment variable
1036 appropriately. See your OS's documentation for more
1045 Is there a bugzilla (or other tool) database that mere
1046 mortals can have (read-only) access to for bind?
1051 No. The BIND 9 bug database is kept closed for a number
1052 of reasons. These include, but are not limited to, that
1053 the database contains proprietory information from people
1054 reporting bugs. The database has in the past and may in
1055 future contain unfixed bugs which are capable of bringing
1056 down most of the Internet's DNS infrastructure.
1059 The release pages for each version contain up to date
1060 lists of bugs that have been fixed post release. That
1061 is as close as we can get to providing a bug database.
1069 Why do queries for NSEC3 records fail to return the NSEC3 record?
1074 NSEC3 records are strictly meta data and can only be
1075 returned in the authority section. This is done so that
1076 signing the zone using NSEC3 records does not bring names
1077 into existence that do not exist in the unsigned version
1083 </qandadiv> <!-- General Questions -->
1085 <qandadiv><title>Operating-System Specific Questions</title>
1087 <qandadiv><title>HPUX</title>
1091 <para>I get the following error trying to configure BIND:
1092 <programlisting>checking if unistd.h or sys/types.h defines fd_set... no
1093 configure: error: need either working unistd.h or sys/select.h</programlisting>
1098 You have attempted to configure BIND with the bundled C compiler.
1099 This compiler does not meet the minimum compiler requirements to
1100 for building BIND. You need to install a ANSI C compiler and / or
1101 teach configure how to find the ANSI C compiler. The later can
1102 be done by adjusting the PATH environment variable and / or
1103 specifying the compiler via CC.
1106 <programlisting>./configure CC=<compiler> ...</programlisting>
1111 </qandadiv> <!-- HPUX -->
1113 <qandadiv><title>Linux</title>
1118 Why do I get the following errors:
1119 <programlisting>general: errno2result.c:109: unexpected error:
1120 general: unable to convert errno to isc_result: 14: Bad address
1121 client: UDP client handler shutting down due to fatal receive error: unexpected error</programlisting>
1126 This is the result of a Linux kernel bug.
1130 <ulink url="http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2"><http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2></ulink>
1138 Why does named lock up when it attempts to connect over IPSEC tunnels?
1143 This is due to a kernel bug where the fact that a socket is marked
1144 non-blocking is ignored. It is reported that setting
1145 xfrm_larval_drop to 1 helps but this may have negative side effects.
1147 <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=427629"><https://bugzilla.redhat.com/show_bug.cgi?id=427629></ulink>
1149 <ulink url="http://lkml.org/lkml/2007/12/4/260"><http://lkml.org/lkml/2007/12/4/260></ulink>.
1152 xfrm_larval_drop can be set to 1 by the following procedure:
1154 echo "1" > proc/sys/net/core/xfrm_larval_drop</programlisting>
1162 Why do I see 5 (or more) copies of named on Linux?
1167 Linux threads each show up as a process under ps. The
1168 approximate number of threads running is n+4, where n is
1169 the number of CPUs. Note that the amount of memory used
1170 is not cumulative; if each process is using 10M of memory,
1171 only a total of 10M is used.
1174 Newer versions of Linux's ps command hide the individual threads
1175 and require -L to display them.
1183 Why does BIND 9 log <quote>permission denied</quote> errors accessing
1184 its configuration files or zones on my Linux system even
1185 though it is running as root?
1190 On Linux, BIND 9 drops most of its root privileges on
1191 startup. This including the privilege to open files owned
1192 by other users. Therefore, if the server is running as
1193 root, the configuration files and zone files should also
1202 I get the error message <quote>named: capset failed: Operation
1203 not permitted</quote> when starting named.
1208 The capability module, part of "Linux Security Modules/LSM",
1209 has not been loaded into the kernel. See insmod(8), modprobe(8).
1212 The relevant modules can be loaded by running:
1215 modprobe capability</programlisting>
1223 I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
1226 Why can't named update slave zone database files?
1229 Why can't named create DDNS journal files or update
1230 the master zones from journals?
1233 Why can't named create custom log files?
1239 Red Hat Security Enhanced Linux (SELinux) policy security
1244 Red Hat have adopted the National Security Agency's
1245 SELinux security policy (see <ulink
1246 url="http://www.nsa.gov/selinux"><http://www.nsa.gov/selinux></ulink>)
1247 and recommendations for BIND security , which are more
1248 secure than running named in a chroot and make use of
1249 the bind-chroot environment unnecessary .
1253 By default, named is not allowed by the SELinux policy
1254 to write, create or delete any files EXCEPT in these
1258 $ROOTDIR/var/named/slaves
1259 $ROOTDIR/var/named/data
1263 where $ROOTDIR may be set in /etc/sysconfig/named if
1264 bind-chroot is installed.
1268 The SELinux policy particularly does NOT allow named to modify
1269 the $ROOTDIR/var/named directory, the default location for master
1270 zone database files.
1274 SELinux policy overrules file access permissions - so
1275 even if all the files under /var/named have ownership
1276 named:named and mode rw-rw-r--, named will still not be
1277 able to write or create files except in the directories
1278 above, with SELinux in Enforcing mode.
1282 So, to allow named to update slave or DDNS zone files,
1283 it is best to locate them in $ROOTDIR/var/named/slaves,
1284 with named.conf zone statements such as:
1287 zone "slave.zone." IN {
1289 file "slaves/slave.zone.db";
1292 zone "ddns.zone." IN {
1294 allow-updates {...};
1295 file "slaves/ddns.zone.db";
1302 To allow named to create its cache dump and statistics
1303 files, for example, you could use named.conf options
1309 dump-file "/var/named/data/cache_dump.db";
1310 statistics-file "/var/named/data/named_stats.txt";
1318 You can also tell SELinux to allow named to update any
1319 zone database files, by setting the SELinux tunable boolean
1320 parameter 'named_write_master_zones=1', using the
1321 system-config-securitylevel GUI, using the 'setsebool'
1322 command, or in /etc/selinux/targeted/booleans.
1326 You can disable SELinux protection for named entirely by
1327 setting the 'named_disable_trans=1' SELinux tunable boolean
1332 The SELinux named policy defines these SELinux contexts for named:
1335 named_zone_t : for zone database files - $ROOTDIR/var/named/*
1336 named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
1337 named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
1343 If you want to retain use of the SELinux policy for named,
1344 and put named files in different locations, you can do
1345 so by changing the context of the custom file locations
1350 To create a custom configuration file location, e.g.
1351 '/root/named.conf', to use with the 'named -c' option,
1355 # chcon system_u:object_r:named_conf_t /root/named.conf
1361 To create a custom modifiable named data location, e.g.
1362 '/var/log/named' for a log file, do:
1365 # chcon system_u:object_r:named_cache_t /var/log/named
1371 To create a custom zone file location, e.g. /root/zones/, do:
1374 # chcon system_u:object_r:named_zone_t /root/zones/{.,*}
1380 See these man-pages for more information : selinux(8),
1381 named_selinux(8), chcon(1), setsebool(8)
1389 I'm running BIND on Ubuntu -
1392 Why can't named update slave zone database files?
1395 Why can't named create DDNS journal files or update
1396 the master zones from journals?
1399 Why can't named create custom log files?
1404 Ubuntu uses AppArmor <ulink url="http://en.wikipedia.org/wiki/AppArmor">
1405 <http://en.wikipedia.org/wiki/AppArmor></ulink> in
1406 addition to normal file system permissions to protect the system.
1409 Adjust the paths to use those specified in /etc/apparmor.d/usr.sbin.named
1410 or adjust /etc/apparmor.d/usr.sbin.named to allow named to write at the
1411 location specified in named.conf.
1419 Listening on individual IPv6 interfaces does not work.
1424 This is usually due to "/proc/net/if_inet6" not being available
1425 in the chroot file system. Mount another instance of "proc"
1426 in the chroot file system.
1429 This can be be made permanent by adding a second instance to
1433 proc /proc proc defaults 0 0
1434 proc /var/named/proc proc defaults 0 0</programlisting>
1440 </qandadiv> <!-- Linux -->
1442 <qandadiv><title>Windows</title>
1447 Zone transfers from my BIND 9 master to my Windows 2000
1453 This may be caused by a bug in the Windows 2000 DNS server
1454 where DNS messages larger than 16K are not handled properly.
1455 This can be worked around by setting the option "transfer-format
1456 one-answer;". Also check whether your zone contains domain
1457 names with embedded spaces or other special characters,
1458 like "John\032Doe\213s\032Computer", since such names have
1459 been known to cause Windows 2000 slaves to incorrectly
1468 I get <quote>Error 1067</quote> when starting named under Windows.
1473 This is the service manager saying that named exited. You
1474 need to examine the Application log in the EventViewer to
1478 Common causes are that you failed to create "named.conf"
1479 (usually "C:\windows\dns\etc\named.conf") or failed to
1480 specify the directory in named.conf.
1485 Directory "C:\windows\dns\etc";
1491 </qandadiv> <!-- Windows -->
1493 <qandadiv><title>FreeBSD</title>
1498 I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
1503 /dev/random is not configured. Use rndcontrol(8) to tell
1504 the kernel to use certain interrupts as a source of random
1505 events. You can make this permanent by setting rand_irqs
1510 rand_irqs="3 14 15"</programlisting>
1514 <ulink url="http://people.freebsd.org/~dougb/randomness.html">
1515 <http://people.freebsd.org/~dougb/randomness.html></ulink>.
1520 </qandadiv> <!-- FreeBSD -->
1522 <qandadiv><title>Solaris</title>
1527 How do I integrate BIND 9 and Solaris SMF
1532 Sun has a blog entry describing how to do this.
1536 url="http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris">
1537 <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>
1545 <qandadiv><title>Apple Mac OS X</title>
1550 How do I run BIND 9 on Apple Mac OS X?
1555 If you run Tiger(Mac OS 10.4) or later then this is all you need to do:
1559 % sudo rndc-confgen > /etc/rndc.conf</programlisting>
1562 Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:
1568 secret "uvceheVuqf17ZwIcTydddw==";
1572 Then start the relevant service:
1576 % sudo service org.isc.named start</programlisting>
1579 This is persistent upon a reboot, so you will have to do it only once.
1585 Alternatively you can just generate /etc/rndc.key by running:
1589 % sudo rndc-confgen -a</programlisting>
1592 Then start the relevant service:
1596 % sudo service org.isc.named start</programlisting>
1599 Named will look for /etc/rndc.key when it starts if it
1600 doesn't have a controls section or the existing controls are
1601 missing keys sub-clauses. This is persistent upon a
1602 reboot, so you will have to do it only once.
1609 </qandadiv> <!-- Operating-System Specific Questions -->