FAQ revision 8731a2bd2f5483f50d82cf28e315090b7ceeed54
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonFrequently Asked Questions about BIND 9
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceCopyright � 2004-2007 Internet Systems Consortium, Inc. ("ISC")
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonCopyright � 2000-2003 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence-----------------------------------------------------------------------
15a44745412679c30a6d022733925af70a38b715David Lawrence1. Compilation and Installation Questions
15a44745412679c30a6d022733925af70a38b715David LawrenceQ: I'm trying to compile BIND 9, and "make" is failing due to files not
15a44745412679c30a6d022733925af70a38b715David Lawrence being found. Why?
15a44745412679c30a6d022733925af70a38b715David LawrenceA: Using a parallel or distributed "make" to build BIND 9 is not
15a44745412679c30a6d022733925af70a38b715David Lawrence supported, and doesn't work. If you are using one of these, use normal
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson make or gmake instead.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonQ: Isn't "make install" supposed to generate a default named.conf?
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonA: Short Answer: No.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence Long Answer: There really isn't a default configuration which fits any
6028d1ce0380d0ba7f6c6ecd1ad20b31ddd1becbDavid Lawrence site perfectly. There are lots of decisions that need to be made and
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence there is no consensus on what the defaults should be. For example
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson FreeBSD uses /etc/namedb as the location where the configuration files
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington for named are stored. Others use /var/named.
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington What addresses to listen on? For a laptop on the move a lot you may
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson only want to listen on the loop back interfaces.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence Who do you offer recursive service to? Is there are firewall to
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson consider? If so is it stateless or stateful. Are you directly on the
3b2f0d1d660486abf9d6c450b39e015836d97373Brian Wellington Internet? Are you on a private network? Are you on a NAT'd network? The
3b2f0d1d660486abf9d6c450b39e015836d97373Brian Wellington answers to all these questions change how you configure even a caching
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson2. Configuration and Setup Questions
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonQ: Why does named log the warning message "no TTL specified - using SOA
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson MINTTL instead"?
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonA: Your zone file is illegal according to RFC1035. It must either have a
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson at the beginning, or the first record in it must have a TTL field, like
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson the "84600" in this example:
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonQ: Why do I get errors like "dns_zone_load: zone foo/IN: loading master
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington file bar: ran out of space"?
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonA: This is often caused by TXT records with missing close quotes. Check
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson that all TXT records containing quoted strings have both open and close
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonQ: How do I restrict people from looking up the server version?
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonA: Put a "version" option containing something other than the real version
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington in the "options" section of named.conf. Note doing this will not
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington prevent attacks and may impede people trying to diagnose problems with
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington your server. Also it is possible to "fingerprint" nameservers to
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington determine their version.
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonQ: How do I restrict only remote users from looking up the server version?
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonA: The following view statement will intercept lookups as the internal
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington view that holds the version information will be matched last. The
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington caveats of the previous answer still apply, of course.
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington view "chaos" chaos {
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington match-clients { <those to be refused>; };
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington allow-query { none; };
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington file "/dev/null"; // or any empty file
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonQ: What do "no source of entropy found" or "could not open entropy source
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonA: The server requires a source of entropy to perform certain operations,
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington mostly DNSSEC related. These messages indicate that you have no source
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington of entropy. On systems with /dev/random or an equivalent, it is used by
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington default. A source of entropy can also be defined using the
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington random-device option in named.conf.
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonQ: I'm trying to use TSIG to authenticate dynamic updates or zone
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington transfers. I'm sure I have the keys set up correctly, but the server is
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington rejecting the TSIG. Why?
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonA: This may be a clock skew problem. Check that the the clocks on the
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington client and server are properly synchronised (e.g., using ntp).
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonQ: I see a log message like the following. Why?
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington couldn't open pid file '/var/run/named.pid': Permission denied
909e3c228813f05bcdebf403a69ed18406f86ec4Brian WellingtonA: You are most likely running named as a non-root user, and that user
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington does not have permission to write in /var/run. The common ways of
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington fixing this are to create a /var/run/named directory owned by the named
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington user and set pid-file to "/var/run/named/named.pid", or set pid-file to
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington "named.pid", which will put the file in the directory specified by the
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington directory option (which, in this case, must be writable by the named
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonQ: I can query the nameserver from the nameserver but not from other
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson machines. Why?
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonA: This is usually the result of the firewall configuration stopping the
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson queries and / or the replies.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonQ: How can I make a server a slave for both an internal and an external
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson view at the same time? When I tried, both views on the slave were
dig axfr example.com @master-server > tmp
named-checkzone example.com tmp
Q: I get error messages like "named.conf:99: unexpected end of input"
where 99 is the last line of named.conf.
zone "example.com" {
file "internal/example.db";
zone "example.com" {
file "external/example.db";
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
master file primaries/wireless.ietf56.ietf.org: no owner".
white space (tab/space) but the is no current record owner name to
FreeBSD: /etc/localtime
startup (/var/log/messages or equivalent). Running "named -g <usual
necessary so that the default server listed in /etc/rndc.conf matches
the addresses used in named.conf. "localhost" has two address
that /etc/rndc.conf has the correct ownership and that a copy is in the
Q: I get "transfer of 'example.net/IN' from 192.168.4.12#53: failed while
"dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
the name specified in named.conf to ensure that the contents are always
If named is invoked as "named -t /chroot/DNS" with the following
directory "/var/named";
zone "example.net" {
file "sl/example.net";
forwarders { <ip.of.primary.nameserver>; };
zone "sbl-xbl.spamhaus.org" {
forwarders { <ip.of.rbldns.server> port 530; };
zone "list.dsbl.org" {
forwarders { <ip.of.rbldns.server> port 530; };
Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.
port and/or address. See also notify-source and transfer-source.
Q: I get warning messages like "zone example.com/IN: refresh: failure
dig +norec example.com soa @1.2.3.4
You would have to add both the CNAME and address records (A/AAAA) as
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
A: If the IN-ADDR.ARPA name covered refers to a internal address space you
for these addresses. Please see http://as112.net/ for details of the
zone "10.IN-ADDR.ARPA" {
zone "16.172.IN-ADDR.ARPA" {
zone "31.172.IN-ADDR.ARPA" {
zone "168.192.IN-ADDR.ARPA" {
general: errno2result.c:109: unexpected error:
A: The capability module, part of "Linux Security Modules/LSM", has not
policy ( see http://www.nsa.gov/selinux ) and recommendations for BIND
where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
$ROOTDIR/var/named directory, the default location for master zone
files under /var/named have ownership named:named and mode rw-rw-r--,
zone "slave.zone." IN {
file "slaves/slave.zone.db";
zone "ddns.zone." IN {
file "slaves/ddns.zone.db";
example, you could use named.conf options statements such as:
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
GUI, using the 'setsebool' command, or in /etc/selinux/targeted/
named_zone_t : for zone database files - $ROOTDIR/var/named/*
named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
To create a custom configuration file location, e.g. '/root/
named.conf', to use with the 'named -c' option, do:
# chcon system_u:object_r:named_conf_t /root/named.conf
# chcon system_u:object_r:named_cache_t /var/log/named
# chcon system_u:object_r:named_zone_t /root/zones/{.,*}
Common causes are that you failed to create "named.conf" (usually "C:\
windows\dns\etc\named.conf") or failed to specify the directory in
Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to
permanent by setting rand_irqs in /etc/rc.conf.