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, 2013 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>
34 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
41 <holder>Internet Software Consortium.</holder>
44 <qandaset defaultlabel='qanda'>
46 <qandadiv><title>Compilation and Installation Questions</title>
51 I'm trying to compile BIND 9, and "make" is failing due to
52 files not being found. Why?
57 Using a parallel or distributed "make" to build BIND 9 is
58 not supported, and doesn't work. If you are using one of
59 these, use normal make or gmake instead.
67 Isn't "make install" supposed to generate a default named.conf?
75 Long Answer: There really isn't a default configuration which fits
76 any site perfectly. There are lots of decisions that need to
77 be made and there is no consensus on what the defaults should be.
78 For example FreeBSD uses /etc/namedb as the location where the
79 configuration files for named are stored. Others use /var/named.
82 What addresses to listen on? For a laptop on the move a lot
83 you may only want to listen on the loop back interfaces.
86 Who do you offer recursive service to? Is there are firewall
87 to consider? If so is it stateless or stateful. Are you
88 directly on the Internet? Are you on a private network? Are
89 you on a NAT'd network? The answers
90 to all these questions change how you configure even a
96 </qandadiv> <!-- Compilation and Installation Questions -->
98 <qandadiv><title>Configuration and Setup Questions</title>
101 <!-- configuration, log -->
104 Why does named log the warning message <quote>no TTL specified -
105 using SOA MINTTL instead</quote>?
110 Your zone file is illegal according to RFC1035. It must either
115 $TTL 86400</programlisting>
118 at the beginning, or the first record in it must have a TTL field,
119 like the "84600" in this example:
123 example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )</programlisting>
129 <!-- configuration -->
132 Why do I get errors like <quote>dns_zone_load: zone foo/IN: loading
133 master file bar: ran out of space</quote>?
138 This is often caused by TXT records with missing close
139 quotes. Check that all TXT records containing quoted strings
140 have both open and close quotes.
149 How do I restrict people from looking up the server version?
154 Put a "version" option containing something other than the
155 real version in the "options" section of named.conf. Note
156 doing this will not prevent attacks and may impede people
157 trying to diagnose problems with your server. Also it is
158 possible to "fingerprint" nameservers to determine their
168 How do I restrict only remote users from looking up the
174 The following view statement will intercept lookups as the
175 internal view that holds the version information will be
176 matched last. The caveats of the previous answer still
182 match-clients { <those to be refused>; };
183 allow-query { none; };
186 file "/dev/null"; // or any empty file
194 <!-- configuration -->
197 What do <quote>no source of entropy found</quote> or <quote>could not
198 open entropy source foo</quote> mean?
203 The server requires a source of entropy to perform certain
204 operations, mostly DNSSEC related. These messages indicate
205 that you have no source of entropy. On systems with
206 /dev/random or an equivalent, it is used by default. A
207 source of entropy can also be defined using the random-device
208 option in named.conf.
214 <!-- configuration -->
217 I'm trying to use TSIG to authenticate dynamic updates or
218 zone transfers. I'm sure I have the keys set up correctly,
219 but the server is rejecting the TSIG. Why?
224 This may be a clock skew problem. Check that the the clocks
225 on the client and server are properly synchronised (e.g.,
234 I see a log message like the following. Why?
237 couldn't open pid file '/var/run/named.pid': Permission denied
242 You are most likely running named as a non-root user, and
243 that user does not have permission to write in /var/run.
244 The common ways of fixing this are to create a /var/run/named
245 directory owned by the named user and set pid-file to
246 "/var/run/named/named.pid", or set pid-file to "named.pid",
247 which will put the file in the directory specified by the
248 directory option (which, in this case, must be writable by
257 I can query the nameserver from the nameserver but not from other
263 This is usually the result of the firewall configuration stopping
264 the queries and / or the replies.
272 How can I make a server a slave for both an internal and
273 an external view at the same time? When I tried, both views
274 on the slave were transferred from the same view on the master.
279 You will need to give the master and slave multiple IP
280 addresses and use those to make sure you reach the correct
281 view on the other machine.
285 Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
287 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
288 notify-source 10.0.1.1;
289 transfer-source 10.0.1.1;
290 query-source address 10.0.1.1;
292 match-clients { any; };
293 recursion no; // don't offer recursion to the world
294 notify-source 10.0.1.2;
295 transfer-source 10.0.1.2;
296 query-source address 10.0.1.2;
298 Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
300 match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
301 notify-source 10.0.1.3;
302 transfer-source 10.0.1.3;
303 query-source address 10.0.1.3;
305 match-clients { any; };
306 recursion no; // don't offer recursion to the world
307 notify-source 10.0.1.4;
308 transfer-source 10.0.1.4;
309 query-source address 10.0.1.4;</programlisting>
312 You put the external address on the alias so that all the other
313 dns clients on these boxes see the internal view by default.
318 BIND 9.3 and later: Use TSIG to select the appropriate view.
324 algorithm hmac-sha256;
325 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
328 match-clients { !key external; // reject message ment for the
330 10.0.1/24; }; // accept from these addresses.
334 match-clients { key external; any; };
335 server 10.0.1.2 { keys external; }; // tag messages from the
336 // external view to the
337 // other servers for the
345 algorithm hmac-sha256;
346 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
349 match-clients { !key external; 10.0.1/24; };
353 match-clients { key external; any; };
354 server 10.0.1.1 { keys external; };
365 I get error messages like <quote>multiple RRs of singleton type</quote>
366 and <quote>CNAME and other data</quote> when transferring a zone. What
372 These indicate a malformed master zone. You can identify
373 the exact records involved by transferring the zone using
374 dig then running named-checkzone on it.
378 dig axfr example.com @master-server > tmp
379 named-checkzone example.com tmp</programlisting>
382 A CNAME record cannot exist with the same name as another record
383 except for the DNSSEC records which prove its existence (NSEC).
386 RFC 1034, Section 3.6.2: <quote>If a CNAME RR is present at a node,
387 no other data should be present; this ensures that the data for a
388 canonical name and its aliases cannot be different. This rule also
389 insures that a cached CNAME can be used without checking with an
390 authoritative server for other RR types.</quote>
398 I get error messages like <quote>named.conf:99: unexpected end
399 of input</quote> where 99 is the last line of named.conf.
404 There are unbalanced quotes in named.conf.
409 Some text editors (notepad and wordpad) fail to put a line
410 title indication (e.g. CR/LF) on the last line of a
411 text file. This can be fixed by "adding" a blank line to
412 the end of the file. Named expects to see EOF immediately
413 after EOL and treats text files where this is not met as
422 How do I share a dynamic zone between multiple views?
427 You choose one view to be master and the second a slave and
428 transfer the zone between views.
434 algorithm hmac-sha256;
435 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
439 algorithm hmac-sha256;
440 secret "yyyyyyyyyyyyyyyyyyyyyyyy";
444 match-clients { !key external; 10.0.1/24; };
446 /* Deliver notify messages to external view. */
451 file "internal/example.db";
452 allow-update { key mykey; };
453 also-notify { 10.0.1.1; };
458 match-clients { key external; any; };
461 file "external/example.db";
462 masters { 10.0.1.1; };
463 transfer-source 10.0.1.1;
464 // allow-update-forwarding { any; };
465 // allow-notify { ... };
475 I get a error message like <quote>zone wireless.ietf56.ietf.org/IN:
476 loading master file primaries/wireless.ietf56.ietf.org: no
482 This error is produced when a line in the master file
483 contains leading white space (tab/space) but the is no
484 current record owner name to inherit the name from. Usually
485 this is the result of putting white space before a comment,
486 forgetting the "@" for the SOA record, or indenting the master
495 Why are my logs in GMT (UTC).
500 You are running chrooted (-t) and have not supplied local timezone
501 information in the chroot area.
504 <member>FreeBSD: /etc/localtime</member>
505 <member>Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo</member>
506 <member>OSF: /etc/zoneinfo/localtime</member>
509 See also tzset(3) and zic(8).
517 I get <quote>rndc: connect failed: connection refused</quote> when
523 This is usually a configuration error.
526 First ensure that named is running and no errors are being
527 reported at startup (/var/log/messages or equivalent).
528 Running "named -g <usual arguments>" from a title
529 can help at this point.
532 Secondly ensure that named is configured to use rndc either
533 by "rndc-confgen -a", rndc-confgen or manually. The
534 Administrators Reference manual has details on how to do
538 Old versions of rndc-confgen used localhost rather than
539 127.0.0.1 in /etc/rndc.conf for the default server. Update
540 /etc/rndc.conf if necessary so that the default server
541 listed in /etc/rndc.conf matches the addresses used in
542 named.conf. "localhost" has two address (127.0.0.1 and
546 If you use "rndc-confgen -a" and named is running with -t or -u
547 ensure that /etc/rndc.conf has the correct ownership and that
548 a copy is in the chroot area. You can do this by re-running
549 "rndc-confgen -a" with appropriate -t and -u arguments.
557 I get <quote>transfer of 'example.net/IN' from 192.168.4.12#53:
558 failed while receiving responses: permission denied</quote> error
564 These indicate a filesystem permission error preventing
565 named creating / renaming the temporary file. These will
566 usually also have other associated error messages like
570 "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"</programlisting>
573 Named needs write permission on the directory containing
574 the file. Named writes the new cache file to a temporary
575 file then renames it to the name specified in named.conf
576 to ensure that the contents are always complete. This is
577 to prevent named loading a partial zone in the event of
578 power failure or similar interrupting the write of the
582 Note file names are relative to the directory specified in
583 options and any chroot directory ([<chroot
584 dir>/][<options dir>]).
588 If named is invoked as "named -t /chroot/DNS" with
589 the following named.conf then "/chroot/DNS/var/named/sl"
590 needs to be writable by the user named is running as.
594 directory "/var/named";
599 file "sl/example.net";
600 masters { 192.168.4.12; };
609 I want to forward all DNS queries from my caching nameserver to
610 another server. But there are some domains which have to be
611 served locally, via rbldnsd.
614 How do I achieve this ?
621 forwarders { <ip.of.primary.nameserver>; };
624 zone "sbl-xbl.spamhaus.org" {
625 type forward; forward only;
626 forwarders { <ip.of.rbldns.server> port 530; };
629 zone "list.dsbl.org" {
630 type forward; forward only;
631 forwarders { <ip.of.rbldns.server> port 530; };
640 Can you help me understand how BIND 9 uses memory to store
644 Some times it seems to take several times the amount of
645 memory it needs to store the zone.
650 When reloading a zone named my have multiple copies of
651 the zone in memory at one time. The zone it is serving
652 and the one it is loading. If reloads are ultra fast it
656 e.g. Ones that are transferring out, the one that it is
657 serving and the one that is loading.
660 BIND 8 destroyed the zone before loading and also killed
661 off outgoing transfers of the zone.
664 The new strategy allows slaves to get copies of the new
665 zone regardless of how often the master is loaded compared
666 to the transfer time. The slave might skip some intermediate
667 versions but the transfers will complete and it will keep
668 reasonably in sync with the master.
671 The new strategy also allows the master to recover from
672 syntax and other errors in the master file as it still
673 has an in-core copy of the old contents.
681 I want to use IPv6 locally but I don't have a external IPv6
682 connection. External lookups are slow.
687 You can use server clauses to stop named making external lookups
691 server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
692 server ::/0 { bogus yes; };
697 </qandadiv> <!-- Configuration and Setup Questions -->
699 <qandadiv><title>Operations Questions</title>
704 How to change the nameservers for a zone?
709 Step 1: Ensure all nameservers, new and old, are serving the
713 Step 2: Work out the maximum TTL of the NS RRset in the parent and child
714 zones. This is the time it will take caches to be clear of a
715 particular version of the NS RRset.
716 If you are just removing nameservers you can skip to Step 6.
719 Step 3: Add new nameservers to the NS RRset for the zone and
720 wait until all the servers for the zone are answering with this
724 Step 4: Inform the parent zone of the new NS RRset then wait for all the
725 parent servers to be answering with the new NS RRset.
728 Step 5: Wait for cache to be clear of the old NS RRset.
729 See Step 2 for how long.
730 If you are just adding nameservers you are done.
733 Step 6: Remove any old nameservers from the zones NS RRset and
734 wait for all the servers for the zone to be serving the new NS RRset.
737 Step 7: Inform the parent zone of the new NS RRset then wait for all the
738 parent servers to be answering with the new NS RRset.
741 Step 8: Wait for cache to be clear of the old NS RRset.
742 See Step 2 for how long.
745 Step 9: Turn off the old nameservers or remove the zone entry from
746 the configuration of the old nameservers.
749 Step 10: Increment the serial number and wait for the change to
750 be visible in all nameservers for the zone. This ensures that
751 zone transfers are still working after the old servers are
755 Note: the above procedure is designed to be transparent
756 to dns clients. Decommissioning the old servers too early
757 will result in some clients not being able to look up
761 Note: while it is possible to run the addition and removal
762 stages together it is not recommended.
767 </qandadiv> <!-- Operations Questions -->
769 <qandadiv><title>General Questions</title>
774 I keep getting log messages like the following. Why?
777 Dec 4 23:47:59 client 10.0.0.1#1355: updating zone
778 'example.com/IN': update failed: 'RRset exists (value
779 dependent)' prerequisite not satisfied (NXRRSET)
784 DNS updates allow the update request to test to see if
785 certain conditions are met prior to proceeding with the
786 update. The message above is saying that conditions were
787 not met and the update is not proceeding. See doc/rfc/rfc2136.txt
788 for more details on prerequisites.
796 I keep getting log messages like the following. Why?
799 Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
804 Someone is trying to update your DNS data using the RFC2136
805 Dynamic Update protocol. Windows 2000 machines have a habit
806 of sending dynamic update requests to DNS servers without
807 being specifically configured to do so. If the update
808 requests are coming from a Windows 2000 machine, see
810 url="http://support.microsoft.com/support/kb/articles/q246/8/04.asp">
811 <http://support.microsoft.com/support/kb/articles/q246/8/04.asp></ulink>
812 for information about how to turn them off.
820 When I do a "dig . ns", many of the A records for the root
821 servers are missing. Why?
826 This is normal and harmless. It is a somewhat confusing
827 side effect of the way BIND 9 does RFC2181 trust ranking
828 and of the efforts BIND 9 makes to avoid promoting glue
832 When BIND 9 first starts up and primes its cache, it receives
833 the root server addresses as additional data in an authoritative
834 response from a root server, and these records are eligible
835 for inclusion as additional data in responses. Subsequently
836 it receives a subset of the root server addresses as
837 additional data in a non-authoritative (referral) response
838 from a root server. This causes the addresses to now be
839 considered non-authoritative (glue) data, which is not
840 eligible for inclusion in responses.
843 The server does have a complete set of root server addresses
844 cached at all times, it just may not include all of them
845 as additional data, depending on whether they were last
846 received as answers or as glue. You can always look up the
847 addresses with explicit queries like "dig a.root-servers.net A".
855 Why don't my zones reload when I do an "rndc reload" or SIGHUP?
860 A zone can be updated either by editing zone files and
861 reloading the server or by dynamic update, but not both.
862 If you have enabled dynamic update for a zone using the
863 "allow-update" option, you are not supposed to edit the
864 zone file by hand, and the server will not attempt to reload
873 Why is named listening on UDP port other than 53?
878 Named uses a system selected port to make queries of other
879 nameservers. This behaviour can be overridden by using
880 query-source to lock down the port and/or address. See
881 also notify-source and transfer-source.
889 I get warning messages like <quote>zone example.com/IN: refresh:
890 failure trying master 1.2.3.4#53: timed out</quote>.
895 Check that you can make UDP queries from the slave to the master
899 dig +norec example.com soa @1.2.3.4</programlisting>
902 You could be generating queries faster than the slave can
903 cope with. Lower the serial query rate.
907 serial-query-rate 5; // default 20</programlisting>
915 I don't get RRSIG's returned when I use "dig +dnssec".
920 You need to ensure DNSSEC is enabled (dnssec-enable yes;).
928 Can a NS record refer to a CNAME.
933 No. The rules for glue (copies of the *address* records
934 in the parent zones) and additional section processing do
935 not allow it to work.
938 You would have to add both the CNAME and address records
939 (A/AAAA) as glue to the parent zone and have CNAMEs be
940 followed when doing additional section processing to make
941 it work. No nameserver implementation supports either of
950 What does <quote>RFC 1918 response from Internet for
951 0.0.0.10.IN-ADDR.ARPA</quote> mean?
956 If the IN-ADDR.ARPA name covered refers to a internal address
957 space you are using then you have failed to follow RFC 1918
958 usage rules and are leaking queries to the Internet. You
959 should establish your own zones for these addresses to prevent
960 you querying the Internet's name servers for these addresses.
961 Please see <ulink url="http://as112.net/"><http://as112.net/></ulink>
962 for details of the problems you are causing and the counter
963 measures that have had to be deployed.
966 If you are not using these private addresses then a client
967 has queried for them. You can just ignore the messages,
968 get the offending client to stop sending you these messages
969 as they are most probably leaking them or setup your own zones
970 empty zones to serve answers to these queries.
974 zone "10.IN-ADDR.ARPA" {
979 zone "16.172.IN-ADDR.ARPA" {
986 zone "31.172.IN-ADDR.ARPA" {
991 zone "168.192.IN-ADDR.ARPA" {
997 @ 10800 IN SOA <name-of-server>. <contact-email>. (
998 1 3600 1200 604800 10800 )
999 @ 10800 IN NS <name-of-server>.</programlisting>
1003 Future versions of named are likely to do this automatically.
1012 Will named be affected by the 2007 changes to daylight savings
1018 No, so long as the machines internal clock (as reported
1019 by "date -u") remains at UTC. The only visible change
1020 if you fail to upgrade your OS, if you are in a affected
1021 area, will be that log messages will be a hour out during
1022 the period where the old rules do not match the new rules.
1025 For most OS's this change just means that you need to
1026 update the conversion rules from UTC to local time.
1027 Normally this involves updating a file in /etc (which
1028 sets the default timezone for the machine) and possibly
1029 a directory which has all the conversion rules for the
1030 world (e.g. /usr/share/zoneinfo). When updating the OS
1031 do not forget to update any chroot areas as well.
1032 See your OS's documentation for more details.
1035 The local timezone conversion rules can also be done on
1036 a individual basis by setting the TZ environment variable
1037 appropriately. See your OS's documentation for more
1046 Is there a bugzilla (or other tool) database that mere
1047 mortals can have (read-only) access to for bind?
1052 No. The BIND 9 bug database is kept closed for a number
1053 of reasons. These include, but are not limited to, that
1054 the database contains proprietory information from people
1055 reporting bugs. The database has in the past and may in
1056 future contain unfixed bugs which are capable of bringing
1057 down most of the Internet's DNS infrastructure.
1060 The release pages for each version contain up to date
1061 lists of bugs that have been fixed post release. That
1062 is as close as we can get to providing a bug database.
1070 Why do queries for NSEC3 records fail to return the NSEC3 record?
1075 NSEC3 records are strictly meta data and can only be
1076 returned in the authority section. This is done so that
1077 signing the zone using NSEC3 records does not bring names
1078 into existence that do not exist in the unsigned version
1084 </qandadiv> <!-- General Questions -->
1086 <qandadiv><title>Operating-System Specific Questions</title>
1088 <qandadiv><title>HPUX</title>
1092 <para>I get the following error trying to configure BIND:
1093 <programlisting>checking if unistd.h or sys/types.h defines fd_set... no
1094 configure: error: need either working unistd.h or sys/select.h</programlisting>
1099 You have attempted to configure BIND with the bundled C compiler.
1100 This compiler does not meet the minimum compiler requirements to
1101 for building BIND. You need to install a ANSI C compiler and / or
1102 teach configure how to find the ANSI C compiler. The later can
1103 be done by adjusting the PATH environment variable and / or
1104 specifying the compiler via CC.
1107 <programlisting>./configure CC=<compiler> ...</programlisting>
1112 </qandadiv> <!-- HPUX -->
1114 <qandadiv><title>Linux</title>
1119 Why do I get the following errors:
1120 <programlisting>general: errno2result.c:109: unexpected error:
1121 general: unable to convert errno to isc_result: 14: Bad address
1122 client: UDP client handler shutting down due to fatal receive error: unexpected error</programlisting>
1127 This is the result of a Linux kernel bug.
1131 <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>
1139 Why does named lock up when it attempts to connect over IPSEC tunnels?
1144 This is due to a kernel bug where the fact that a socket is marked
1145 non-blocking is ignored. It is reported that setting
1146 xfrm_larval_drop to 1 helps but this may have negative side effects.
1148 <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=427629"><https://bugzilla.redhat.com/show_bug.cgi?id=427629></ulink>
1150 <ulink url="http://lkml.org/lkml/2007/12/4/260"><http://lkml.org/lkml/2007/12/4/260></ulink>.
1153 xfrm_larval_drop can be set to 1 by the following procedure:
1155 echo "1" > proc/sys/net/core/xfrm_larval_drop</programlisting>
1163 Why do I see 5 (or more) copies of named on Linux?
1168 Linux threads each show up as a process under ps. The
1169 approximate number of threads running is n+4, where n is
1170 the number of CPUs. Note that the amount of memory used
1171 is not cumulative; if each process is using 10M of memory,
1172 only a total of 10M is used.
1175 Newer versions of Linux's ps command hide the individual threads
1176 and require -L to display them.
1184 Why does BIND 9 log <quote>permission denied</quote> errors accessing
1185 its configuration files or zones on my Linux system even
1186 though it is running as root?
1191 On Linux, BIND 9 drops most of its root privileges on
1192 startup. This including the privilege to open files owned
1193 by other users. Therefore, if the server is running as
1194 root, the configuration files and zone files should also
1203 I get the error message <quote>named: capset failed: Operation
1204 not permitted</quote> when starting named.
1209 The capability module, part of "Linux Security Modules/LSM",
1210 has not been loaded into the kernel. See insmod(8), modprobe(8).
1213 The relevant modules can be loaded by running:
1216 modprobe capability</programlisting>
1224 I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
1227 Why can't named update slave zone database files?
1230 Why can't named create DDNS journal files or update
1231 the master zones from journals?
1234 Why can't named create custom log files?
1240 Red Hat Security Enhanced Linux (SELinux) policy security
1245 Red Hat have adopted the National Security Agency's
1246 SELinux security policy (see <ulink
1247 url="http://www.nsa.gov/selinux"><http://www.nsa.gov/selinux></ulink>)
1248 and recommendations for BIND security , which are more
1249 secure than running named in a chroot and make use of
1250 the bind-chroot environment unnecessary .
1254 By default, named is not allowed by the SELinux policy
1255 to write, create or delete any files EXCEPT in these
1259 $ROOTDIR/var/named/slaves
1260 $ROOTDIR/var/named/data
1264 where $ROOTDIR may be set in /etc/sysconfig/named if
1265 bind-chroot is installed.
1269 The SELinux policy particularly does NOT allow named to modify
1270 the $ROOTDIR/var/named directory, the default location for master
1271 zone database files.
1275 SELinux policy overrules file access permissions - so
1276 even if all the files under /var/named have ownership
1277 named:named and mode rw-rw-r--, named will still not be
1278 able to write or create files except in the directories
1279 above, with SELinux in Enforcing mode.
1283 So, to allow named to update slave or DDNS zone files,
1284 it is best to locate them in $ROOTDIR/var/named/slaves,
1285 with named.conf zone statements such as:
1288 zone "slave.zone." IN {
1290 file "slaves/slave.zone.db";
1293 zone "ddns.zone." IN {
1295 allow-updates {...};
1296 file "slaves/ddns.zone.db";
1303 To allow named to create its cache dump and statistics
1304 files, for example, you could use named.conf options
1310 dump-file "/var/named/data/cache_dump.db";
1311 statistics-file "/var/named/data/named_stats.txt";
1319 You can also tell SELinux to allow named to update any
1320 zone database files, by setting the SELinux tunable boolean
1321 parameter 'named_write_master_zones=1', using the
1322 system-config-securitylevel GUI, using the 'setsebool'
1323 command, or in /etc/selinux/targeted/booleans.
1327 You can disable SELinux protection for named entirely by
1328 setting the 'named_disable_trans=1' SELinux tunable boolean
1333 The SELinux named policy defines these SELinux contexts for named:
1336 named_zone_t : for zone database files - $ROOTDIR/var/named/*
1337 named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
1338 named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
1344 If you want to retain use of the SELinux policy for named,
1345 and put named files in different locations, you can do
1346 so by changing the context of the custom file locations
1351 To create a custom configuration file location, e.g.
1352 '/root/named.conf', to use with the 'named -c' option,
1356 # chcon system_u:object_r:named_conf_t /root/named.conf
1362 To create a custom modifiable named data location, e.g.
1363 '/var/log/named' for a log file, do:
1366 # chcon system_u:object_r:named_cache_t /var/log/named
1372 To create a custom zone file location, e.g. /root/zones/, do:
1375 # chcon system_u:object_r:named_zone_t /root/zones/{.,*}
1381 See these man-pages for more information : selinux(8),
1382 named_selinux(8), chcon(1), setsebool(8)
1390 I'm running BIND on Ubuntu -
1393 Why can't named update slave zone database files?
1396 Why can't named create DDNS journal files or update
1397 the master zones from journals?
1400 Why can't named create custom log files?
1405 Ubuntu uses AppArmor <ulink url="http://en.wikipedia.org/wiki/AppArmor">
1406 <http://en.wikipedia.org/wiki/AppArmor></ulink> in
1407 addition to normal file system permissions to protect the system.
1410 Adjust the paths to use those specified in /etc/apparmor.d/usr.sbin.named
1411 or adjust /etc/apparmor.d/usr.sbin.named to allow named to write at the
1412 location specified in named.conf.
1420 Listening on individual IPv6 interfaces does not work.
1425 This is usually due to "/proc/net/if_inet6" not being available
1426 in the chroot file system. Mount another instance of "proc"
1427 in the chroot file system.
1430 This can be be made permanent by adding a second instance to
1434 proc /proc proc defaults 0 0
1435 proc /var/named/proc proc defaults 0 0</programlisting>
1441 </qandadiv> <!-- Linux -->
1443 <qandadiv><title>Windows</title>
1448 Zone transfers from my BIND 9 master to my Windows 2000
1454 This may be caused by a bug in the Windows 2000 DNS server
1455 where DNS messages larger than 16K are not handled properly.
1456 This can be worked around by setting the option "transfer-format
1457 one-answer;". Also check whether your zone contains domain
1458 names with embedded spaces or other special characters,
1459 like "John\032Doe\213s\032Computer", since such names have
1460 been known to cause Windows 2000 slaves to incorrectly
1469 I get <quote>Error 1067</quote> when starting named under Windows.
1474 This is the service manager saying that named exited. You
1475 need to examine the Application log in the EventViewer to
1479 Common causes are that you failed to create "named.conf"
1480 (usually "C:\windows\dns\etc\named.conf") or failed to
1481 specify the directory in named.conf.
1486 Directory "C:\windows\dns\etc";
1492 </qandadiv> <!-- Windows -->
1494 <qandadiv><title>FreeBSD</title>
1499 I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
1504 /dev/random is not configured. Use rndcontrol(8) to tell
1505 the kernel to use certain interrupts as a source of random
1506 events. You can make this permanent by setting rand_irqs
1511 rand_irqs="3 14 15"</programlisting>
1515 <ulink url="http://people.freebsd.org/~dougb/randomness.html">
1516 <http://people.freebsd.org/~dougb/randomness.html></ulink>.
1521 </qandadiv> <!-- FreeBSD -->
1523 <qandadiv><title>Solaris</title>
1528 How do I integrate BIND 9 and Solaris SMF
1533 Sun has a blog entry describing how to do this.
1537 url="http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris">
1538 <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>
1546 <qandadiv><title>Apple Mac OS X</title>
1551 How do I run BIND 9 on Apple Mac OS X?
1556 If you run Tiger(Mac OS 10.4) or later then this is all you need to do:
1560 % sudo rndc-confgen > /etc/rndc.conf</programlisting>
1563 Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:
1568 algorithm hmac-sha256;
1569 secret "uvceheVuqf17ZwIcTydddw==";
1573 Then start the relevant service:
1577 % sudo service org.isc.named start</programlisting>
1580 This is persistent upon a reboot, so you will have to do it only once.
1586 Alternatively you can just generate /etc/rndc.key by running:
1590 % sudo rndc-confgen -a</programlisting>
1593 Then start the relevant service:
1597 % sudo service org.isc.named start</programlisting>
1600 Named will look for /etc/rndc.key when it starts if it
1601 doesn't have a controls section or the existing controls are
1602 missing keys sub-clauses. This is persistent upon a
1603 reboot, so you will have to do it only once.
1610 </qandadiv> <!-- Operating-System Specific Questions -->