PageRenderTime 120ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 1ms

/contrib/bind9/doc/arm/Bv9ARM-book.xml

https://bitbucket.org/freebsd/freebsd-head/
XML | 12029 lines | 11175 code | 821 blank | 33 comment | 0 complexity | 229a224015246795a39e20aab94ec4c8 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, LGPL-2.0, LGPL-2.1, BSD-2-Clause, 0BSD, JSON, AGPL-1.0, GPL-2.0
  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY mdash "&#8212;">]>
  4. <!--
  5. - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
  6. - Copyright (C) 2000-2003 Internet Software Consortium.
  7. -
  8. - Permission to use, copy, modify, and/or distribute this software for any
  9. - purpose with or without fee is hereby granted, provided that the above
  10. - copyright notice and this permission notice appear in all copies.
  11. -
  12. - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  13. - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  14. - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  15. - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  16. - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  17. - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  18. - PERFORMANCE OF THIS SOFTWARE.
  19. -->
  20. <!-- File: $Id$ -->
  21. <book xmlns:xi="http://www.w3.org/2001/XInclude">
  22. <title>BIND 9 Administrator Reference Manual</title>
  23. <bookinfo>
  24. <copyright>
  25. <year>2004</year>
  26. <year>2005</year>
  27. <year>2006</year>
  28. <year>2007</year>
  29. <year>2008</year>
  30. <year>2009</year>
  31. <year>2010</year>
  32. <year>2011</year>
  33. <year>2012</year>
  34. <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
  35. </copyright>
  36. <copyright>
  37. <year>2000</year>
  38. <year>2001</year>
  39. <year>2002</year>
  40. <year>2003</year>
  41. <holder>Internet Software Consortium.</holder>
  42. </copyright>
  43. </bookinfo>
  44. <chapter id="Bv9ARM.ch01">
  45. <title>Introduction</title>
  46. <para>
  47. The Internet Domain Name System (<acronym>DNS</acronym>)
  48. consists of the syntax
  49. to specify the names of entities in the Internet in a hierarchical
  50. manner, the rules used for delegating authority over names, and the
  51. system implementation that actually maps names to Internet
  52. addresses. <acronym>DNS</acronym> data is maintained in a
  53. group of distributed
  54. hierarchical databases.
  55. </para>
  56. <sect1>
  57. <title>Scope of Document</title>
  58. <para>
  59. The Berkeley Internet Name Domain
  60. (<acronym>BIND</acronym>) implements a
  61. domain name server for a number of operating systems. This
  62. document provides basic information about the installation and
  63. care of the Internet Systems Consortium (<acronym>ISC</acronym>)
  64. <acronym>BIND</acronym> version 9 software package for
  65. system administrators.
  66. </para>
  67. <para>
  68. This version of the manual corresponds to BIND version 9.8.
  69. </para>
  70. </sect1>
  71. <sect1>
  72. <title>Organization of This Document</title>
  73. <para>
  74. In this document, <emphasis>Chapter 1</emphasis> introduces
  75. the basic <acronym>DNS</acronym> and <acronym>BIND</acronym> concepts. <emphasis>Chapter 2</emphasis>
  76. describes resource requirements for running <acronym>BIND</acronym> in various
  77. environments. Information in <emphasis>Chapter 3</emphasis> is
  78. <emphasis>task-oriented</emphasis> in its presentation and is
  79. organized functionally, to aid in the process of installing the
  80. <acronym>BIND</acronym> 9 software. The task-oriented
  81. section is followed by
  82. <emphasis>Chapter 4</emphasis>, which contains more advanced
  83. concepts that the system administrator may need for implementing
  84. certain options. <emphasis>Chapter 5</emphasis>
  85. describes the <acronym>BIND</acronym> 9 lightweight
  86. resolver. The contents of <emphasis>Chapter 6</emphasis> are
  87. organized as in a reference manual to aid in the ongoing
  88. maintenance of the software. <emphasis>Chapter 7</emphasis> addresses
  89. security considerations, and
  90. <emphasis>Chapter 8</emphasis> contains troubleshooting help. The
  91. main body of the document is followed by several
  92. <emphasis>appendices</emphasis> which contain useful reference
  93. information, such as a <emphasis>bibliography</emphasis> and
  94. historic information related to <acronym>BIND</acronym>
  95. and the Domain Name
  96. System.
  97. </para>
  98. </sect1>
  99. <sect1>
  100. <title>Conventions Used in This Document</title>
  101. <para>
  102. In this document, we use the following general typographic
  103. conventions:
  104. </para>
  105. <informaltable>
  106. <tgroup cols="2">
  107. <colspec colname="1" colnum="1" colwidth="3.000in"/>
  108. <colspec colname="2" colnum="2" colwidth="2.625in"/>
  109. <tbody>
  110. <row>
  111. <entry colname="1">
  112. <para>
  113. <emphasis>To describe:</emphasis>
  114. </para>
  115. </entry>
  116. <entry colname="2">
  117. <para>
  118. <emphasis>We use the style:</emphasis>
  119. </para>
  120. </entry>
  121. </row>
  122. <row>
  123. <entry colname="1">
  124. <para>
  125. a pathname, filename, URL, hostname,
  126. mailing list name, or new term or concept
  127. </para>
  128. </entry>
  129. <entry colname="2">
  130. <para>
  131. <filename>Fixed width</filename>
  132. </para>
  133. </entry>
  134. </row>
  135. <row>
  136. <entry colname="1">
  137. <para>
  138. literal user
  139. input
  140. </para>
  141. </entry>
  142. <entry colname="2">
  143. <para>
  144. <userinput>Fixed Width Bold</userinput>
  145. </para>
  146. </entry>
  147. </row>
  148. <row>
  149. <entry colname="1">
  150. <para>
  151. program output
  152. </para>
  153. </entry>
  154. <entry colname="2">
  155. <para>
  156. <computeroutput>Fixed Width</computeroutput>
  157. </para>
  158. </entry>
  159. </row>
  160. </tbody>
  161. </tgroup>
  162. </informaltable>
  163. <para>
  164. The following conventions are used in descriptions of the
  165. <acronym>BIND</acronym> configuration file:<informaltable colsep="0" frame="all" rowsep="0">
  166. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
  167. <colspec colname="1" colnum="1" colsep="0" colwidth="3.000in"/>
  168. <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
  169. <tbody>
  170. <row rowsep="0">
  171. <entry colname="1" colsep="1" rowsep="1">
  172. <para>
  173. <emphasis>To describe:</emphasis>
  174. </para>
  175. </entry>
  176. <entry colname="2" rowsep="1">
  177. <para>
  178. <emphasis>We use the style:</emphasis>
  179. </para>
  180. </entry>
  181. </row>
  182. <row rowsep="0">
  183. <entry colname="1" colsep="1" rowsep="1">
  184. <para>
  185. keywords
  186. </para>
  187. </entry>
  188. <entry colname="2" rowsep="1">
  189. <para>
  190. <literal>Fixed Width</literal>
  191. </para>
  192. </entry>
  193. </row>
  194. <row rowsep="0">
  195. <entry colname="1" colsep="1" rowsep="1">
  196. <para>
  197. variables
  198. </para>
  199. </entry>
  200. <entry colname="2" rowsep="1">
  201. <para>
  202. <varname>Fixed Width</varname>
  203. </para>
  204. </entry>
  205. </row>
  206. <row rowsep="0">
  207. <entry colname="1" colsep="1">
  208. <para>
  209. Optional input
  210. </para>
  211. </entry>
  212. <entry colname="2">
  213. <para>
  214. <optional>Text is enclosed in square brackets</optional>
  215. </para>
  216. </entry>
  217. </row>
  218. </tbody>
  219. </tgroup>
  220. </informaltable>
  221. </para>
  222. </sect1>
  223. <sect1>
  224. <title>The Domain Name System (<acronym>DNS</acronym>)</title>
  225. <para>
  226. The purpose of this document is to explain the installation
  227. and upkeep of the <acronym>BIND</acronym> (Berkeley Internet
  228. Name Domain) software package, and we
  229. begin by reviewing the fundamentals of the Domain Name System
  230. (<acronym>DNS</acronym>) as they relate to <acronym>BIND</acronym>.
  231. </para>
  232. <sect2>
  233. <title>DNS Fundamentals</title>
  234. <para>
  235. The Domain Name System (DNS) is a hierarchical, distributed
  236. database. It stores information for mapping Internet host names to
  237. IP
  238. addresses and vice versa, mail routing information, and other data
  239. used by Internet applications.
  240. </para>
  241. <para>
  242. Clients look up information in the DNS by calling a
  243. <emphasis>resolver</emphasis> library, which sends queries to one or
  244. more <emphasis>name servers</emphasis> and interprets the responses.
  245. The <acronym>BIND</acronym> 9 software distribution
  246. contains a
  247. name server, <command>named</command>, and a resolver
  248. library, <command>liblwres</command>. The older
  249. <command>libbind</command> resolver library is also available
  250. from ISC as a separate download.
  251. </para>
  252. </sect2><sect2>
  253. <title>Domains and Domain Names</title>
  254. <para>
  255. The data stored in the DNS is identified by <emphasis>domain names</emphasis> that are organized as a tree according to
  256. organizational or administrative boundaries. Each node of the tree,
  257. called a <emphasis>domain</emphasis>, is given a label. The domain
  258. name of the
  259. node is the concatenation of all the labels on the path from the
  260. node to the <emphasis>root</emphasis> node. This is represented
  261. in written form as a string of labels listed from right to left and
  262. separated by dots. A label need only be unique within its parent
  263. domain.
  264. </para>
  265. <para>
  266. For example, a domain name for a host at the
  267. company <emphasis>Example, Inc.</emphasis> could be
  268. <literal>ourhost.example.com</literal>,
  269. where <literal>com</literal> is the
  270. top level domain to which
  271. <literal>ourhost.example.com</literal> belongs,
  272. <literal>example</literal> is
  273. a subdomain of <literal>com</literal>, and
  274. <literal>ourhost</literal> is the
  275. name of the host.
  276. </para>
  277. <para>
  278. For administrative purposes, the name space is partitioned into
  279. areas called <emphasis>zones</emphasis>, each starting at a node and
  280. extending down to the leaf nodes or to nodes where other zones
  281. start.
  282. The data for each zone is stored in a <emphasis>name server</emphasis>, which answers queries about the zone using the
  283. <emphasis>DNS protocol</emphasis>.
  284. </para>
  285. <para>
  286. The data associated with each domain name is stored in the
  287. form of <emphasis>resource records</emphasis> (<acronym>RR</acronym>s).
  288. Some of the supported resource record types are described in
  289. <xref linkend="types_of_resource_records_and_when_to_use_them"/>.
  290. </para>
  291. <para>
  292. For more detailed information about the design of the DNS and
  293. the DNS protocol, please refer to the standards documents listed in
  294. <xref linkend="rfcs"/>.
  295. </para>
  296. </sect2>
  297. <sect2>
  298. <title>Zones</title>
  299. <para>
  300. To properly operate a name server, it is important to understand
  301. the difference between a <emphasis>zone</emphasis>
  302. and a <emphasis>domain</emphasis>.
  303. </para>
  304. <para>
  305. As stated previously, a zone is a point of delegation in
  306. the <acronym>DNS</acronym> tree. A zone consists of
  307. those contiguous parts of the domain
  308. tree for which a name server has complete information and over which
  309. it has authority. It contains all domain names from a certain point
  310. downward in the domain tree except those which are delegated to
  311. other zones. A delegation point is marked by one or more
  312. <emphasis>NS records</emphasis> in the
  313. parent zone, which should be matched by equivalent NS records at
  314. the root of the delegated zone.
  315. </para>
  316. <para>
  317. For instance, consider the <literal>example.com</literal>
  318. domain which includes names
  319. such as <literal>host.aaa.example.com</literal> and
  320. <literal>host.bbb.example.com</literal> even though
  321. the <literal>example.com</literal> zone includes
  322. only delegations for the <literal>aaa.example.com</literal> and
  323. <literal>bbb.example.com</literal> zones. A zone can
  324. map
  325. exactly to a single domain, but could also include only part of a
  326. domain, the rest of which could be delegated to other
  327. name servers. Every name in the <acronym>DNS</acronym>
  328. tree is a
  329. <emphasis>domain</emphasis>, even if it is
  330. <emphasis>terminal</emphasis>, that is, has no
  331. <emphasis>subdomains</emphasis>. Every subdomain is a domain and
  332. every domain except the root is also a subdomain. The terminology is
  333. not intuitive and we suggest that you read RFCs 1033, 1034 and 1035
  334. to
  335. gain a complete understanding of this difficult and subtle
  336. topic.
  337. </para>
  338. <para>
  339. Though <acronym>BIND</acronym> is called a "domain name
  340. server",
  341. it deals primarily in terms of zones. The master and slave
  342. declarations in the <filename>named.conf</filename> file
  343. specify
  344. zones, not domains. When you ask some other site if it is willing to
  345. be a slave server for your <emphasis>domain</emphasis>, you are
  346. actually asking for slave service for some collection of zones.
  347. </para>
  348. </sect2>
  349. <sect2>
  350. <title>Authoritative Name Servers</title>
  351. <para>
  352. Each zone is served by at least
  353. one <emphasis>authoritative name server</emphasis>,
  354. which contains the complete data for the zone.
  355. To make the DNS tolerant of server and network failures,
  356. most zones have two or more authoritative servers, on
  357. different networks.
  358. </para>
  359. <para>
  360. Responses from authoritative servers have the "authoritative
  361. answer" (AA) bit set in the response packets. This makes them
  362. easy to identify when debugging DNS configurations using tools like
  363. <command>dig</command> (<xref linkend="diagnostic_tools"/>).
  364. </para>
  365. <sect3>
  366. <title>The Primary Master</title>
  367. <para>
  368. The authoritative server where the master copy of the zone
  369. data is maintained is called the
  370. <emphasis>primary master</emphasis> server, or simply the
  371. <emphasis>primary</emphasis>. Typically it loads the zone
  372. contents from some local file edited by humans or perhaps
  373. generated mechanically from some other local file which is
  374. edited by humans. This file is called the
  375. <emphasis>zone file</emphasis> or
  376. <emphasis>master file</emphasis>.
  377. </para>
  378. <para>
  379. In some cases, however, the master file may not be edited
  380. by humans at all, but may instead be the result of
  381. <emphasis>dynamic update</emphasis> operations.
  382. </para>
  383. </sect3>
  384. <sect3>
  385. <title>Slave Servers</title>
  386. <para>
  387. The other authoritative servers, the <emphasis>slave</emphasis>
  388. servers (also known as <emphasis>secondary</emphasis> servers)
  389. load
  390. the zone contents from another server using a replication process
  391. known as a <emphasis>zone transfer</emphasis>. Typically the data
  392. are
  393. transferred directly from the primary master, but it is also
  394. possible
  395. to transfer it from another slave. In other words, a slave server
  396. may itself act as a master to a subordinate slave server.
  397. </para>
  398. </sect3>
  399. <sect3>
  400. <title>Stealth Servers</title>
  401. <para>
  402. Usually all of the zone's authoritative servers are listed in
  403. NS records in the parent zone. These NS records constitute
  404. a <emphasis>delegation</emphasis> of the zone from the parent.
  405. The authoritative servers are also listed in the zone file itself,
  406. at the <emphasis>top level</emphasis> or <emphasis>apex</emphasis>
  407. of the zone. You can list servers in the zone's top-level NS
  408. records that are not in the parent's NS delegation, but you cannot
  409. list servers in the parent's delegation that are not present at
  410. the zone's top level.
  411. </para>
  412. <para>
  413. A <emphasis>stealth server</emphasis> is a server that is
  414. authoritative for a zone but is not listed in that zone's NS
  415. records. Stealth servers can be used for keeping a local copy of
  416. a
  417. zone to speed up access to the zone's records or to make sure that
  418. the
  419. zone is available even if all the "official" servers for the zone
  420. are
  421. inaccessible.
  422. </para>
  423. <para>
  424. A configuration where the primary master server itself is a
  425. stealth server is often referred to as a "hidden primary"
  426. configuration. One use for this configuration is when the primary
  427. master
  428. is behind a firewall and therefore unable to communicate directly
  429. with the outside world.
  430. </para>
  431. </sect3>
  432. </sect2>
  433. <sect2>
  434. <title>Caching Name Servers</title>
  435. <!--
  436. - Terminology here is inconsistent. Probably ought to
  437. - convert to using "recursive name server" everywhere
  438. - with just a note about "caching" terminology.
  439. -->
  440. <para>
  441. The resolver libraries provided by most operating systems are
  442. <emphasis>stub resolvers</emphasis>, meaning that they are not
  443. capable of
  444. performing the full DNS resolution process by themselves by talking
  445. directly to the authoritative servers. Instead, they rely on a
  446. local
  447. name server to perform the resolution on their behalf. Such a
  448. server
  449. is called a <emphasis>recursive</emphasis> name server; it performs
  450. <emphasis>recursive lookups</emphasis> for local clients.
  451. </para>
  452. <para>
  453. To improve performance, recursive servers cache the results of
  454. the lookups they perform. Since the processes of recursion and
  455. caching are intimately connected, the terms
  456. <emphasis>recursive server</emphasis> and
  457. <emphasis>caching server</emphasis> are often used synonymously.
  458. </para>
  459. <para>
  460. The length of time for which a record may be retained in
  461. the cache of a caching name server is controlled by the
  462. Time To Live (TTL) field associated with each resource record.
  463. </para>
  464. <sect3>
  465. <title>Forwarding</title>
  466. <para>
  467. Even a caching name server does not necessarily perform
  468. the complete recursive lookup itself. Instead, it can
  469. <emphasis>forward</emphasis> some or all of the queries
  470. that it cannot satisfy from its cache to another caching name
  471. server,
  472. commonly referred to as a <emphasis>forwarder</emphasis>.
  473. </para>
  474. <para>
  475. There may be one or more forwarders,
  476. and they are queried in turn until the list is exhausted or an
  477. answer
  478. is found. Forwarders are typically used when you do not
  479. wish all the servers at a given site to interact directly with the
  480. rest of
  481. the Internet servers. A typical scenario would involve a number
  482. of internal <acronym>DNS</acronym> servers and an
  483. Internet firewall. Servers unable
  484. to pass packets through the firewall would forward to the server
  485. that can do it, and that server would query the Internet <acronym>DNS</acronym> servers
  486. on the internal server's behalf.
  487. </para>
  488. </sect3>
  489. </sect2>
  490. <sect2>
  491. <title>Name Servers in Multiple Roles</title>
  492. <para>
  493. The <acronym>BIND</acronym> name server can
  494. simultaneously act as
  495. a master for some zones, a slave for other zones, and as a caching
  496. (recursive) server for a set of local clients.
  497. </para>
  498. <para>
  499. However, since the functions of authoritative name service
  500. and caching/recursive name service are logically separate, it is
  501. often advantageous to run them on separate server machines.
  502. A server that only provides authoritative name service
  503. (an <emphasis>authoritative-only</emphasis> server) can run with
  504. recursion disabled, improving reliability and security.
  505. A server that is not authoritative for any zones and only provides
  506. recursive service to local
  507. clients (a <emphasis>caching-only</emphasis> server)
  508. does not need to be reachable from the Internet at large and can
  509. be placed inside a firewall.
  510. </para>
  511. </sect2>
  512. </sect1>
  513. </chapter>
  514. <chapter id="Bv9ARM.ch02">
  515. <title><acronym>BIND</acronym> Resource Requirements</title>
  516. <sect1>
  517. <title>Hardware requirements</title>
  518. <para>
  519. <acronym>DNS</acronym> hardware requirements have
  520. traditionally been quite modest.
  521. For many installations, servers that have been pensioned off from
  522. active duty have performed admirably as <acronym>DNS</acronym> servers.
  523. </para>
  524. <para>
  525. The DNSSEC features of <acronym>BIND</acronym> 9
  526. may prove to be quite
  527. CPU intensive however, so organizations that make heavy use of these
  528. features may wish to consider larger systems for these applications.
  529. <acronym>BIND</acronym> 9 is fully multithreaded, allowing
  530. full utilization of
  531. multiprocessor systems for installations that need it.
  532. </para>
  533. </sect1>
  534. <sect1>
  535. <title>CPU Requirements</title>
  536. <para>
  537. CPU requirements for <acronym>BIND</acronym> 9 range from
  538. i486-class machines
  539. for serving of static zones without caching, to enterprise-class
  540. machines if you intend to process many dynamic updates and DNSSEC
  541. signed zones, serving many thousands of queries per second.
  542. </para>
  543. </sect1>
  544. <sect1>
  545. <title>Memory Requirements</title>
  546. <para>
  547. The memory of the server has to be large enough to fit the
  548. cache and zones loaded off disk. The <command>max-cache-size</command>
  549. option can be used to limit the amount of memory used by the cache,
  550. at the expense of reducing cache hit rates and causing more <acronym>DNS</acronym>
  551. traffic.
  552. Additionally, if additional section caching
  553. (<xref linkend="acache"/>) is enabled,
  554. the <command>max-acache-size</command> option can be used to
  555. limit the amount
  556. of memory used by the mechanism.
  557. It is still good practice to have enough memory to load
  558. all zone and cache data into memory &mdash; unfortunately, the best
  559. way
  560. to determine this for a given installation is to watch the name server
  561. in operation. After a few weeks the server process should reach
  562. a relatively stable size where entries are expiring from the cache as
  563. fast as they are being inserted.
  564. </para>
  565. <!--
  566. - Add something here about leaving overhead for attacks?
  567. - How much overhead? Percentage?
  568. -->
  569. </sect1>
  570. <sect1>
  571. <title>Name Server Intensive Environment Issues</title>
  572. <para>
  573. For name server intensive environments, there are two alternative
  574. configurations that may be used. The first is where clients and
  575. any second-level internal name servers query a main name server, which
  576. has enough memory to build a large cache. This approach minimizes
  577. the bandwidth used by external name lookups. The second alternative
  578. is to set up second-level internal name servers to make queries
  579. independently.
  580. In this configuration, none of the individual machines needs to
  581. have as much memory or CPU power as in the first alternative, but
  582. this has the disadvantage of making many more external queries,
  583. as none of the name servers share their cached data.
  584. </para>
  585. </sect1>
  586. <sect1>
  587. <title>Supported Operating Systems</title>
  588. <para>
  589. ISC <acronym>BIND</acronym> 9 compiles and runs on a large
  590. number
  591. of Unix-like operating systems and on
  592. Microsoft Windows Server 2003 and 2008, and Windows XP and Vista.
  593. For an up-to-date
  594. list of supported systems, see the README file in the top level
  595. directory
  596. of the BIND 9 source distribution.
  597. </para>
  598. </sect1>
  599. </chapter>
  600. <chapter id="Bv9ARM.ch03">
  601. <title>Name Server Configuration</title>
  602. <para>
  603. In this chapter we provide some suggested configurations along
  604. with guidelines for their use. We suggest reasonable values for
  605. certain option settings.
  606. </para>
  607. <sect1 id="sample_configuration">
  608. <title>Sample Configurations</title>
  609. <sect2>
  610. <title>A Caching-only Name Server</title>
  611. <para>
  612. The following sample configuration is appropriate for a caching-only
  613. name server for use by clients internal to a corporation. All
  614. queries
  615. from outside clients are refused using the <command>allow-query</command>
  616. option. Alternatively, the same effect could be achieved using
  617. suitable
  618. firewall rules.
  619. </para>
  620. <programlisting>
  621. // Two corporate subnets we wish to allow queries from.
  622. acl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
  623. options {
  624. // Working directory
  625. directory "/etc/namedb";
  626. allow-query { corpnets; };
  627. };
  628. // Provide a reverse mapping for the loopback
  629. // address 127.0.0.1
  630. zone "0.0.127.in-addr.arpa" {
  631. type master;
  632. file "localhost.rev";
  633. notify no;
  634. };
  635. </programlisting>
  636. </sect2>
  637. <sect2>
  638. <title>An Authoritative-only Name Server</title>
  639. <para>
  640. This sample configuration is for an authoritative-only server
  641. that is the master server for "<filename>example.com</filename>"
  642. and a slave for the subdomain "<filename>eng.example.com</filename>".
  643. </para>
  644. <programlisting>
  645. options {
  646. // Working directory
  647. directory "/etc/namedb";
  648. // Do not allow access to cache
  649. allow-query-cache { none; };
  650. // This is the default
  651. allow-query { any; };
  652. // Do not provide recursive service
  653. recursion no;
  654. };
  655. // Provide a reverse mapping for the loopback
  656. // address 127.0.0.1
  657. zone "0.0.127.in-addr.arpa" {
  658. type master;
  659. file "localhost.rev";
  660. notify no;
  661. };
  662. // We are the master server for example.com
  663. zone "example.com" {
  664. type master;
  665. file "example.com.db";
  666. // IP addresses of slave servers allowed to
  667. // transfer example.com
  668. allow-transfer {
  669. 192.168.4.14;
  670. 192.168.5.53;
  671. };
  672. };
  673. // We are a slave server for eng.example.com
  674. zone "eng.example.com" {
  675. type slave;
  676. file "eng.example.com.bk";
  677. // IP address of eng.example.com master server
  678. masters { 192.168.4.12; };
  679. };
  680. </programlisting>
  681. </sect2>
  682. </sect1>
  683. <sect1>
  684. <title>Load Balancing</title>
  685. <!--
  686. - Add explanation of why load balancing is fragile at best
  687. - and completely pointless in the general case.
  688. -->
  689. <para>
  690. A primitive form of load balancing can be achieved in
  691. the <acronym>DNS</acronym> by using multiple records
  692. (such as multiple A records) for one name.
  693. </para>
  694. <para>
  695. For example, if you have three WWW servers with network addresses
  696. of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
  697. following means that clients will connect to each machine one third
  698. of the time:
  699. </para>
  700. <informaltable colsep="0" rowsep="0">
  701. <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="2Level-table">
  702. <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
  703. <colspec colname="2" colnum="2" colsep="0" colwidth="0.500in"/>
  704. <colspec colname="3" colnum="3" colsep="0" colwidth="0.750in"/>
  705. <colspec colname="4" colnum="4" colsep="0" colwidth="0.750in"/>
  706. <colspec colname="5" colnum="5" colsep="0" colwidth="2.028in"/>
  707. <tbody>
  708. <row rowsep="0">
  709. <entry colname="1">
  710. <para>
  711. Name
  712. </para>
  713. </entry>
  714. <entry colname="2">
  715. <para>
  716. TTL
  717. </para>
  718. </entry>
  719. <entry colname="3">
  720. <para>
  721. CLASS
  722. </para>
  723. </entry>
  724. <entry colname="4">
  725. <para>
  726. TYPE
  727. </para>
  728. </entry>
  729. <entry colname="5">
  730. <para>
  731. Resource Record (RR) Data
  732. </para>
  733. </entry>
  734. </row>
  735. <row rowsep="0">
  736. <entry colname="1">
  737. <para>
  738. <literal>www</literal>
  739. </para>
  740. </entry>
  741. <entry colname="2">
  742. <para>
  743. <literal>600</literal>
  744. </para>
  745. </entry>
  746. <entry colname="3">
  747. <para>
  748. <literal>IN</literal>
  749. </para>
  750. </entry>
  751. <entry colname="4">
  752. <para>
  753. <literal>A</literal>
  754. </para>
  755. </entry>
  756. <entry colname="5">
  757. <para>
  758. <literal>10.0.0.1</literal>
  759. </para>
  760. </entry>
  761. </row>
  762. <row rowsep="0">
  763. <entry colname="1">
  764. <para/>
  765. </entry>
  766. <entry colname="2">
  767. <para>
  768. <literal>600</literal>
  769. </para>
  770. </entry>
  771. <entry colname="3">
  772. <para>
  773. <literal>IN</literal>
  774. </para>
  775. </entry>
  776. <entry colname="4">
  777. <para>
  778. <literal>A</literal>
  779. </para>
  780. </entry>
  781. <entry colname="5">
  782. <para>
  783. <literal>10.0.0.2</literal>
  784. </para>
  785. </entry>
  786. </row>
  787. <row rowsep="0">
  788. <entry colname="1">
  789. <para/>
  790. </entry>
  791. <entry colname="2">
  792. <para>
  793. <literal>600</literal>
  794. </para>
  795. </entry>
  796. <entry colname="3">
  797. <para>
  798. <literal>IN</literal>
  799. </para>
  800. </entry>
  801. <entry colname="4">
  802. <para>
  803. <literal>A</literal>
  804. </para>
  805. </entry>
  806. <entry colname="5">
  807. <para>
  808. <literal>10.0.0.3</literal>
  809. </para>
  810. </entry>
  811. </row>
  812. </tbody>
  813. </tgroup>
  814. </informaltable>
  815. <para>
  816. When a resolver queries for these records, <acronym>BIND</acronym> will rotate
  817. them and respond to the query with the records in a different
  818. order. In the example above, clients will randomly receive
  819. records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
  820. will use the first record returned and discard the rest.
  821. </para>
  822. <para>
  823. For more detail on ordering responses, check the
  824. <command>rrset-order</command> sub-statement in the
  825. <command>options</command> statement, see
  826. <xref endterm="rrset_ordering_title" linkend="rrset_ordering"/>.
  827. </para>
  828. </sect1>
  829. <sect1>
  830. <title>Name Server Operations</title>
  831. <sect2>
  832. <title>Tools for Use With the Name Server Daemon</title>
  833. <para>
  834. This section describes several indispensable diagnostic,
  835. administrative and monitoring tools available to the system
  836. administrator for controlling and debugging the name server
  837. daemon.
  838. </para>
  839. <sect3 id="diagnostic_tools">
  840. <title>Diagnostic Tools</title>
  841. <para>
  842. The <command>dig</command>, <command>host</command>, and
  843. <command>nslookup</command> programs are all command
  844. line tools
  845. for manually querying name servers. They differ in style and
  846. output format.
  847. </para>
  848. <variablelist>
  849. <varlistentry>
  850. <term id="dig"><command>dig</command></term>
  851. <listitem>
  852. <para>
  853. The domain information groper (<command>dig</command>)
  854. is the most versatile and complete of these lookup tools.
  855. It has two modes: simple interactive
  856. mode for a single query, and batch mode which executes a
  857. query for
  858. each in a list of several query lines. All query options are
  859. accessible
  860. from the command line.
  861. </para>
  862. <cmdsynopsis label="Usage">
  863. <command>dig</command>
  864. <arg>@<replaceable>server</replaceable></arg>
  865. <arg choice="plain"><replaceable>domain</replaceable></arg>
  866. <arg><replaceable>query-type</replaceable></arg>
  867. <arg><replaceable>query-class</replaceable></arg>
  868. <arg>+<replaceable>query-option</replaceable></arg>
  869. <arg>-<replaceable>dig-option</replaceable></arg>
  870. <arg>%<replaceable>comment</replaceable></arg>
  871. </cmdsynopsis>
  872. <para>
  873. The usual simple use of <command>dig</command> will take the form
  874. </para>
  875. <simpara>
  876. <command>dig @server domain query-type query-class</command>
  877. </simpara>
  878. <para>
  879. For more information and a list of available commands and
  880. options, see the <command>dig</command> man
  881. page.
  882. </para>
  883. </listitem>
  884. </varlistentry>
  885. <varlistentry>
  886. <term><command>host</command></term>
  887. <listitem>
  888. <para>
  889. The <command>host</command> utility emphasizes
  890. simplicity
  891. and ease of use. By default, it converts
  892. between host names and Internet addresses, but its
  893. functionality
  894. can be extended with the use of options.
  895. </para>
  896. <cmdsynopsis label="Usage">
  897. <command>host</command>
  898. <arg>-aCdlnrsTwv</arg>
  899. <arg>-c <replaceable>class</replaceable></arg>
  900. <arg>-N <replaceable>ndots</replaceable></arg>
  901. <arg>-t <replaceable>type</replaceable></arg>
  902. <arg>-W <replaceable>timeout</replaceable></arg>
  903. <arg>-R <replaceable>retries</replaceable></arg>
  904. <arg>-m <replaceable>flag</replaceable></arg>
  905. <arg>-4</arg>
  906. <arg>-6</arg>
  907. <arg choice="plain"><replaceable>hostname</replaceable></arg>
  908. <arg><replaceable>server</replaceable></arg>
  909. </cmdsynopsis>
  910. <para>
  911. For more information and a list of available commands and
  912. options, see the <command>host</command> man
  913. page.
  914. </para>
  915. </listitem>
  916. </varlistentry>
  917. <varlistentry>
  918. <term><command>nslookup</command></term>
  919. <listitem>
  920. <para><command>nslookup</command>
  921. has two modes: interactive and
  922. non-interactive. Interactive mode allows the user to
  923. query name servers for information about various
  924. hosts and domains or to print a list of hosts in a
  925. domain. Non-interactive mode is used to print just
  926. the name and requested information for a host or
  927. domain.
  928. </para>
  929. <cmdsynopsis label="Usage">
  930. <command>nslookup</command>
  931. <arg rep="repeat">-option</arg>
  932. <group>
  933. <arg><replaceable>host-to-find</replaceable></arg>
  934. <arg>- <arg>server</arg></arg>
  935. </group>
  936. </cmdsynopsis>
  937. <para>
  938. Interactive mode is entered when no arguments are given (the
  939. default name server will be used) or when the first argument
  940. is a
  941. hyphen (`-') and the second argument is the host name or
  942. Internet address
  943. of a name server.
  944. </para>
  945. <para>
  946. Non-interactive mode is used when the name or Internet
  947. address
  948. of the host to be looked up is given as the first argument.
  949. The
  950. optional second argument specifies the host name or address
  951. of a name server.
  952. </para>
  953. <para>
  954. Due to its arcane user interface and frequently inconsistent
  955. behavior, we do not recommend the use of <command>nslookup</command>.
  956. Use <command>dig</command> instead.
  957. </para>
  958. </listitem>
  959. </varlistentry>
  960. </variablelist>
  961. </sect3>
  962. <sect3 id="admin_tools">
  963. <title>Administrative Tools</title>
  964. <para>
  965. Administrative tools play an integral part in the management
  966. of a server.
  967. </para>
  968. <variablelist>
  969. <varlistentry id="named-checkconf" xreflabel="Named Configuration Checking application">
  970. <term><command>named-checkconf</command></term>
  971. <listitem>
  972. <para>
  973. The <command>named-checkconf</command> program
  974. checks the syntax of a <filename>named.conf</filename> file.
  975. </para>
  976. <cmdsynopsis label="Usage">
  977. <command>named-checkconf</command>
  978. <arg>-jvz</arg>
  979. <arg>-t <replaceable>directory</replaceable></arg>
  980. <arg><replaceable>filename</replaceable></arg>
  981. </cmdsynopsis>
  982. </listitem>
  983. </varlistentry>
  984. <varlistentry id="named-checkzone" xreflabel="Zone Checking application">
  985. <term><command>named-checkzone</command></term>
  986. <listitem>
  987. <para>
  988. The <command>named-checkzone</command> program
  989. checks a master file for
  990. syntax and consistency.
  991. </para>
  992. <cmdsynopsis label="Usage">
  993. <command>named-checkzone</command>
  994. <arg>-djqvD</arg>
  995. <arg>-c <replaceable>class</replaceable></arg>
  996. <arg>-o <replaceable>output</replaceable></arg>
  997. <arg>-t <replaceable>directory</replaceable></arg>
  998. <arg>-w <replaceable>directory</replaceable></arg>
  999. <arg>-k <replaceable>(ignore|warn|fail)</replaceable></arg>
  1000. <arg>-n <replaceable>(ignore|warn|fail)</replaceable></arg>
  1001. <arg>-W <replaceable>(ignore|warn)</replaceable></arg>
  1002. <arg choice="plain"><replaceable>zone</replaceable></arg>
  1003. <arg><replaceable>filename</replaceable></arg>
  1004. </cmdsynopsis>
  1005. </listitem>
  1006. </varlistentry>
  1007. <varlistentry id="named-compilezone" xreflabel="Zone Compilation application">
  1008. <term><command>named-compilezone</command></term>
  1009. <listitem>
  1010. <para>
  1011. Similar to <command>named-checkzone,</command> but
  1012. it always dumps the zone content to a specified file
  1013. (typically in a different format).
  1014. </para>
  1015. </listitem>
  1016. </varlistentry>
  1017. <varlistentry id="rndc" xreflabel="Remote Name Daemon Control application">
  1018. <term><command>rndc</command></term>
  1019. <listitem>
  1020. <para>
  1021. The remote name daemon control
  1022. (<command>rndc</command>) program allows the
  1023. system
  1024. administrator to control the operation of a name server.
  1025. Since <acronym>BIND</acronym> 9.2, <command>rndc</command>
  1026. supports all the commands of the BIND 8 <command>ndc</command>
  1027. utility except <command>ndc start</command> and
  1028. <command>ndc restart</command>, which were also
  1029. not supported in <command>ndc</command>'s
  1030. channel mode.
  1031. If you run <command>rndc</command> without any
  1032. options
  1033. it will display a usage message as follows:
  1034. </para>
  1035. <cmdsynopsis label="Usage">
  1036. <command>rndc</command>
  1037. <arg>-c <replaceable>config</replaceable></arg>
  1038. <arg>-s <replaceable>server</replaceable></arg>
  1039. <arg>-p <replaceable>port</replaceable></arg>
  1040. <arg>-y <replaceable>key</replaceable></arg>
  1041. <arg choice="plain"><replaceable>command</replaceable></arg>
  1042. <arg rep="repeat"><replaceable>command</replaceable></arg>
  1043. </cmdsynopsis>
  1044. <para>The <command>command</command>
  1045. is one of the following:
  1046. </para>
  1047. <variablelist>
  1048. <varlistentry>
  1049. <term><userinput>reload</userinput></term>
  1050. <listitem>
  1051. <para>
  1052. Reload configuration file and zones.
  1053. </para>
  1054. </listitem>
  1055. </varlistentry>
  1056. <varlistentry>
  1057. <term><userinput>reload <replaceable>zone</replaceable>
  1058. <optional><replaceable>class</replaceable>
  1059. <optional><replaceable>view</replaceable></optional></optional></userinput></term>
  1060. <listitem>
  1061. <para>
  1062. Reload the given zone.
  1063. </para>
  1064. </listitem>
  1065. </varlistentry>
  1066. <varlistentry>
  1067. <term><userinput>refresh <replaceable>zone</replaceable>
  1068. <optional><replaceable>class</replaceable>
  1069. <optional><replaceable>view</replaceable></optional></optional></userinput></term>
  1070. <listitem>
  1071. <para>
  1072. Schedule zone maintenance for the given zone.
  1073. </para>
  1074. </listitem>
  1075. </varlistentry>
  1076. <varlistentry>
  1077. <term><userinput>retransfer <replaceable>zone</replaceable>
  1078. <optional><replaceable>class</replaceable>
  1079. <optional><replaceable>view</replaceable></optional></optional></userinput></term>
  1080. <listitem>
  1081. <para>
  1082. Retransfer the given zone from the master.
  1083. </para>
  1084. </listitem>
  1085. </varlistentry>
  1086. <varlistentry>
  1087. <term><userinput>sign <replaceable>zone</replaceable>
  1088. <optional><replaceable>class</replaceable>
  1089. <optional><replaceable>view</replaceable></optional></optional></userinput></term>
  1090. <listitem>
  1091. <para>
  1092. Fetch all DNSSEC keys for the given zone
  1093. from the key directory (see
  1094. <command>key-directory</command> in
  1095. <xref linkend="options"/>). If they are within
  1096. their publication period, merge them into the
  1097. zone's DNSKEY RRset. If the DNSKEY RRset
  1098. is changed, then the zone is automatically
  1099. re-signed with the new key set.
  1100. </para>
  1101. <para>
  1102. This command requires that the
  1103. <command>auto-dnssec</command> zone option be set
  1104. to <literal>allow</literal> or
  1105. <literal>maintain</literal>,
  1106. and also requires the zone to be configured to
  1107. allow dynamic DNS.
  1108. See <xref linkend="dynamic_update_policies"/> for
  1109. more details.
  1110. </para>
  1111. </listitem>
  1112. </varlistentry>
  1113. <varlistentry>
  1114. <term><userinput>loadkeys <replaceable>zone</replaceable>
  1115. <optional><replaceable>class</replaceable>
  1116. <optional><replaceable>view</replaceable></optional></optional></userinput></term>
  1117. <listitem>
  1118. <para>
  1119. Fetch all DNSSEC keys for the given zone
  1120. from the key directory (see
  1121. <command>key-directory</command> in
  1122. <xref linkend="options"/>). If they are within
  1123. their publication period, merge them into the
  1124. zone's DNSKEY RRset. Unlike <command>rndc
  1125. sign</command>, however, the zone is not
  1126. immediately re-signed by the new keys, but is
  1127. allowed to incrementally re-sign over time.
  1128. </para>
  1129. <para>
  1130. This command requires that the
  1131. <command>auto-dnssec</command> zone option
  1132. be set to <literal>maintain</literal>,
  1133. and also requires the zone to be configured to
  1134. allow dynamic DNS.
  1135. See <xref linkend="dynamic_update_policies"/> for
  1136. more details.
  1137. </para>
  1138. </listitem>
  1139. </varlistentry>
  1140. <varlistentry>
  1141. <term><userinput>freeze
  1142. <optional><replaceable>zone</replaceable>
  1143. <optional><replaceable>class</replaceable>
  1144. <optional><replaceable>view</replaceable></optional></optional></optional></userinput></term>
  1145. <listitem>
  1146. <para>
  1147. Suspend updates to a dynamic zone. If no zone is
  1148. specified,
  1149. then all zones are suspended. This allows manual
  1150. edits to be made to a zone normally updated by dynamic
  1151. update. It
  1152. also causes changes in the journal file to be synced
  1153. into the master
  1154. and the journal file to be removed. All dynamic
  1155. update attempts will
  1156. be refused while the zone is frozen.
  1157. </para>
  1158. </listitem>
  1159. </varlistentry>
  1160. <varlistentry>
  1161. <term><userinput>thaw
  1162. <optional><replaceable>zone</replaceable>
  1163. <optional><replaceable>class</replaceable>
  1164. <optional><replaceable>view</replaceable></optional></optional></optional></userinput></term>
  1165. <listitem>
  1166. <para>
  1167. Enable updates to a frozen dynamic zone. If no zone
  1168. is
  1169. specified, then all frozen zones are enabled. This
  1170. causes
  1171. the server to reload the zone from disk, and
  1172. re-enables dynamic updates
  1173. after the load has completed. After a zone is thawed,
  1174. dynamic updates
  1175. will no longer be refused.
  1176. </para>
  1177. </listitem>
  1178. </varlistentry>
  1179. <varlistentry>
  1180. <term><userinput>notify <replaceable>zone</replaceable>
  1181. <optional><replaceable>class</replaceable>
  1182. <optional><replaceable>view</replaceable></optional></optional></userinput></term>
  1183. <listitem>
  1184. <para>
  1185. Resend NOTIFY messages for the zone.
  1186. </para>
  1187. </listitem>
  1188. </varlistentry>
  1189. <varlistentry>
  1190. <term><userinput>reconfig</userinput></term>
  1191. <listitem>
  1192. <para>
  1193. Reload the configuration file and load new zones,
  1194. but do not reload existing zone files even if they
  1195. have changed.
  1196. This is faster than a full <command>reload</command> when there
  1197. is a large number of zones because it avoids the need
  1198. to examine the
  1199. modification times of the zones files.
  1200. </para>
  1201. </listitem>
  1202. </varlistentry>
  1203. <varlistentry>
  1204. <term><userinput>stats</userinput></term>
  1205. <listitem>
  1206. <para>
  1207. Write server statistics to the statistics file.
  1208. </para>
  1209. </listitem>
  1210. </varlistentry>
  1211. <varlistentry>
  1212. <term><userinput>querylog</userinput></term>
  1213. <listitem>
  1214. <para>
  1215. Toggle query logging. Query logging can also be enabled
  1216. by explicitly directing the <command>queries</command>
  1217. <command>category</command> to a
  1218. <command>channel</command> in the
  1219. <command>logging</command> section of
  1220. <filename>named.conf</filename> or by specifying
  1221. <command>querylog yes;</command> in the
  1222. <command>options</command> section of
  1223. <filename>named.conf</filename>.
  1224. </para>
  1225. </listitem>
  1226. </varlistentry>
  1227. <varlistentry>
  1228. <term><userinput>dumpdb
  1229. <optional>-all|-cache|-zone</optional>
  1230. <optional><replaceable>view ...</replaceable></optional></userinput></term>
  1231. <listitem>
  1232. <para>
  1233. Dump the server's caches (default) and/or zones to
  1234. the
  1235. dump file for the specified views. If no view is
  1236. specified, all
  1237. views are dumped.
  1238. </para>
  1239. </listitem>
  1240. </varlistentry>
  1241. <varlistentry>
  1242. <term><userinput>secroots
  1243. <optional><replaceable>view ...</replaceable></optional></userinput></term>
  1244. <listitem>
  1245. <para>
  1246. Dump the server's security roots to the secroots
  1247. file for the specified views. If no view is
  1248. specified, security roots for all
  1249. views are dumped.
  1250. </para>
  1251. </listitem>
  1252. </varlistentry>
  1253. <varlistentry>
  1254. <term><userinput>stop <optional>-p</optional></userinput></term>
  1255. <listitem>
  1256. <para>
  1257. Stop the server, making sure any recent changes
  1258. made through dynamic update or IXFR are first saved to
  1259. the master files of the updated zones.
  1260. If <option>-p</option> is specified <command>named</command>'s process id is returned.
  1261. This allows an external process to determine when <command>named</command>
  1262. had completed stopping.
  1263. </para>
  1264. </listitem>
  1265. </varlistentry>
  1266. <varlistentry>
  1267. <term><userinput>halt <optional>-p</optional></userinput></term>
  1268. <listitem>
  1269. <para>
  1270. Stop the server immediately. Recent changes
  1271. made through dynamic update or IXFR are not saved to
  1272. the master files, but will be rolled forward from the
  1273. journal files when the server is restarted.
  1274. If <option>-p</option> is specified <command>named</command>'s process id is returned.
  1275. This allows an external process to determine when <command>named</command>
  1276. had completed halting.
  1277. </para>
  1278. </listitem>
  1279. </varlistentry>
  1280. <varlistentry>
  1281. <term><userinput>trace</userinput></term>
  1282. <listitem>
  1283. <para>
  1284. Increment the servers debugging level by one.
  1285. </para>
  1286. </listitem>
  1287. </varlistentry>
  1288. <varlistentry>
  1289. <term><userinput>trace <replaceable>level</replaceable></userinput></term>
  1290. <listitem>
  1291. <para>
  1292. Sets the server's debugging level to an explicit
  1293. value.
  1294. </para>
  1295. </listitem>
  1296. </varlistentry>
  1297. <varlistentry>
  1298. <term><userinput>notrace</userinput></term>
  1299. <listitem>
  1300. <para>
  1301. Sets the server's debugging level to 0.
  1302. </para>
  1303. </listitem>
  1304. </varlistentry>
  1305. <varlistentry>
  1306. <term><userinput>flush</userinput></term>
  1307. <listitem>
  1308. <para>
  1309. Flushes the server's cache.
  1310. </para>
  1311. </listitem>
  1312. </varlistentry>
  1313. <varlistentry>
  1314. <term><userinput>flushname</userinput> <replaceable>name</replaceable></term>
  1315. <listitem>
  1316. <para>
  1317. Flushes the given name from the server's cache.
  1318. </para>
  1319. </listitem>
  1320. </varlistentry>
  1321. <varlistentry>
  1322. <term><userinput>status</userinput></term>
  1323. <listitem>
  1324. <para>
  1325. Display status of the server.
  1326. Note that the number of zones includes the internal <command>bind/CH</command> zone
  1327. and the default <command>./IN</command>
  1328. hint zone if there is not an
  1329. explicit root zone configured.
  1330. </para>
  1331. </listitem>
  1332. </varlistentry>
  1333. <varlistentry>
  1334. <term><userinput>recursing</userinput></term>
  1335. <listitem>
  1336. <para>
  1337. Dump the list of queries <command>named</command> is currently recursing
  1338. on.
  1339. </para>
  1340. </listitem>
  1341. </varlistentry>
  1342. <varlistentry>
  1343. <term><userinput>validation
  1344. <optional>on|off</optional>
  1345. <optional><replaceable>view ...</replaceable></optional>
  1346. </userinput></term>
  1347. <listitem>
  1348. <para>
  1349. Enable or disable DNSSEC validation.
  1350. Note <command>dnssec-enable</command> also needs to be
  1351. set to <userinput>yes</userinput> to be effective.
  1352. It defaults to enabled.
  1353. </para>
  1354. </listitem>
  1355. </varlistentry>
  1356. <varlistentry>
  1357. <term><userinput>tsig-list</userinput></term>
  1358. <listitem>
  1359. <para>
  1360. List the names of all TSIG keys currently configured
  1361. for use by <command>named</command> in each view. The
  1362. list both statically configured keys and dynamic
  1363. TKEY-negotiated keys.
  1364. </para>
  1365. </listitem>
  1366. </varlistentry>
  1367. <varlistentry>
  1368. <term><userinput>tsig-delete</userinput>
  1369. <replaceable>keyname</replaceable>
  1370. <optional><replaceable>view</replaceable></optional></term>
  1371. <listitem>
  1372. <para>
  1373. Delete a given TKEY-negotated key from the server.
  1374. (This does not apply to statically configured TSIG
  1375. keys.)
  1376. </para>
  1377. </listitem>
  1378. </varlistentry>
  1379. <varlistentry>
  1380. <term><userinput>addzone
  1381. <replaceable>zone</replaceable>
  1382. <optional><replaceable>class</replaceable>
  1383. <optional><replaceable>view</replaceable></optional></optional>
  1384. <replaceable>configuration</replaceable>
  1385. </userinput></term>
  1386. <listitem>
  1387. <para>
  1388. Add a zone while the server is running. This
  1389. command requires the
  1390. <command>allow-new-zones</command> option to be set
  1391. to <userinput>yes</userinput>. The
  1392. <replaceable>configuration</replaceable> string
  1393. specified on the command line is the zone
  1394. configuration text that would ordinarily be
  1395. placed in <filename>named.conf</filename>.
  1396. </para>
  1397. <para>
  1398. The configuration is saved in a file called
  1399. <filename><replaceable>hash</replaceable>.nzf</filename>,
  1400. where <replaceable>hash</replaceable> is a
  1401. cryptographic hash generated from the name of
  1402. the view. When <command>named</command> is
  1403. restarted, the file will be loaded into the view
  1404. configuration, so that zones that were added
  1405. can persist after a restart.
  1406. </para>
  1407. <para>
  1408. This sample <command>addzone</command> command
  1409. would add the zone <literal>example.com</literal>
  1410. to the default view:
  1411. </para>
  1412. <para>
  1413. <prompt>$ </prompt><userinput>rndc addzone example.com '{ type master; file "example.com.db"; };'</userinput>
  1414. </para>
  1415. <para>
  1416. (Note the brackets and semi-colon around the zone
  1417. configuration text.)
  1418. </para>
  1419. </listitem>
  1420. </varlistentry>
  1421. <varlistentry>
  1422. <term><userinput>delzone
  1423. <replaceable>zone</replaceable>
  1424. <optional><replaceable>class</replaceable>
  1425. <optional><replaceable>view</replaceable></optional></optional>
  1426. </userinput></term>
  1427. <listitem>
  1428. <para>
  1429. Delete a zone while the server is running.
  1430. Only zones that were originally added via
  1431. <command>rndc addzone</command> can be deleted
  1432. in this matter.
  1433. </para>
  1434. </listitem>
  1435. </varlistentry>
  1436. </variablelist>
  1437. <para>
  1438. A configuration file is required, since all
  1439. communication with the server is authenticated with
  1440. digital signatures that rely on a shared secret, and
  1441. there is no way to provide that secret other than with a
  1442. configuration file. The default location for the
  1443. <command>rndc</command> configuration file is
  1444. <filename>/etc/rndc.conf</filename>, but an
  1445. alternate
  1446. location can be specified with the <option>-c</option>
  1447. option. If the configuration file is not found,
  1448. <command>rndc</command> will also look in
  1449. <filename>/etc/rndc.key</filename> (or whatever
  1450. <varname>sysconfdir</varname> was defined when
  1451. the <acronym>BIND</acronym> build was
  1452. configured).
  1453. The <filename>rndc.key</filename> file is
  1454. generated by
  1455. running <command>rndc-confgen -a</command> as
  1456. described in
  1457. <xref linkend="controls_statement_definition_and_usage"/>.
  1458. </para>
  1459. <para>
  1460. The format of the configuration file is similar to
  1461. that of <filename>named.conf</filename>, but
  1462. limited to
  1463. only four statements, the <command>options</command>,
  1464. <command>key</command>, <command>server</command> and
  1465. <command>include</command>
  1466. statements. These statements are what associate the
  1467. secret keys to the servers with which they are meant to
  1468. be shared. The order of statements is not
  1469. significant.
  1470. </para>
  1471. <para>
  1472. The <command>options</command> statement has
  1473. three clauses:
  1474. <command>default-server</command>, <command>default-key</command>,
  1475. and <command>default-port</command>.
  1476. <command>default-server</command> takes a
  1477. host name or address argument and represents the server
  1478. that will
  1479. be contacted if no <option>-s</option>
  1480. option is provided on the command line.
  1481. <command>default-key</command> takes
  1482. the name of a key as its argument, as defined by a <command>key</command> statement.
  1483. <command>default-port</command> specifies the
  1484. port to which
  1485. <command>rndc</command> should connect if no
  1486. port is given on the command line or in a
  1487. <command>server</command> statement.
  1488. </para>
  1489. <para>
  1490. The <command>key</command> statement defines a
  1491. key to be used
  1492. by <command>rndc</command> when authenticating
  1493. with
  1494. <command>named</command>. Its syntax is
  1495. identical to the
  1496. <command>key</command> statement in <filename>named.conf</filename>.
  1497. The keyword <userinput>key</userinput> is
  1498. followed by a key name, which must be a valid
  1499. domain name, though it need not actually be hierarchical;
  1500. thus,
  1501. a string like "<userinput>rndc_key</userinput>" is a valid
  1502. name.
  1503. The <command>key</command> statement has two
  1504. clauses:
  1505. <command>algorithm</command> and <command>secret</command>.
  1506. While the configuration parser will accept any string as the
  1507. argument
  1508. to algorithm, currently only the string "<userinput>hmac-md5</userinput>"
  1509. has any meaning. The secret is a base-64 encoded string
  1510. as specified in RFC 3548.
  1511. </para>
  1512. <para>
  1513. The <command>server</command> statement
  1514. associates a key
  1515. defined using the <command>key</command>
  1516. statement with a server.
  1517. The keyword <userinput>server</userinput> is followed by a
  1518. host name or address. The <command>server</command> statement
  1519. has two clauses: <command>key</command> and <command>port</command>.
  1520. The <command>key</command> clause specifies the
  1521. name of the key
  1522. to be used when communicating with this server, and the
  1523. <command>port</command> clause can be used to
  1524. specify the port <command>rndc</command> should
  1525. connect
  1526. to on the server.
  1527. </para>
  1528. <para>
  1529. A sample minimal configuration file is as follows:
  1530. </para>
  1531. <programlisting>
  1532. key rndc_key {
  1533. algorithm "hmac-md5";
  1534. secret
  1535. "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
  1536. };
  1537. options {
  1538. default-server 127.0.0.1;
  1539. default-key rndc_key;
  1540. };
  1541. </programlisting>
  1542. <para>
  1543. This file, if installed as <filename>/etc/rndc.conf</filename>,
  1544. would allow the command:
  1545. </para>
  1546. <para>
  1547. <prompt>$ </prompt><userinput>rndc reload</userinput>
  1548. </para>
  1549. <para>
  1550. to connect to 127.0.0.1 port 953 and cause the name server
  1551. to reload, if a name server on the local machine were
  1552. running with
  1553. following controls statements:
  1554. </para>
  1555. <programlisting>
  1556. controls {
  1557. inet 127.0.0.1
  1558. allow { localhost; } keys { rndc_key; };
  1559. };
  1560. </programlisting>
  1561. <para>
  1562. and it had an identical key statement for
  1563. <literal>rndc_key</literal>.
  1564. </para>
  1565. <para>
  1566. Running the <command>rndc-confgen</command>
  1567. program will
  1568. conveniently create a <filename>rndc.conf</filename>
  1569. file for you, and also display the
  1570. corresponding <command>controls</command>
  1571. statement that you need to
  1572. add to <filename>named.conf</filename>.
  1573. Alternatively,
  1574. you can run <command>rndc-confgen -a</command>
  1575. to set up
  1576. a <filename>rndc.key</filename> file and not
  1577. modify
  1578. <filename>named.conf</filename> at all.
  1579. </para>
  1580. </listitem>
  1581. </varlistentry>
  1582. </variablelist>
  1583. </sect3>
  1584. </sect2>
  1585. <sect2>
  1586. <title>Signals</title>
  1587. <para>
  1588. Certain UNIX signals cause the name server to take specific
  1589. actions, as described in the following table. These signals can
  1590. be sent using the <command>kill</command> command.
  1591. </para>
  1592. <informaltable frame="all">
  1593. <tgroup cols="2">
  1594. <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
  1595. <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
  1596. <tbody>
  1597. <row rowsep="0">
  1598. <entry colname="1">
  1599. <para><command>SIGHUP</command></para>
  1600. </entry>
  1601. <entry colname="2">
  1602. <para>
  1603. Causes the server to read <filename>named.conf</filename> and
  1604. reload the database.
  1605. </para>
  1606. </entry>
  1607. </row>
  1608. <row rowsep="0">
  1609. <entry colname="1">
  1610. <para><command>SIGTERM</command></para>
  1611. </entry>
  1612. <entry colname="2">
  1613. <para>
  1614. Causes the server to clean up and exit.
  1615. </para>
  1616. </entry>
  1617. </row>
  1618. <row rowsep="0">
  1619. <entry colname="1">
  1620. <para><command>SIGINT</command></para>
  1621. </entry>
  1622. <entry colname="2">
  1623. <para>
  1624. Causes the server to clean up and exit.
  1625. </para>
  1626. </entry>
  1627. </row>
  1628. </tbody>
  1629. </tgroup>
  1630. </informaltable>
  1631. </sect2>
  1632. </sect1>
  1633. </chapter>
  1634. <chapter id="Bv9ARM.ch04">
  1635. <title>Advanced DNS Features</title>
  1636. <sect1 id="notify">
  1637. <title>Notify</title>
  1638. <para>
  1639. <acronym>DNS</acronym> NOTIFY is a mechanism that allows master
  1640. servers to notify their slave servers of changes to a zone's data. In
  1641. response to a <command>NOTIFY</command> from a master server, the
  1642. slave will check to see that its version of the zone is the
  1643. current version and, if not, initiate a zone transfer.
  1644. </para>
  1645. <para>
  1646. For more information about <acronym>DNS</acronym>
  1647. <command>NOTIFY</command>, see the description of the
  1648. <command>notify</command> option in <xref linkend="boolean_options"/> and
  1649. the description of the zone option <command>also-notify</command> in
  1650. <xref linkend="zone_transfers"/>. The <command>NOTIFY</command>
  1651. protocol is specified in RFC 1996.
  1652. </para>
  1653. <note>
  1654. As a slave zone can also be a master to other slaves, <command>named</command>,
  1655. by default, sends <command>NOTIFY</command> messages for every zone
  1656. it loads. Specifying <command>notify master-only;</command> will
  1657. cause <command>named</command> to only send <command>NOTIFY</command> for master
  1658. zones that it loads.
  1659. </note>
  1660. </sect1>
  1661. <sect1 id="dynamic_update">
  1662. <title>Dynamic Update</title>
  1663. <para>
  1664. Dynamic Update is a method for adding, replacing or deleting
  1665. records in a master server by sending it a special form of DNS
  1666. messages. The format and meaning of these messages is specified
  1667. in RFC 2136.
  1668. </para>
  1669. <para>
  1670. Dynamic update is enabled by including an
  1671. <command>allow-update</command> or an <command>update-policy</command>
  1672. clause in the <command>zone</command> statement.
  1673. </para>
  1674. <para>
  1675. If the zone's <command>update-policy</command> is set to
  1676. <userinput>local</userinput>, updates to the zone
  1677. will be permitted for the key <varname>local-ddns</varname>,
  1678. which will be generated by <command>named</command> at startup.
  1679. See <xref linkend="dynamic_update_policies"/> for more details.
  1680. </para>
  1681. <para>
  1682. Dynamic updates using Kerberos signed requests can be made
  1683. using the TKEY/GSS protocol by setting either the
  1684. <command>tkey-gssapi-keytab</command> option, or alternatively
  1685. by setting both the <command>tkey-gssapi-credential</command>
  1686. and <command>tkey-domain</command> options. Once enabled,
  1687. Kerberos signed requests will be matched against the update
  1688. policies for the zone, using the Kerberos principal as the
  1689. signer for the request.
  1690. </para>
  1691. <para>
  1692. Updating of secure zones (zones using DNSSEC) follows RFC
  1693. 3007: RRSIG, NSEC and NSEC3 records affected by updates are
  1694. automatically regenerated by the server using an online
  1695. zone key. Update authorization is based on transaction
  1696. signatures and an explicit server policy.
  1697. </para>
  1698. <sect2 id="journal">
  1699. <title>The journal file</title>
  1700. <para>
  1701. All changes made to a zone using dynamic update are stored
  1702. in the zone's journal file. This file is automatically created
  1703. by the server when the first dynamic update takes place.
  1704. The name of the journal file is formed by appending the extension
  1705. <filename>.jnl</filename> to the name of the
  1706. corresponding zone
  1707. file unless specifically overridden. The journal file is in a
  1708. binary format and should not be edited manually.
  1709. </para>
  1710. <para>
  1711. The server will also occasionally write ("dump")
  1712. the complete contents of the updated zone to its zone file.
  1713. This is not done immediately after
  1714. each dynamic update, because that would be too slow when a large
  1715. zone is updated frequently. Instead, the dump is delayed by
  1716. up to 15 minutes, allowing additional updates to take place.
  1717. During the dump process, transient files will be created
  1718. with the extensions <filename>.jnw</filename> and
  1719. <filename>.jbk</filename>; under ordinary circumstances, these
  1720. will be removed when the dump is complete, and can be safely
  1721. ignored.
  1722. </para>
  1723. <para>
  1724. When a server is restarted after a shutdown or crash, it will replay
  1725. the journal file to incorporate into the zone any updates that
  1726. took
  1727. place after the last zone dump.
  1728. </para>
  1729. <para>
  1730. Changes that result from incoming incremental zone transfers are
  1731. also
  1732. journalled in a similar way.
  1733. </para>
  1734. <para>
  1735. The zone files of dynamic zones cannot normally be edited by
  1736. hand because they are not guaranteed to contain the most recent
  1737. dynamic changes &mdash; those are only in the journal file.
  1738. The only way to ensure that the zone file of a dynamic zone
  1739. is up to date is to run <command>rndc stop</command>.
  1740. </para>
  1741. <para>
  1742. If you have to make changes to a dynamic zone
  1743. manually, the following procedure will work: Disable dynamic updates
  1744. to the zone using
  1745. <command>rndc freeze <replaceable>zone</replaceable></command>.
  1746. This will also remove the zone's <filename>.jnl</filename> file
  1747. and update the master file. Edit the zone file. Run
  1748. <command>rndc thaw <replaceable>zone</replaceable></command>
  1749. to reload the changed zone and re-enable dynamic updates.
  1750. </para>
  1751. </sect2>
  1752. </sect1>
  1753. <sect1 id="incremental_zone_transfers">
  1754. <title>Incremental Zone Transfers (IXFR)</title>
  1755. <para>
  1756. The incremental zone transfer (IXFR) protocol is a way for
  1757. slave servers to transfer only changed data, instead of having to
  1758. transfer the entire zone. The IXFR protocol is specified in RFC
  1759. 1995. See <xref linkend="proposed_standards"/>.
  1760. </para>
  1761. <para>
  1762. When acting as a master, <acronym>BIND</acronym> 9
  1763. supports IXFR for those zones
  1764. where the necessary change history information is available. These
  1765. include master zones maintained by dynamic update and slave zones
  1766. whose data was obtained by IXFR. For manually maintained master
  1767. zones, and for slave zones obtained by performing a full zone
  1768. transfer (AXFR), IXFR is supported only if the option
  1769. <command>ixfr-from-differences</command> is set
  1770. to <userinput>yes</userinput>.
  1771. </para>
  1772. <para>
  1773. When acting as a slave, <acronym>BIND</acronym> 9 will attempt
  1774. to use IXFR unless it is explicitly disabled via the
  1775. <command>request-ixfr</command> option or the use of
  1776. <command>ixfr-from-differences</command>. For
  1777. more information about disabling IXFR, see the description
  1778. of the <command>request-ixfr</command> clause of the
  1779. <command>server</command> statement.
  1780. </para>
  1781. </sect1>
  1782. <sect1>
  1783. <title>Split DNS</title>
  1784. <para>
  1785. Setting up different views, or visibility, of the DNS space to
  1786. internal and external resolvers is usually referred to as a
  1787. <emphasis>Split DNS</emphasis> setup. There are several
  1788. reasons an organization would want to set up its DNS this way.
  1789. </para>
  1790. <para>
  1791. One common reason for setting up a DNS system this way is
  1792. to hide "internal" DNS information from "external" clients on the
  1793. Internet. There is some debate as to whether or not this is actually
  1794. useful.
  1795. Internal DNS information leaks out in many ways (via email headers,
  1796. for example) and most savvy "attackers" can find the information
  1797. they need using other means.
  1798. However, since listing addresses of internal servers that
  1799. external clients cannot possibly reach can result in
  1800. connection delays and other annoyances, an organization may
  1801. choose to use a Split DNS to present a consistent view of itself
  1802. to the outside world.
  1803. </para>
  1804. <para>
  1805. Another common reason for setting up a Split DNS system is
  1806. to allow internal networks that are behind filters or in RFC 1918
  1807. space (reserved IP space, as documented in RFC 1918) to resolve DNS
  1808. on the Internet. Split DNS can also be used to allow mail from outside
  1809. back in to the internal network.
  1810. </para>
  1811. <sect2>
  1812. <title>Example split DNS setup</title>
  1813. <para>
  1814. Let's say a company named <emphasis>Example, Inc.</emphasis>
  1815. (<literal>example.com</literal>)
  1816. has several corporate sites that have an internal network with
  1817. reserved
  1818. Internet Protocol (IP) space and an external demilitarized zone (DMZ),
  1819. or "outside" section of a network, that is available to the public.
  1820. </para>
  1821. <para>
  1822. <emphasis>Example, Inc.</emphasis> wants its internal clients
  1823. to be able to resolve external hostnames and to exchange mail with
  1824. people on the outside. The company also wants its internal resolvers
  1825. to have access to certain internal-only zones that are not available
  1826. at all outside of the internal network.
  1827. </para>
  1828. <para>
  1829. In order to accomplish this, the company will set up two sets
  1830. of name servers. One set will be on the inside network (in the
  1831. reserved
  1832. IP space) and the other set will be on bastion hosts, which are
  1833. "proxy"
  1834. hosts that can talk to both sides of its network, in the DMZ.
  1835. </para>
  1836. <para>
  1837. The internal servers will be configured to forward all queries,
  1838. except queries for <filename>site1.internal</filename>, <filename>site2.internal</filename>, <filename>site1.example.com</filename>,
  1839. and <filename>site2.example.com</filename>, to the servers
  1840. in the
  1841. DMZ. These internal servers will have complete sets of information
  1842. for <filename>site1.example.com</filename>, <filename>site2.example.com</filename>, <filename>site1.internal</filename>,
  1843. and <filename>site2.internal</filename>.
  1844. </para>
  1845. <para>
  1846. To protect the <filename>site1.internal</filename> and <filename>site2.internal</filename> domains,
  1847. the internal name servers must be configured to disallow all queries
  1848. to these domains from any external hosts, including the bastion
  1849. hosts.
  1850. </para>
  1851. <para>
  1852. The external servers, which are on the bastion hosts, will
  1853. be configured to serve the "public" version of the <filename>site1</filename> and <filename>site2.example.com</filename> zones.
  1854. This could include things such as the host records for public servers
  1855. (<filename>www.example.com</filename> and <filename>ftp.example.com</filename>),
  1856. and mail exchange (MX) records (<filename>a.mx.example.com</filename> and <filename>b.mx.example.com</filename>).
  1857. </para>
  1858. <para>
  1859. In addition, the public <filename>site1</filename> and <filename>site2.example.com</filename> zones
  1860. should have special MX records that contain wildcard (`*') records
  1861. pointing to the bastion hosts. This is needed because external mail
  1862. servers do not have any other way of looking up how to deliver mail
  1863. to those internal hosts. With the wildcard records, the mail will
  1864. be delivered to the bastion host, which can then forward it on to
  1865. internal hosts.
  1866. </para>
  1867. <para>
  1868. Here's an example of a wildcard MX record:
  1869. </para>
  1870. <programlisting>* IN MX 10 external1.example.com.</programlisting>
  1871. <para>
  1872. Now that they accept mail on behalf of anything in the internal
  1873. network, the bastion hosts will need to know how to deliver mail
  1874. to internal hosts. In order for this to work properly, the resolvers
  1875. on
  1876. the bastion hosts will need to be configured to point to the internal
  1877. name servers for DNS resolution.
  1878. </para>
  1879. <para>
  1880. Queries for internal hostnames will be answered by the internal
  1881. servers, and queries for external hostnames will be forwarded back
  1882. out to the DNS servers on the bastion hosts.
  1883. </para>
  1884. <para>
  1885. In order for all this to work properly, internal clients will
  1886. need to be configured to query <emphasis>only</emphasis> the internal
  1887. name servers for DNS queries. This could also be enforced via
  1888. selective
  1889. filtering on the network.
  1890. </para>
  1891. <para>
  1892. If everything has been set properly, <emphasis>Example, Inc.</emphasis>'s
  1893. internal clients will now be able to:
  1894. </para>
  1895. <itemizedlist>
  1896. <listitem>
  1897. <simpara>
  1898. Look up any hostnames in the <literal>site1</literal>
  1899. and
  1900. <literal>site2.example.com</literal> zones.
  1901. </simpara>
  1902. </listitem>
  1903. <listitem>
  1904. <simpara>
  1905. Look up any hostnames in the <literal>site1.internal</literal> and
  1906. <literal>site2.internal</literal> domains.
  1907. </simpara>
  1908. </listitem>
  1909. <listitem>
  1910. <simpara>Look up any hostnames on the Internet.</simpara>
  1911. </listitem>
  1912. <listitem>
  1913. <simpara>Exchange mail with both internal and external people.</simpara>
  1914. </listitem>
  1915. </itemizedlist>
  1916. <para>
  1917. Hosts on the Internet will be able to:
  1918. </para>
  1919. <itemizedlist>
  1920. <listitem>
  1921. <simpara>
  1922. Look up any hostnames in the <literal>site1</literal>
  1923. and
  1924. <literal>site2.example.com</literal> zones.
  1925. </simpara>
  1926. </listitem>
  1927. <listitem>
  1928. <simpara>
  1929. Exchange mail with anyone in the <literal>site1</literal> and
  1930. <literal>site2.example.com</literal> zones.
  1931. </simpara>
  1932. </listitem>
  1933. </itemizedlist>
  1934. <para>
  1935. Here is an example configuration for the setup we just
  1936. described above. Note that this is only configuration information;
  1937. for information on how to configure your zone files, see <xref linkend="sample_configuration"/>.
  1938. </para>
  1939. <para>
  1940. Internal DNS server config:
  1941. </para>
  1942. <programlisting>
  1943. acl internals { 172.16.72.0/24; 192.168.1.0/24; };
  1944. acl externals { <varname>bastion-ips-go-here</varname>; };
  1945. options {
  1946. ...
  1947. ...
  1948. forward only;
  1949. // forward to external servers
  1950. forwarders {
  1951. <varname>bastion-ips-go-here</varname>;
  1952. };
  1953. // sample allow-transfer (no one)
  1954. allow-transfer { none; };
  1955. // restrict query access
  1956. allow-query { internals; externals; };
  1957. // restrict recursion
  1958. allow-recursion { internals; };
  1959. ...
  1960. ...
  1961. };
  1962. // sample master zone
  1963. zone "site1.example.com" {
  1964. type master;
  1965. file "m/site1.example.com";
  1966. // do normal iterative resolution (do not forward)
  1967. forwarders { };
  1968. allow-query { internals; externals; };
  1969. allow-transfer { internals; };
  1970. };
  1971. // sample slave zone
  1972. zone "site2.example.com" {
  1973. type slave;
  1974. file "s/site2.example.com";
  1975. masters { 172.16.72.3; };
  1976. forwarders { };
  1977. allow-query { internals; externals; };
  1978. allow-transfer { internals; };
  1979. };
  1980. zone "site1.internal" {
  1981. type master;
  1982. file "m/site1.internal";
  1983. forwarders { };
  1984. allow-query { internals; };
  1985. allow-transfer { internals; }
  1986. };
  1987. zone "site2.internal" {
  1988. type slave;
  1989. file "s/site2.internal";
  1990. masters { 172.16.72.3; };
  1991. forwarders { };
  1992. allow-query { internals };
  1993. allow-transfer { internals; }
  1994. };
  1995. </programlisting>
  1996. <para>
  1997. External (bastion host) DNS server config:
  1998. </para>
  1999. <programlisting>
  2000. acl internals { 172.16.72.0/24; 192.168.1.0/24; };
  2001. acl externals { bastion-ips-go-here; };
  2002. options {
  2003. ...
  2004. ...
  2005. // sample allow-transfer (no one)
  2006. allow-transfer { none; };
  2007. // default query access
  2008. allow-query { any; };
  2009. // restrict cache access
  2010. allow-query-cache { internals; externals; };
  2011. // restrict recursion
  2012. allow-recursion { internals; externals; };
  2013. ...
  2014. ...
  2015. };
  2016. // sample slave zone
  2017. zone "site1.example.com" {
  2018. type master;
  2019. file "m/site1.foo.com";
  2020. allow-transfer { internals; externals; };
  2021. };
  2022. zone "site2.example.com" {
  2023. type slave;
  2024. file "s/site2.foo.com";
  2025. masters { another_bastion_host_maybe; };
  2026. allow-transfer { internals; externals; }
  2027. };
  2028. </programlisting>
  2029. <para>
  2030. In the <filename>resolv.conf</filename> (or equivalent) on
  2031. the bastion host(s):
  2032. </para>
  2033. <programlisting>
  2034. search ...
  2035. nameserver 172.16.72.2
  2036. nameserver 172.16.72.3
  2037. nameserver 172.16.72.4
  2038. </programlisting>
  2039. </sect2>
  2040. </sect1>
  2041. <sect1 id="tsig">
  2042. <title>TSIG</title>
  2043. <para>
  2044. This is a short guide to setting up Transaction SIGnatures
  2045. (TSIG) based transaction security in <acronym>BIND</acronym>. It describes changes
  2046. to the configuration file as well as what changes are required for
  2047. different features, including the process of creating transaction
  2048. keys and using transaction signatures with <acronym>BIND</acronym>.
  2049. </para>
  2050. <para>
  2051. <acronym>BIND</acronym> primarily supports TSIG for server
  2052. to server communication.
  2053. This includes zone transfer, notify, and recursive query messages.
  2054. Resolvers based on newer versions of <acronym>BIND</acronym> 8 have limited support
  2055. for TSIG.
  2056. </para>
  2057. <para>
  2058. TSIG can also be useful for dynamic update. A primary
  2059. server for a dynamic zone should control access to the dynamic
  2060. update service, but IP-based access control is insufficient.
  2061. The cryptographic access control provided by TSIG
  2062. is far superior. The <command>nsupdate</command>
  2063. program supports TSIG via the <option>-k</option> and
  2064. <option>-y</option> command line options or inline by use
  2065. of the <command>key</command>.
  2066. </para>
  2067. <sect2>
  2068. <title>Generate Shared Keys for Each Pair of Hosts</title>
  2069. <para>
  2070. A shared secret is generated to be shared between <emphasis>host1</emphasis> and <emphasis>host2</emphasis>.
  2071. An arbitrary key name is chosen: "host1-host2.". The key name must
  2072. be the same on both hosts.
  2073. </para>
  2074. <sect3>
  2075. <title>Automatic Generation</title>
  2076. <para>
  2077. The following command will generate a 128-bit (16 byte) HMAC-SHA256
  2078. key as described above. Longer keys are better, but shorter keys
  2079. are easier to read. Note that the maximum key length is the digest
  2080. length, here 256 bits.
  2081. </para>
  2082. <para>
  2083. <userinput>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</userinput>
  2084. </para>
  2085. <para>
  2086. The key is in the file <filename>Khost1-host2.+163+00000.private</filename>.
  2087. Nothing directly uses this file, but the base-64 encoded string
  2088. following "<literal>Key:</literal>"
  2089. can be extracted from the file and used as a shared secret:
  2090. </para>
  2091. <programlisting>Key: La/E5CjG9O+os1jq0a2jdA==</programlisting>
  2092. <para>
  2093. The string "<literal>La/E5CjG9O+os1jq0a2jdA==</literal>" can
  2094. be used as the shared secret.
  2095. </para>
  2096. </sect3>
  2097. <sect3>
  2098. <title>Manual Generation</title>
  2099. <para>
  2100. The shared secret is simply a random sequence of bits, encoded
  2101. in base-64. Most ASCII strings are valid base-64 strings (assuming
  2102. the length is a multiple of 4 and only valid characters are used),
  2103. so the shared secret can be manually generated.
  2104. </para>
  2105. <para>
  2106. Also, a known string can be run through <command>mmencode</command> or
  2107. a similar program to generate base-64 encoded data.
  2108. </para>
  2109. </sect3>
  2110. </sect2>
  2111. <sect2>
  2112. <title>Copying the Shared Secret to Both Machines</title>
  2113. <para>
  2114. This is beyond the scope of DNS. A secure transport mechanism
  2115. should be used. This could be secure FTP, ssh, telephone, etc.
  2116. </para>
  2117. </sect2>
  2118. <sect2>
  2119. <title>Informing the Servers of the Key's Existence</title>
  2120. <para>
  2121. Imagine <emphasis>host1</emphasis> and <emphasis>host 2</emphasis>
  2122. are
  2123. both servers. The following is added to each server's <filename>named.conf</filename> file:
  2124. </para>
  2125. <programlisting>
  2126. key host1-host2. {
  2127. algorithm hmac-sha256;
  2128. secret "La/E5CjG9O+os1jq0a2jdA==";
  2129. };
  2130. </programlisting>
  2131. <para>
  2132. The secret is the one generated above. Since this is a secret, it
  2133. is recommended that either <filename>named.conf</filename> be
  2134. non-world readable, or the key directive be added to a non-world
  2135. readable file that is included by <filename>named.conf</filename>.
  2136. </para>
  2137. <para>
  2138. At this point, the key is recognized. This means that if the
  2139. server receives a message signed by this key, it can verify the
  2140. signature. If the signature is successfully verified, the
  2141. response is signed by the same key.
  2142. </para>
  2143. </sect2>
  2144. <sect2>
  2145. <title>Instructing the Server to Use the Key</title>
  2146. <para>
  2147. Since keys are shared between two hosts only, the server must
  2148. be told when keys are to be used. The following is added to the <filename>named.conf</filename> file
  2149. for <emphasis>host1</emphasis>, if the IP address of <emphasis>host2</emphasis> is
  2150. 10.1.2.3:
  2151. </para>
  2152. <programlisting>
  2153. server 10.1.2.3 {
  2154. keys { host1-host2. ;};
  2155. };
  2156. </programlisting>
  2157. <para>
  2158. Multiple keys may be present, but only the first is used.
  2159. This directive does not contain any secrets, so it may be in a
  2160. world-readable
  2161. file.
  2162. </para>
  2163. <para>
  2164. If <emphasis>host1</emphasis> sends a message that is a request
  2165. to that address, the message will be signed with the specified key. <emphasis>host1</emphasis> will
  2166. expect any responses to signed messages to be signed with the same
  2167. key.
  2168. </para>
  2169. <para>
  2170. A similar statement must be present in <emphasis>host2</emphasis>'s
  2171. configuration file (with <emphasis>host1</emphasis>'s address) for <emphasis>host2</emphasis> to
  2172. sign request messages to <emphasis>host1</emphasis>.
  2173. </para>
  2174. </sect2>
  2175. <sect2>
  2176. <title>TSIG Key Based Access Control</title>
  2177. <para>
  2178. <acronym>BIND</acronym> allows IP addresses and ranges
  2179. to be specified in ACL
  2180. definitions and
  2181. <command>allow-{ query | transfer | update }</command>
  2182. directives.
  2183. This has been extended to allow TSIG keys also. The above key would
  2184. be denoted <command>key host1-host2.</command>
  2185. </para>
  2186. <para>
  2187. An example of an <command>allow-update</command> directive would be:
  2188. </para>
  2189. <programlisting>
  2190. allow-update { key host1-host2. ;};
  2191. </programlisting>
  2192. <para>
  2193. This allows dynamic updates to succeed only if the request
  2194. was signed by a key named "<command>host1-host2.</command>".
  2195. </para>
  2196. <para>
  2197. See <xref linkend="dynamic_update_policies"/> for a discussion of
  2198. the more flexible <command>update-policy</command> statement.
  2199. </para>
  2200. </sect2>
  2201. <sect2>
  2202. <title>Errors</title>
  2203. <para>
  2204. The processing of TSIG signed messages can result in
  2205. several errors. If a signed message is sent to a non-TSIG aware
  2206. server, a FORMERR (format error) will be returned, since the server will not
  2207. understand the record. This is a result of misconfiguration,
  2208. since the server must be explicitly configured to send a TSIG
  2209. signed message to a specific server.
  2210. </para>
  2211. <para>
  2212. If a TSIG aware server receives a message signed by an
  2213. unknown key, the response will be unsigned with the TSIG
  2214. extended error code set to BADKEY. If a TSIG aware server
  2215. receives a message with a signature that does not validate, the
  2216. response will be unsigned with the TSIG extended error code set
  2217. to BADSIG. If a TSIG aware server receives a message with a time
  2218. outside of the allowed range, the response will be signed with
  2219. the TSIG extended error code set to BADTIME, and the time values
  2220. will be adjusted so that the response can be successfully
  2221. verified. In any of these cases, the message's rcode (response code) is set to
  2222. NOTAUTH (not authenticated).
  2223. </para>
  2224. </sect2>
  2225. </sect1>
  2226. <sect1>
  2227. <title>TKEY</title>
  2228. <para><command>TKEY</command>
  2229. is a mechanism for automatically generating a shared secret
  2230. between two hosts. There are several "modes" of
  2231. <command>TKEY</command> that specify how the key is generated
  2232. or assigned. <acronym>BIND</acronym> 9 implements only one of
  2233. these modes, the Diffie-Hellman key exchange. Both hosts are
  2234. required to have a Diffie-Hellman KEY record (although this
  2235. record is not required to be present in a zone). The
  2236. <command>TKEY</command> process must use signed messages,
  2237. signed either by TSIG or SIG(0). The result of
  2238. <command>TKEY</command> is a shared secret that can be used to
  2239. sign messages with TSIG. <command>TKEY</command> can also be
  2240. used to delete shared secrets that it had previously
  2241. generated.
  2242. </para>
  2243. <para>
  2244. The <command>TKEY</command> process is initiated by a
  2245. client
  2246. or server by sending a signed <command>TKEY</command>
  2247. query
  2248. (including any appropriate KEYs) to a TKEY-aware server. The
  2249. server response, if it indicates success, will contain a
  2250. <command>TKEY</command> record and any appropriate keys.
  2251. After
  2252. this exchange, both participants have enough information to
  2253. determine the shared secret; the exact process depends on the
  2254. <command>TKEY</command> mode. When using the
  2255. Diffie-Hellman
  2256. <command>TKEY</command> mode, Diffie-Hellman keys are
  2257. exchanged,
  2258. and the shared secret is derived by both participants.
  2259. </para>
  2260. </sect1>
  2261. <sect1>
  2262. <title>SIG(0)</title>
  2263. <para>
  2264. <acronym>BIND</acronym> 9 partially supports DNSSEC SIG(0)
  2265. transaction signatures as specified in RFC 2535 and RFC 2931.
  2266. SIG(0)
  2267. uses public/private keys to authenticate messages. Access control
  2268. is performed in the same manner as TSIG keys; privileges can be
  2269. granted or denied based on the key name.
  2270. </para>
  2271. <para>
  2272. When a SIG(0) signed message is received, it will only be
  2273. verified if the key is known and trusted by the server; the server
  2274. will not attempt to locate and/or validate the key.
  2275. </para>
  2276. <para>
  2277. SIG(0) signing of multiple-message TCP streams is not
  2278. supported.
  2279. </para>
  2280. <para>
  2281. The only tool shipped with <acronym>BIND</acronym> 9 that
  2282. generates SIG(0) signed messages is <command>nsupdate</command>.
  2283. </para>
  2284. </sect1>
  2285. <sect1 id="DNSSEC">
  2286. <title>DNSSEC</title>
  2287. <para>
  2288. Cryptographic authentication of DNS information is possible
  2289. through the DNS Security (<emphasis>DNSSEC-bis</emphasis>) extensions,
  2290. defined in RFC 4033, RFC 4034, and RFC 4035.
  2291. This section describes the creation and use of DNSSEC signed zones.
  2292. </para>
  2293. <para>
  2294. In order to set up a DNSSEC secure zone, there are a series
  2295. of steps which must be followed. <acronym>BIND</acronym>
  2296. 9 ships
  2297. with several tools
  2298. that are used in this process, which are explained in more detail
  2299. below. In all cases, the <option>-h</option> option prints a
  2300. full list of parameters. Note that the DNSSEC tools require the
  2301. keyset files to be in the working directory or the
  2302. directory specified by the <option>-d</option> option, and
  2303. that the tools shipped with BIND 9.2.x and earlier are not compatible
  2304. with the current ones.
  2305. </para>
  2306. <para>
  2307. There must also be communication with the administrators of
  2308. the parent and/or child zone to transmit keys. A zone's security
  2309. status must be indicated by the parent zone for a DNSSEC capable
  2310. resolver to trust its data. This is done through the presence
  2311. or absence of a <literal>DS</literal> record at the
  2312. delegation
  2313. point.
  2314. </para>
  2315. <para>
  2316. For other servers to trust data in this zone, they must
  2317. either be statically configured with this zone's zone key or the
  2318. zone key of another zone above this one in the DNS tree.
  2319. </para>
  2320. <sect2>
  2321. <title>Generating Keys</title>
  2322. <para>
  2323. The <command>dnssec-keygen</command> program is used to
  2324. generate keys.
  2325. </para>
  2326. <para>
  2327. A secure zone must contain one or more zone keys. The
  2328. zone keys will sign all other records in the zone, as well as
  2329. the zone keys of any secure delegated zones. Zone keys must
  2330. have the same name as the zone, a name type of
  2331. <command>ZONE</command>, and must be usable for
  2332. authentication.
  2333. It is recommended that zone keys use a cryptographic algorithm
  2334. designated as "mandatory to implement" by the IETF; currently
  2335. the only one is RSASHA1.
  2336. </para>
  2337. <para>
  2338. The following command will generate a 768-bit RSASHA1 key for
  2339. the <filename>child.example</filename> zone:
  2340. </para>
  2341. <para>
  2342. <userinput>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</userinput>
  2343. </para>
  2344. <para>
  2345. Two output files will be produced:
  2346. <filename>Kchild.example.+005+12345.key</filename> and
  2347. <filename>Kchild.example.+005+12345.private</filename>
  2348. (where
  2349. 12345 is an example of a key tag). The key filenames contain
  2350. the key name (<filename>child.example.</filename>),
  2351. algorithm (3
  2352. is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
  2353. this case).
  2354. The private key (in the <filename>.private</filename>
  2355. file) is
  2356. used to generate signatures, and the public key (in the
  2357. <filename>.key</filename> file) is used for signature
  2358. verification.
  2359. </para>
  2360. <para>
  2361. To generate another key with the same properties (but with
  2362. a different key tag), repeat the above command.
  2363. </para>
  2364. <para>
  2365. The <command>dnssec-keyfromlabel</command> program is used
  2366. to get a key pair from a crypto hardware and build the key
  2367. files. Its usage is similar to <command>dnssec-keygen</command>.
  2368. </para>
  2369. <para>
  2370. The public keys should be inserted into the zone file by
  2371. including the <filename>.key</filename> files using
  2372. <command>$INCLUDE</command> statements.
  2373. </para>
  2374. </sect2>
  2375. <sect2>
  2376. <title>Signing the Zone</title>
  2377. <para>
  2378. The <command>dnssec-signzone</command> program is used
  2379. to sign a zone.
  2380. </para>
  2381. <para>
  2382. Any <filename>keyset</filename> files corresponding to
  2383. secure subzones should be present. The zone signer will
  2384. generate <literal>NSEC</literal>, <literal>NSEC3</literal>
  2385. and <literal>RRSIG</literal> records for the zone, as
  2386. well as <literal>DS</literal> for the child zones if
  2387. <literal>'-g'</literal> is specified. If <literal>'-g'</literal>
  2388. is not specified, then DS RRsets for the secure child
  2389. zones need to be added manually.
  2390. </para>
  2391. <para>
  2392. The following command signs the zone, assuming it is in a
  2393. file called <filename>zone.child.example</filename>. By
  2394. default, all zone keys which have an available private key are
  2395. used to generate signatures.
  2396. </para>
  2397. <para>
  2398. <userinput>dnssec-signzone -o child.example zone.child.example</userinput>
  2399. </para>
  2400. <para>
  2401. One output file is produced:
  2402. <filename>zone.child.example.signed</filename>. This
  2403. file
  2404. should be referenced by <filename>named.conf</filename>
  2405. as the
  2406. input file for the zone.
  2407. </para>
  2408. <para><command>dnssec-signzone</command>
  2409. will also produce a keyset and dsset files and optionally a
  2410. dlvset file. These are used to provide the parent zone
  2411. administrators with the <literal>DNSKEYs</literal> (or their
  2412. corresponding <literal>DS</literal> records) that are the
  2413. secure entry point to the zone.
  2414. </para>
  2415. </sect2>
  2416. <sect2>
  2417. <title>Configuring Servers</title>
  2418. <para>
  2419. To enable <command>named</command> to respond appropriately
  2420. to DNS requests from DNSSEC aware clients,
  2421. <command>dnssec-enable</command> must be set to yes.
  2422. (This is the default setting.)
  2423. </para>
  2424. <para>
  2425. To enable <command>named</command> to validate answers from
  2426. other servers, the <command>dnssec-enable</command> option
  2427. must be set to <userinput>yes</userinput>, and the
  2428. <command>dnssec-validation</command> options must be set to
  2429. <userinput>yes</userinput> or <userinput>auto</userinput>.
  2430. </para>
  2431. <para>
  2432. If <command>dnssec-validation</command> is set to
  2433. <userinput>auto</userinput>, then a default
  2434. trust anchor for the DNS root zone will be used.
  2435. If it is set to <userinput>yes</userinput>, however,
  2436. then at least one trust anchor must be configured
  2437. with a <command>trusted-keys</command> or
  2438. <command>managed-keys</command> statement in
  2439. <filename>named.conf</filename>, or DNSSEC validation
  2440. will not occur. The default setting is
  2441. <userinput>yes</userinput>.
  2442. </para>
  2443. <para>
  2444. <command>trusted-keys</command> are copies of DNSKEY RRs
  2445. for zones that are used to form the first link in the
  2446. cryptographic chain of trust. All keys listed in
  2447. <command>trusted-keys</command> (and corresponding zones)
  2448. are deemed to exist and only the listed keys will be used
  2449. to validated the DNSKEY RRset that they are from.
  2450. </para>
  2451. <para>
  2452. <command>managed-keys</command> are trusted keys which are
  2453. automatically kept up to date via RFC 5011 trust anchor
  2454. maintenance.
  2455. </para>
  2456. <para>
  2457. <command>trusted-keys</command> and
  2458. <command>managed-keys</command> are described in more detail
  2459. later in this document.
  2460. </para>
  2461. <para>
  2462. Unlike <acronym>BIND</acronym> 8, <acronym>BIND</acronym>
  2463. 9 does not verify signatures on load, so zone keys for
  2464. authoritative zones do not need to be specified in the
  2465. configuration file.
  2466. </para>
  2467. <para>
  2468. After DNSSEC gets established, a typical DNSSEC configuration
  2469. will look something like the following. It has one or
  2470. more public keys for the root. This allows answers from
  2471. outside the organization to be validated. It will also
  2472. have several keys for parts of the namespace the organization
  2473. controls. These are here to ensure that <command>named</command>
  2474. is immune to compromises in the DNSSEC components of the security
  2475. of parent zones.
  2476. </para>
  2477. <programlisting>
  2478. managed-keys {
  2479. /* Root Key */
  2480. "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
  2481. JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
  2482. aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
  2483. 4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
  2484. hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
  2485. 5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
  2486. g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
  2487. 66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
  2488. 97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
  2489. dgxbcDTClU0CRBdiieyLMNzXG3";
  2490. };
  2491. trusted-keys {
  2492. /* Key for our organization's forward zone */
  2493. example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
  2494. 5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
  2495. GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
  2496. 4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
  2497. kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
  2498. g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
  2499. TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
  2500. FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
  2501. F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
  2502. /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
  2503. 1OTQ09A0=";
  2504. /* Key for our reverse zone. */
  2505. 2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
  2506. xOdNax071L18QqZnQQQAVVr+i
  2507. LhGTnNGp3HoWQLUIzKrJVZ3zg
  2508. gy3WwNT6kZo6c0tszYqbtvchm
  2509. gQC8CzKojM/W16i6MG/eafGU3
  2510. siaOdS0yOI6BgPsw+YZdzlYMa
  2511. IJGf4M4dyoKIhzdZyQ2bYQrjy
  2512. Q4LB0lC7aOnsMyYKHHYeRvPxj
  2513. IQXmdqgOJGq+vsevG06zW+1xg
  2514. YJh9rCIfnm1GX/KMgxLPG2vXT
  2515. D/RnLX+D3T3UL7HJYHJhAZD5L
  2516. 59VvjSPsZJHeDCUyWYrvPZesZ
  2517. DIRvhDD52SKvbheeTJUm6Ehkz
  2518. ytNN2SN96QRk8j/iI8ib";
  2519. };
  2520. options {
  2521. ...
  2522. dnssec-enable yes;
  2523. dnssec-validation yes;
  2524. };
  2525. </programlisting>
  2526. <note>
  2527. None of the keys listed in this example are valid. In particular,
  2528. the root key is not valid.
  2529. </note>
  2530. <para>
  2531. When DNSSEC validation is enabled and properly configured,
  2532. the resolver will reject any answers from signed, secure zones
  2533. which fail to validate, and will return SERVFAIL to the client.
  2534. </para>
  2535. <para>
  2536. Responses may fail to validate for any of several reasons,
  2537. including missing, expired, or invalid signatures, a key which
  2538. does not match the DS RRset in the parent zone, or an insecure
  2539. response from a zone which, according to its parent, should have
  2540. been secure.
  2541. </para>
  2542. <note>
  2543. <para>
  2544. When the validator receives a response from an unsigned zone
  2545. that has a signed parent, it must confirm with the parent
  2546. that the zone was intentionally left unsigned. It does
  2547. this by verifying, via signed and validated NSEC/NSEC3 records,
  2548. that the parent zone contains no DS records for the child.
  2549. </para>
  2550. <para>
  2551. If the validator <emphasis>can</emphasis> prove that the zone
  2552. is insecure, then the response is accepted. However, if it
  2553. cannot, then it must assume an insecure response to be a
  2554. forgery; it rejects the response and logs an error.
  2555. </para>
  2556. <para>
  2557. The logged error reads "insecurity proof failed" and
  2558. "got insecure response; parent indicates it should be secure".
  2559. (Prior to BIND 9.7, the logged error was "not insecure".
  2560. This referred to the zone, not the response.)
  2561. </para>
  2562. </note>
  2563. </sect2>
  2564. </sect1>
  2565. <xi:include href="dnssec.xml"/>
  2566. <xi:include href="managed-keys.xml"/>
  2567. <xi:include href="pkcs11.xml"/>
  2568. <sect1>
  2569. <title>IPv6 Support in <acronym>BIND</acronym> 9</title>
  2570. <para>
  2571. <acronym>BIND</acronym> 9 fully supports all currently
  2572. defined forms of IPv6 name to address and address to name
  2573. lookups. It will also use IPv6 addresses to make queries when
  2574. running on an IPv6 capable system.
  2575. </para>
  2576. <para>
  2577. For forward lookups, <acronym>BIND</acronym> 9 supports
  2578. only AAAA records. RFC 3363 deprecated the use of A6 records,
  2579. and client-side support for A6 records was accordingly removed
  2580. from <acronym>BIND</acronym> 9.
  2581. However, authoritative <acronym>BIND</acronym> 9 name servers still
  2582. load zone files containing A6 records correctly, answer queries
  2583. for A6 records, and accept zone transfer for a zone containing A6
  2584. records.
  2585. </para>
  2586. <para>
  2587. For IPv6 reverse lookups, <acronym>BIND</acronym> 9 supports
  2588. the traditional "nibble" format used in the
  2589. <emphasis>ip6.arpa</emphasis> domain, as well as the older, deprecated
  2590. <emphasis>ip6.int</emphasis> domain.
  2591. Older versions of <acronym>BIND</acronym> 9
  2592. supported the "binary label" (also known as "bitstring") format,
  2593. but support of binary labels has been completely removed per
  2594. RFC 3363.
  2595. Many applications in <acronym>BIND</acronym> 9 do not understand
  2596. the binary label format at all any more, and will return an
  2597. error if given.
  2598. In particular, an authoritative <acronym>BIND</acronym> 9
  2599. name server will not load a zone file containing binary labels.
  2600. </para>
  2601. <para>
  2602. For an overview of the format and structure of IPv6 addresses,
  2603. see <xref linkend="ipv6addresses"/>.
  2604. </para>
  2605. <sect2>
  2606. <title>Address Lookups Using AAAA Records</title>
  2607. <para>
  2608. The IPv6 AAAA record is a parallel to the IPv4 A record,
  2609. and, unlike the deprecated A6 record, specifies the entire
  2610. IPv6 address in a single record. For example,
  2611. </para>
  2612. <programlisting>
  2613. $ORIGIN example.com.
  2614. host 3600 IN AAAA 2001:db8::1
  2615. </programlisting>
  2616. <para>
  2617. Use of IPv4-in-IPv6 mapped addresses is not recommended.
  2618. If a host has an IPv4 address, use an A record, not
  2619. a AAAA, with <literal>::ffff:192.168.42.1</literal> as
  2620. the address.
  2621. </para>
  2622. </sect2>
  2623. <sect2>
  2624. <title>Address to Name Lookups Using Nibble Format</title>
  2625. <para>
  2626. When looking up an address in nibble format, the address
  2627. components are simply reversed, just as in IPv4, and
  2628. <literal>ip6.arpa.</literal> is appended to the
  2629. resulting name.
  2630. For example, the following would provide reverse name lookup for
  2631. a host with address
  2632. <literal>2001:db8::1</literal>.
  2633. </para>
  2634. <programlisting>
  2635. $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
  2636. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 14400 IN PTR (
  2637. host.example.com. )
  2638. </programlisting>
  2639. </sect2>
  2640. </sect1>
  2641. </chapter>
  2642. <chapter id="Bv9ARM.ch05">
  2643. <title>The <acronym>BIND</acronym> 9 Lightweight Resolver</title>
  2644. <sect1>
  2645. <title>The Lightweight Resolver Library</title>
  2646. <para>
  2647. Traditionally applications have been linked with a stub resolver
  2648. library that sends recursive DNS queries to a local caching name
  2649. server.
  2650. </para>
  2651. <para>
  2652. IPv6 once introduced new complexity into the resolution process,
  2653. such as following A6 chains and DNAME records, and simultaneous
  2654. lookup of IPv4 and IPv6 addresses. Though most of the complexity was
  2655. then removed, these are hard or impossible
  2656. to implement in a traditional stub resolver.
  2657. </para>
  2658. <para>
  2659. <acronym>BIND</acronym> 9 therefore can also provide resolution
  2660. services to local clients
  2661. using a combination of a lightweight resolver library and a resolver
  2662. daemon process running on the local host. These communicate using
  2663. a simple UDP-based protocol, the "lightweight resolver protocol"
  2664. that is distinct from and simpler than the full DNS protocol.
  2665. </para>
  2666. </sect1>
  2667. <sect1 id="lwresd">
  2668. <title>Running a Resolver Daemon</title>
  2669. <para>
  2670. To use the lightweight resolver interface, the system must
  2671. run the resolver daemon <command>lwresd</command> or a
  2672. local
  2673. name server configured with a <command>lwres</command>
  2674. statement.
  2675. </para>
  2676. <para>
  2677. By default, applications using the lightweight resolver library will
  2678. make
  2679. UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
  2680. The
  2681. address can be overridden by <command>lwserver</command>
  2682. lines in
  2683. <filename>/etc/resolv.conf</filename>.
  2684. </para>
  2685. <para>
  2686. The daemon currently only looks in the DNS, but in the future
  2687. it may use other sources such as <filename>/etc/hosts</filename>,
  2688. NIS, etc.
  2689. </para>
  2690. <para>
  2691. The <command>lwresd</command> daemon is essentially a
  2692. caching-only name server that responds to requests using the
  2693. lightweight
  2694. resolver protocol rather than the DNS protocol. Because it needs
  2695. to run on each host, it is designed to require no or minimal
  2696. configuration.
  2697. Unless configured otherwise, it uses the name servers listed on
  2698. <command>nameserver</command> lines in <filename>/etc/resolv.conf</filename>
  2699. as forwarders, but is also capable of doing the resolution
  2700. autonomously if
  2701. none are specified.
  2702. </para>
  2703. <para>
  2704. The <command>lwresd</command> daemon may also be
  2705. configured with a
  2706. <filename>named.conf</filename> style configuration file,
  2707. in
  2708. <filename>/etc/lwresd.conf</filename> by default. A name
  2709. server may also
  2710. be configured to act as a lightweight resolver daemon using the
  2711. <command>lwres</command> statement in <filename>named.conf</filename>.
  2712. </para>
  2713. </sect1>
  2714. </chapter>
  2715. <chapter id="Bv9ARM.ch06">
  2716. <title><acronym>BIND</acronym> 9 Configuration Reference</title>
  2717. <para>
  2718. <acronym>BIND</acronym> 9 configuration is broadly similar
  2719. to <acronym>BIND</acronym> 8; however, there are a few new
  2720. areas
  2721. of configuration, such as views. <acronym>BIND</acronym>
  2722. 8 configuration files should work with few alterations in <acronym>BIND</acronym>
  2723. 9, although more complex configurations should be reviewed to check
  2724. if they can be more efficiently implemented using the new features
  2725. found in <acronym>BIND</acronym> 9.
  2726. </para>
  2727. <para>
  2728. <acronym>BIND</acronym> 4 configuration files can be
  2729. converted to the new format
  2730. using the shell script
  2731. <filename>contrib/named-bootconf/named-bootconf.sh</filename>.
  2732. </para>
  2733. <sect1 id="configuration_file_elements">
  2734. <title>Configuration File Elements</title>
  2735. <para>
  2736. Following is a list of elements used throughout the <acronym>BIND</acronym> configuration
  2737. file documentation:
  2738. </para>
  2739. <informaltable colsep="0" rowsep="0">
  2740. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
  2741. <colspec colname="1" colnum="1" colsep="0" colwidth="1.855in"/>
  2742. <colspec colname="2" colnum="2" colsep="0" colwidth="3.770in"/>
  2743. <tbody>
  2744. <row rowsep="0">
  2745. <entry colname="1">
  2746. <para>
  2747. <varname>acl_name</varname>
  2748. </para>
  2749. </entry>
  2750. <entry colname="2">
  2751. <para>
  2752. The name of an <varname>address_match_list</varname> as
  2753. defined by the <command>acl</command> statement.
  2754. </para>
  2755. </entry>
  2756. </row>
  2757. <row rowsep="0">
  2758. <entry colname="1">
  2759. <para>
  2760. <varname>address_match_list</varname>
  2761. </para>
  2762. </entry>
  2763. <entry colname="2">
  2764. <para>
  2765. A list of one or more
  2766. <varname>ip_addr</varname>,
  2767. <varname>ip_prefix</varname>, <varname>key_id</varname>,
  2768. or <varname>acl_name</varname> elements, see
  2769. <xref linkend="address_match_lists"/>.
  2770. </para>
  2771. </entry>
  2772. </row>
  2773. <row rowsep="0">
  2774. <entry colname="1">
  2775. <para>
  2776. <varname>masters_list</varname>
  2777. </para>
  2778. </entry>
  2779. <entry colname="2">
  2780. <para>
  2781. A named list of one or more <varname>ip_addr</varname>
  2782. with optional <varname>key_id</varname> and/or
  2783. <varname>ip_port</varname>.
  2784. A <varname>masters_list</varname> may include other
  2785. <varname>masters_lists</varname>.
  2786. </para>
  2787. </entry>
  2788. </row>
  2789. <row rowsep="0">
  2790. <entry colname="1">
  2791. <para>
  2792. <varname>domain_name</varname>
  2793. </para>
  2794. </entry>
  2795. <entry colname="2">
  2796. <para>
  2797. A quoted string which will be used as
  2798. a DNS name, for example "<literal>my.test.domain</literal>".
  2799. </para>
  2800. </entry>
  2801. </row>
  2802. <row rowsep="0">
  2803. <entry colname="1">
  2804. <para>
  2805. <varname>namelist</varname>
  2806. </para>
  2807. </entry>
  2808. <entry colname="2">
  2809. <para>
  2810. A list of one or more <varname>domain_name</varname>
  2811. elements.
  2812. </para>
  2813. </entry>
  2814. </row>
  2815. <row rowsep="0">
  2816. <entry colname="1">
  2817. <para>
  2818. <varname>dotted_decimal</varname>
  2819. </para>
  2820. </entry>
  2821. <entry colname="2">
  2822. <para>
  2823. One to four integers valued 0 through
  2824. 255 separated by dots (`.'), such as <command>123</command>,
  2825. <command>45.67</command> or <command>89.123.45.67</command>.
  2826. </para>
  2827. </entry>
  2828. </row>
  2829. <row rowsep="0">
  2830. <entry colname="1">
  2831. <para>
  2832. <varname>ip4_addr</varname>
  2833. </para>
  2834. </entry>
  2835. <entry colname="2">
  2836. <para>
  2837. An IPv4 address with exactly four elements
  2838. in <varname>dotted_decimal</varname> notation.
  2839. </para>
  2840. </entry>
  2841. </row>
  2842. <row rowsep="0">
  2843. <entry colname="1">
  2844. <para>
  2845. <varname>ip6_addr</varname>
  2846. </para>
  2847. </entry>
  2848. <entry colname="2">
  2849. <para>
  2850. An IPv6 address, such as <command>2001:db8::1234</command>.
  2851. IPv6 scoped addresses that have ambiguity on their
  2852. scope zones must be disambiguated by an appropriate
  2853. zone ID with the percent character (`%') as
  2854. delimiter. It is strongly recommended to use
  2855. string zone names rather than numeric identifiers,
  2856. in order to be robust against system configuration
  2857. changes. However, since there is no standard
  2858. mapping for such names and identifier values,
  2859. currently only interface names as link identifiers
  2860. are supported, assuming one-to-one mapping between
  2861. interfaces and links. For example, a link-local
  2862. address <command>fe80::1</command> on the link
  2863. attached to the interface <command>ne0</command>
  2864. can be specified as <command>fe80::1%ne0</command>.
  2865. Note that on most systems link-local addresses
  2866. always have the ambiguity, and need to be
  2867. disambiguated.
  2868. </para>
  2869. </entry>
  2870. </row>
  2871. <row rowsep="0">
  2872. <entry colname="1">
  2873. <para>
  2874. <varname>ip_addr</varname>
  2875. </para>
  2876. </entry>
  2877. <entry colname="2">
  2878. <para>
  2879. An <varname>ip4_addr</varname> or <varname>ip6_addr</varname>.
  2880. </para>
  2881. </entry>
  2882. </row>
  2883. <row rowsep="0">
  2884. <entry colname="1">
  2885. <para>
  2886. <varname>ip_port</varname>
  2887. </para>
  2888. </entry>
  2889. <entry colname="2">
  2890. <para>
  2891. An IP port <varname>number</varname>.
  2892. The <varname>number</varname> is limited to 0
  2893. through 65535, with values
  2894. below 1024 typically restricted to use by processes running
  2895. as root.
  2896. In some cases, an asterisk (`*') character can be used as a
  2897. placeholder to
  2898. select a random high-numbered port.
  2899. </para>
  2900. </entry>
  2901. </row>
  2902. <row rowsep="0">
  2903. <entry colname="1">
  2904. <para>
  2905. <varname>ip_prefix</varname>
  2906. </para>
  2907. </entry>
  2908. <entry colname="2">
  2909. <para>
  2910. An IP network specified as an <varname>ip_addr</varname>,
  2911. followed by a slash (`/') and then the number of bits in the
  2912. netmask.
  2913. Trailing zeros in a <varname>ip_addr</varname>
  2914. may omitted.
  2915. For example, <command>127/8</command> is the
  2916. network <command>127.0.0.0</command> with
  2917. netmask <command>255.0.0.0</command> and <command>1.2.3.0/28</command> is
  2918. network <command>1.2.3.0</command> with netmask <command>255.255.255.240</command>.
  2919. </para>
  2920. <para>
  2921. When specifying a prefix involving a IPv6 scoped address
  2922. the scope may be omitted. In that case the prefix will
  2923. match packets from any scope.
  2924. </para>
  2925. </entry>
  2926. </row>
  2927. <row rowsep="0">
  2928. <entry colname="1">
  2929. <para>
  2930. <varname>key_id</varname>
  2931. </para>
  2932. </entry>
  2933. <entry colname="2">
  2934. <para>
  2935. A <varname>domain_name</varname> representing
  2936. the name of a shared key, to be used for transaction
  2937. security.
  2938. </para>
  2939. </entry>
  2940. </row>
  2941. <row rowsep="0">
  2942. <entry colname="1">
  2943. <para>
  2944. <varname>key_list</varname>
  2945. </para>
  2946. </entry>
  2947. <entry colname="2">
  2948. <para>
  2949. A list of one or more
  2950. <varname>key_id</varname>s,
  2951. separated by semicolons and ending with a semicolon.
  2952. </para>
  2953. </entry>
  2954. </row>
  2955. <row rowsep="0">
  2956. <entry colname="1">
  2957. <para>
  2958. <varname>number</varname>
  2959. </para>
  2960. </entry>
  2961. <entry colname="2">
  2962. <para>
  2963. A non-negative 32-bit integer
  2964. (i.e., a number between 0 and 4294967295, inclusive).
  2965. Its acceptable value might further
  2966. be limited by the context in which it is used.
  2967. </para>
  2968. </entry>
  2969. </row>
  2970. <row rowsep="0">
  2971. <entry colname="1">
  2972. <para>
  2973. <varname>path_name</varname>
  2974. </para>
  2975. </entry>
  2976. <entry colname="2">
  2977. <para>
  2978. A quoted string which will be used as
  2979. a pathname, such as <filename>zones/master/my.test.domain</filename>.
  2980. </para>
  2981. </entry>
  2982. </row>
  2983. <row rowsep="0">
  2984. <entry colname="1">
  2985. <para>
  2986. <varname>port_list</varname>
  2987. </para>
  2988. </entry>
  2989. <entry colname="2">
  2990. <para>
  2991. A list of an <varname>ip_port</varname> or a port
  2992. range.
  2993. A port range is specified in the form of
  2994. <userinput>range</userinput> followed by
  2995. two <varname>ip_port</varname>s,
  2996. <varname>port_low</varname> and
  2997. <varname>port_high</varname>, which represents
  2998. port numbers from <varname>port_low</varname> through
  2999. <varname>port_high</varname>, inclusive.
  3000. <varname>port_low</varname> must not be larger than
  3001. <varname>port_high</varname>.
  3002. For example,
  3003. <userinput>range 1024 65535</userinput> represents
  3004. ports from 1024 through 65535.
  3005. In either case an asterisk (`*') character is not
  3006. allowed as a valid <varname>ip_port</varname>.
  3007. </para>
  3008. </entry>
  3009. </row>
  3010. <row rowsep="0">
  3011. <entry colname="1">
  3012. <para>
  3013. <varname>size_spec</varname>
  3014. </para>
  3015. </entry>
  3016. <entry colname="2">
  3017. <para>
  3018. A number, the word <userinput>unlimited</userinput>,
  3019. or the word <userinput>default</userinput>.
  3020. </para>
  3021. <para>
  3022. An <varname>unlimited</varname> <varname>size_spec</varname> requests unlimited
  3023. use, or the maximum available amount. A <varname>default size_spec</varname> uses
  3024. the limit that was in force when the server was started.
  3025. </para>
  3026. <para>
  3027. A <varname>number</varname> can optionally be
  3028. followed by a scaling factor:
  3029. <userinput>K</userinput> or <userinput>k</userinput>
  3030. for kilobytes,
  3031. <userinput>M</userinput> or <userinput>m</userinput>
  3032. for megabytes, and
  3033. <userinput>G</userinput> or <userinput>g</userinput> for gigabytes,
  3034. which scale by 1024, 1024*1024, and 1024*1024*1024
  3035. respectively.
  3036. </para>
  3037. <para>
  3038. The value must be representable as a 64-bit unsigned integer
  3039. (0 to 18446744073709551615, inclusive).
  3040. Using <varname>unlimited</varname> is the best
  3041. way
  3042. to safely set a really large number.
  3043. </para>
  3044. </entry>
  3045. </row>
  3046. <row rowsep="0">
  3047. <entry colname="1">
  3048. <para>
  3049. <varname>yes_or_no</varname>
  3050. </para>
  3051. </entry>
  3052. <entry colname="2">
  3053. <para>
  3054. Either <userinput>yes</userinput> or <userinput>no</userinput>.
  3055. The words <userinput>true</userinput> and <userinput>false</userinput> are
  3056. also accepted, as are the numbers <userinput>1</userinput>
  3057. and <userinput>0</userinput>.
  3058. </para>
  3059. </entry>
  3060. </row>
  3061. <row rowsep="0">
  3062. <entry colname="1">
  3063. <para>
  3064. <varname>dialup_option</varname>
  3065. </para>
  3066. </entry>
  3067. <entry colname="2">
  3068. <para>
  3069. One of <userinput>yes</userinput>,
  3070. <userinput>no</userinput>, <userinput>notify</userinput>,
  3071. <userinput>notify-passive</userinput>, <userinput>refresh</userinput> or
  3072. <userinput>passive</userinput>.
  3073. When used in a zone, <userinput>notify-passive</userinput>,
  3074. <userinput>refresh</userinput>, and <userinput>passive</userinput>
  3075. are restricted to slave and stub zones.
  3076. </para>
  3077. </entry>
  3078. </row>
  3079. </tbody>
  3080. </tgroup>
  3081. </informaltable>
  3082. <sect2 id="address_match_lists">
  3083. <title>Address Match Lists</title>
  3084. <sect3>
  3085. <title>Syntax</title>
  3086. <programlisting><varname>address_match_list</varname> = address_match_list_element ;
  3087. <optional> address_match_list_element; ... </optional>
  3088. <varname>address_match_list_element</varname> = <optional> ! </optional> (ip_address <optional>/length</optional> |
  3089. key key_id | acl_name | { address_match_list } )
  3090. </programlisting>
  3091. </sect3>
  3092. <sect3>
  3093. <title>Definition and Usage</title>
  3094. <para>
  3095. Address match lists are primarily used to determine access
  3096. control for various server operations. They are also used in
  3097. the <command>listen-on</command> and <command>sortlist</command>
  3098. statements. The elements which constitute an address match
  3099. list can be any of the following:
  3100. </para>
  3101. <itemizedlist>
  3102. <listitem>
  3103. <simpara>an IP address (IPv4 or IPv6)</simpara>
  3104. </listitem>
  3105. <listitem>
  3106. <simpara>an IP prefix (in `/' notation)</simpara>
  3107. </listitem>
  3108. <listitem>
  3109. <simpara>
  3110. a key ID, as defined by the <command>key</command>
  3111. statement
  3112. </simpara>
  3113. </listitem>
  3114. <listitem>
  3115. <simpara>the name of an address match list defined with
  3116. the <command>acl</command> statement
  3117. </simpara>
  3118. </listitem>
  3119. <listitem>
  3120. <simpara>a nested address match list enclosed in braces</simpara>
  3121. </listitem>
  3122. </itemizedlist>
  3123. <para>
  3124. Elements can be negated with a leading exclamation mark (`!'),
  3125. and the match list names "any", "none", "localhost", and
  3126. "localnets" are predefined. More information on those names
  3127. can be found in the description of the acl statement.
  3128. </para>
  3129. <para>
  3130. The addition of the key clause made the name of this syntactic
  3131. element something of a misnomer, since security keys can be used
  3132. to validate access without regard to a host or network address.
  3133. Nonetheless, the term "address match list" is still used
  3134. throughout the documentation.
  3135. </para>
  3136. <para>
  3137. When a given IP address or prefix is compared to an address
  3138. match list, the comparison takes place in approximately O(1)
  3139. time. However, key comparisons require that the list of keys
  3140. be traversed until a matching key is found, and therefore may
  3141. be somewhat slower.
  3142. </para>
  3143. <para>
  3144. The interpretation of a match depends on whether the list is being
  3145. used for access control, defining <command>listen-on</command> ports, or in a
  3146. <command>sortlist</command>, and whether the element was negated.
  3147. </para>
  3148. <para>
  3149. When used as an access control list, a non-negated match
  3150. allows access and a negated match denies access. If
  3151. there is no match, access is denied. The clauses
  3152. <command>allow-notify</command>,
  3153. <command>allow-recursion</command>,
  3154. <command>allow-recursion-on</command>,
  3155. <command>allow-query</command>,
  3156. <command>allow-query-on</command>,
  3157. <command>allow-query-cache</command>,
  3158. <command>allow-query-cache-on</command>,
  3159. <command>allow-transfer</command>,
  3160. <command>allow-update</command>,
  3161. <command>allow-update-forwarding</command>, and
  3162. <command>blackhole</command> all use address match
  3163. lists. Similarly, the <command>listen-on</command> option will cause the
  3164. server to refuse queries on any of the machine's
  3165. addresses which do not match the list.
  3166. </para>
  3167. <para>
  3168. Order of insertion is significant. If more than one element
  3169. in an ACL is found to match a given IP address or prefix,
  3170. preference will be given to the one that came
  3171. <emphasis>first</emphasis> in the ACL definition.
  3172. Because of this first-match behavior, an element that
  3173. defines a subset of another element in the list should
  3174. come before the broader element, regardless of whether
  3175. either is negated. For example, in
  3176. <command>1.2.3/24; ! 1.2.3.13;</command>
  3177. the 1.2.3.13 element is completely useless because the
  3178. algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
  3179. element. Using <command>! 1.2.3.13; 1.2.3/24</command> fixes
  3180. that problem by having 1.2.3.13 blocked by the negation, but
  3181. all other 1.2.3.* hosts fall through.
  3182. </para>
  3183. </sect3>
  3184. </sect2>
  3185. <sect2>
  3186. <title>Comment Syntax</title>
  3187. <para>
  3188. The <acronym>BIND</acronym> 9 comment syntax allows for
  3189. comments to appear
  3190. anywhere that whitespace may appear in a <acronym>BIND</acronym> configuration
  3191. file. To appeal to programmers of all kinds, they can be written
  3192. in the C, C++, or shell/perl style.
  3193. </para>
  3194. <sect3>
  3195. <title>Syntax</title>
  3196. <para>
  3197. <programlisting>/* This is a <acronym>BIND</acronym> comment as in C */</programlisting>
  3198. <programlisting>// This is a <acronym>BIND</acronym> comment as in C++</programlisting>
  3199. <programlisting># This is a <acronym>BIND</acronym> comment as in common UNIX shells
  3200. # and perl</programlisting>
  3201. </para>
  3202. </sect3>
  3203. <sect3>
  3204. <title>Definition and Usage</title>
  3205. <para>
  3206. Comments may appear anywhere that whitespace may appear in
  3207. a <acronym>BIND</acronym> configuration file.
  3208. </para>
  3209. <para>
  3210. C-style comments start with the two characters /* (slash,
  3211. star) and end with */ (star, slash). Because they are completely
  3212. delimited with these characters, they can be used to comment only
  3213. a portion of a line or to span multiple lines.
  3214. </para>
  3215. <para>
  3216. C-style comments cannot be nested. For example, the following
  3217. is not valid because the entire comment ends with the first */:
  3218. </para>
  3219. <para>
  3220. <programlisting>/* This is the start of a comment.
  3221. This is still part of the comment.
  3222. /* This is an incorrect attempt at nesting a comment. */
  3223. This is no longer in any comment. */
  3224. </programlisting>
  3225. </para>
  3226. <para>
  3227. C++-style comments start with the two characters // (slash,
  3228. slash) and continue to the end of the physical line. They cannot
  3229. be continued across multiple physical lines; to have one logical
  3230. comment span multiple lines, each line must use the // pair.
  3231. For example:
  3232. </para>
  3233. <para>
  3234. <programlisting>// This is the start of a comment. The next line
  3235. // is a new comment, even though it is logically
  3236. // part of the previous comment.
  3237. </programlisting>
  3238. </para>
  3239. <para>
  3240. Shell-style (or perl-style, if you prefer) comments start
  3241. with the character <literal>#</literal> (number sign)
  3242. and continue to the end of the
  3243. physical line, as in C++ comments.
  3244. For example:
  3245. </para>
  3246. <para>
  3247. <programlisting># This is the start of a comment. The next line
  3248. # is a new comment, even though it is logically
  3249. # part of the previous comment.
  3250. </programlisting>
  3251. </para>
  3252. <warning>
  3253. <para>
  3254. You cannot use the semicolon (`;') character
  3255. to start a comment such as you would in a zone file. The
  3256. semicolon indicates the end of a configuration
  3257. statement.
  3258. </para>
  3259. </warning>
  3260. </sect3>
  3261. </sect2>
  3262. </sect1>
  3263. <sect1 id="Configuration_File_Grammar">
  3264. <title>Configuration File Grammar</title>
  3265. <para>
  3266. A <acronym>BIND</acronym> 9 configuration consists of
  3267. statements and comments.
  3268. Statements end with a semicolon. Statements and comments are the
  3269. only elements that can appear without enclosing braces. Many
  3270. statements contain a block of sub-statements, which are also
  3271. terminated with a semicolon.
  3272. </para>
  3273. <para>
  3274. The following statements are supported:
  3275. </para>
  3276. <informaltable colsep="0" rowsep="0">
  3277. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
  3278. <colspec colname="1" colnum="1" colsep="0" colwidth="1.336in"/>
  3279. <colspec colname="2" colnum="2" colsep="0" colwidth="3.778in"/>
  3280. <tbody>
  3281. <row rowsep="0">
  3282. <entry colname="1">
  3283. <para><command>acl</command></para>
  3284. </entry>
  3285. <entry colname="2">
  3286. <para>
  3287. defines a named IP address
  3288. matching list, for access control and other uses.
  3289. </para>
  3290. </entry>
  3291. </row>
  3292. <row rowsep="0">
  3293. <entry colname="1">
  3294. <para><command>controls</command></para>
  3295. </entry>
  3296. <entry colname="2">
  3297. <para>
  3298. declares control channels to be used
  3299. by the <command>rndc</command> utility.
  3300. </para>
  3301. </entry>
  3302. </row>
  3303. <row rowsep="0">
  3304. <entry colname="1">
  3305. <para><command>include</command></para>
  3306. </entry>
  3307. <entry colname="2">
  3308. <para>
  3309. includes a file.
  3310. </para>
  3311. </entry>
  3312. </row>
  3313. <row rowsep="0">
  3314. <entry colname="1">
  3315. <para><command>key</command></para>
  3316. </entry>
  3317. <entry colname="2">
  3318. <para>
  3319. specifies key information for use in
  3320. authentication and authorization using TSIG.
  3321. </para>
  3322. </entry>
  3323. </row>
  3324. <row rowsep="0">
  3325. <entry colname="1">
  3326. <para><command>logging</command></para>
  3327. </entry>
  3328. <entry colname="2">
  3329. <para>
  3330. specifies what the server logs, and where
  3331. the log messages are sent.
  3332. </para>
  3333. </entry>
  3334. </row>
  3335. <row rowsep="0">
  3336. <entry colname="1">
  3337. <para><command>lwres</command></para>
  3338. </entry>
  3339. <entry colname="2">
  3340. <para>
  3341. configures <command>named</command> to
  3342. also act as a light-weight resolver daemon (<command>lwresd</command>).
  3343. </para>
  3344. </entry>
  3345. </row>
  3346. <row rowsep="0">
  3347. <entry colname="1">
  3348. <para><command>masters</command></para>
  3349. </entry>
  3350. <entry colname="2">
  3351. <para>
  3352. defines a named masters list for
  3353. inclusion in stub and slave zone masters clauses.
  3354. </para>
  3355. </entry>
  3356. </row>
  3357. <row rowsep="0">
  3358. <entry colname="1">
  3359. <para><command>options</command></para>
  3360. </entry>
  3361. <entry colname="2">
  3362. <para>
  3363. controls global server configuration
  3364. options and sets defaults for other statements.
  3365. </para>
  3366. </entry>
  3367. </row>
  3368. <row rowsep="0">
  3369. <entry colname="1">
  3370. <para><command>server</command></para>
  3371. </entry>
  3372. <entry colname="2">
  3373. <para>
  3374. sets certain configuration options on
  3375. a per-server basis.
  3376. </para>
  3377. </entry>
  3378. </row>
  3379. <row rowsep="0">
  3380. <entry colname="1">
  3381. <para><command>statistics-channels</command></para>
  3382. </entry>
  3383. <entry colname="2">
  3384. <para>
  3385. declares communication channels to get access to
  3386. <command>named</command> statistics.
  3387. </para>
  3388. </entry>
  3389. </row>
  3390. <row rowsep="0">
  3391. <entry colname="1">
  3392. <para><command>trusted-keys</command></para>
  3393. </entry>
  3394. <entry colname="2">
  3395. <para>
  3396. defines trusted DNSSEC keys.
  3397. </para>
  3398. </entry>
  3399. </row>
  3400. <row rowsep="0">
  3401. <entry colname="1">
  3402. <para><command>managed-keys</command></para>
  3403. </entry>
  3404. <entry colname="2">
  3405. <para>
  3406. lists DNSSEC keys to be kept up to date
  3407. using RFC 5011 trust anchor maintenance.
  3408. </para>
  3409. </entry>
  3410. </row>
  3411. <row rowsep="0">
  3412. <entry colname="1">
  3413. <para><command>view</command></para>
  3414. </entry>
  3415. <entry colname="2">
  3416. <para>
  3417. defines a view.
  3418. </para>
  3419. </entry>
  3420. </row>
  3421. <row rowsep="0">
  3422. <entry colname="1">
  3423. <para><command>zone</command></para>
  3424. </entry>
  3425. <entry colname="2">
  3426. <para>
  3427. defines a zone.
  3428. </para>
  3429. </entry>
  3430. </row>
  3431. </tbody>
  3432. </tgroup>
  3433. </informaltable>
  3434. <para>
  3435. The <command>logging</command> and
  3436. <command>options</command> statements may only occur once
  3437. per
  3438. configuration.
  3439. </para>
  3440. <sect2>
  3441. <title><command>acl</command> Statement Grammar</title>
  3442. <programlisting><command>acl</command> acl-name {
  3443. address_match_list
  3444. };
  3445. </programlisting>
  3446. </sect2>
  3447. <sect2 id="acl">
  3448. <title><command>acl</command> Statement Definition and
  3449. Usage</title>
  3450. <para>
  3451. The <command>acl</command> statement assigns a symbolic
  3452. name to an address match list. It gets its name from a primary
  3453. use of address match lists: Access Control Lists (ACLs).
  3454. </para>
  3455. <para>
  3456. Note that an address match list's name must be defined
  3457. with <command>acl</command> before it can be used
  3458. elsewhere; no forward references are allowed.
  3459. </para>
  3460. <para>
  3461. The following ACLs are built-in:
  3462. </para>
  3463. <informaltable colsep="0" rowsep="0">
  3464. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
  3465. <colspec colname="1" colnum="1" colsep="0" colwidth="1.130in"/>
  3466. <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
  3467. <tbody>
  3468. <row rowsep="0">
  3469. <entry colname="1">
  3470. <para><command>any</command></para>
  3471. </entry>
  3472. <entry colname="2">
  3473. <para>
  3474. Matches all hosts.
  3475. </para>
  3476. </entry>
  3477. </row>
  3478. <row rowsep="0">
  3479. <entry colname="1">
  3480. <para><command>none</command></para>
  3481. </entry>
  3482. <entry colname="2">
  3483. <para>
  3484. Matches no hosts.
  3485. </para>
  3486. </entry>
  3487. </row>
  3488. <row rowsep="0">
  3489. <entry colname="1">
  3490. <para><command>localhost</command></para>
  3491. </entry>
  3492. <entry colname="2">
  3493. <para>
  3494. Matches the IPv4 and IPv6 addresses of all network
  3495. interfaces on the system.
  3496. </para>
  3497. </entry>
  3498. </row>
  3499. <row rowsep="0">
  3500. <entry colname="1">
  3501. <para><command>localnets</command></para>
  3502. </entry>
  3503. <entry colname="2">
  3504. <para>
  3505. Matches any host on an IPv4 or IPv6 network
  3506. for which the system has an interface.
  3507. Some systems do not provide a way to determine the prefix
  3508. lengths of
  3509. local IPv6 addresses.
  3510. In such a case, <command>localnets</command>
  3511. only matches the local
  3512. IPv6 addresses, just like <command>localhost</command>.
  3513. </para>
  3514. </entry>
  3515. </row>
  3516. </tbody>
  3517. </tgroup>
  3518. </informaltable>
  3519. </sect2>
  3520. <sect2>
  3521. <title><command>controls</command> Statement Grammar</title>
  3522. <programlisting><command>controls</command> {
  3523. [ inet ( ip_addr | * ) [ port ip_port ]
  3524. allow { <replaceable> address_match_list </replaceable> }
  3525. keys { <replaceable>key_list</replaceable> }; ]
  3526. [ inet ...; ]
  3527. [ unix <replaceable>path</replaceable> perm <replaceable>number</replaceable> owner <replaceable>number</replaceable> group <replaceable>number</replaceable>
  3528. keys { <replaceable>key_list</replaceable> }; ]
  3529. [ unix ...; ]
  3530. };
  3531. </programlisting>
  3532. </sect2>
  3533. <sect2 id="controls_statement_definition_and_usage">
  3534. <title><command>controls</command> Statement Definition and
  3535. Usage</title>
  3536. <para>
  3537. The <command>controls</command> statement declares control
  3538. channels to be used by system administrators to control the
  3539. operation of the name server. These control channels are
  3540. used by the <command>rndc</command> utility to send
  3541. commands to and retrieve non-DNS results from a name server.
  3542. </para>
  3543. <para>
  3544. An <command>inet</command> control channel is a TCP socket
  3545. listening at the specified <command>ip_port</command> on the
  3546. specified <command>ip_addr</command>, which can be an IPv4 or IPv6
  3547. address. An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
  3548. interpreted as the IPv4 wildcard address; connections will be
  3549. accepted on any of the system's IPv4 addresses.
  3550. To listen on the IPv6 wildcard address,
  3551. use an <command>ip_addr</command> of <literal>::</literal>.
  3552. If you will only use <command>rndc</command> on the local host,
  3553. using the loopback address (<literal>127.0.0.1</literal>
  3554. or <literal>::1</literal>) is recommended for maximum security.
  3555. </para>
  3556. <para>
  3557. If no port is specified, port 953 is used. The asterisk
  3558. "<literal>*</literal>" cannot be used for <command>ip_port</command>.
  3559. </para>
  3560. <para>
  3561. The ability to issue commands over the control channel is
  3562. restricted by the <command>allow</command> and
  3563. <command>keys</command> clauses.
  3564. Connections to the control channel are permitted based on the
  3565. <command>address_match_list</command>. This is for simple
  3566. IP address based filtering only; any <command>key_id</command>
  3567. elements of the <command>address_match_list</command>
  3568. are ignored.
  3569. </para>
  3570. <para>
  3571. A <command>unix</command> control channel is a UNIX domain
  3572. socket listening at the specified path in the file system.
  3573. Access to the socket is specified by the <command>perm</command>,
  3574. <command>owner</command> and <command>group</command> clauses.
  3575. Note on some platforms (SunOS and Solaris) the permissions
  3576. (<command>perm</command>) are applied to the parent directory
  3577. as the permissions on the socket itself are ignored.
  3578. </para>
  3579. <para>
  3580. The primary authorization mechanism of the command
  3581. channel is the <command>key_list</command>, which
  3582. contains a list of <command>key_id</command>s.
  3583. Each <command>key_id</command> in the <command>key_list</command>
  3584. is authorized to execute commands over the control channel.
  3585. See <xref linkend="rndc"/> in <xref linkend="admin_tools"/>)
  3586. for information about configuring keys in <command>rndc</command>.
  3587. </para>
  3588. <para>
  3589. If no <command>controls</command> statement is present,
  3590. <command>named</command> will set up a default
  3591. control channel listening on the loopback address 127.0.0.1
  3592. and its IPv6 counterpart ::1.
  3593. In this case, and also when the <command>controls</command> statement
  3594. is present but does not have a <command>keys</command> clause,
  3595. <command>named</command> will attempt to load the command channel key
  3596. from the file <filename>rndc.key</filename> in
  3597. <filename>/etc</filename> (or whatever <varname>sysconfdir</varname>
  3598. was specified as when <acronym>BIND</acronym> was built).
  3599. To create a <filename>rndc.key</filename> file, run
  3600. <userinput>rndc-confgen -a</userinput>.
  3601. </para>
  3602. <para>
  3603. The <filename>rndc.key</filename> feature was created to
  3604. ease the transition of systems from <acronym>BIND</acronym> 8,
  3605. which did not have digital signatures on its command channel
  3606. messages and thus did not have a <command>keys</command> clause.
  3607. It makes it possible to use an existing <acronym>BIND</acronym> 8
  3608. configuration file in <acronym>BIND</acronym> 9 unchanged,
  3609. and still have <command>rndc</command> work the same way
  3610. <command>ndc</command> worked in BIND 8, simply by executing the
  3611. command <userinput>rndc-confgen -a</userinput> after BIND 9 is
  3612. installed.
  3613. </para>
  3614. <para>
  3615. Since the <filename>rndc.key</filename> feature
  3616. is only intended to allow the backward-compatible usage of
  3617. <acronym>BIND</acronym> 8 configuration files, this
  3618. feature does not
  3619. have a high degree of configurability. You cannot easily change
  3620. the key name or the size of the secret, so you should make a
  3621. <filename>rndc.conf</filename> with your own key if you
  3622. wish to change
  3623. those things. The <filename>rndc.key</filename> file
  3624. also has its
  3625. permissions set such that only the owner of the file (the user that
  3626. <command>named</command> is running as) can access it.
  3627. If you
  3628. desire greater flexibility in allowing other users to access
  3629. <command>rndc</command> commands, then you need to create
  3630. a
  3631. <filename>rndc.conf</filename> file and make it group
  3632. readable by a group
  3633. that contains the users who should have access.
  3634. </para>
  3635. <para>
  3636. To disable the command channel, use an empty
  3637. <command>controls</command> statement:
  3638. <command>controls { };</command>.
  3639. </para>
  3640. </sect2>
  3641. <sect2>
  3642. <title><command>include</command> Statement Grammar</title>
  3643. <programlisting><command>include</command> <replaceable>filename</replaceable>;</programlisting>
  3644. </sect2>
  3645. <sect2>
  3646. <title><command>include</command> Statement Definition and
  3647. Usage</title>
  3648. <para>
  3649. The <command>include</command> statement inserts the
  3650. specified file at the point where the <command>include</command>
  3651. statement is encountered. The <command>include</command>
  3652. statement facilitates the administration of configuration
  3653. files
  3654. by permitting the reading or writing of some things but not
  3655. others. For example, the statement could include private keys
  3656. that are readable only by the name server.
  3657. </para>
  3658. </sect2>
  3659. <sect2>
  3660. <title><command>key</command> Statement Grammar</title>
  3661. <programlisting><command>key</command> <replaceable>key_id</replaceable> {
  3662. algorithm <replaceable>string</replaceable>;
  3663. secret <replaceable>string</replaceable>;
  3664. };
  3665. </programlisting>
  3666. </sect2>
  3667. <sect2>
  3668. <title><command>key</command> Statement Definition and Usage</title>
  3669. <para>
  3670. The <command>key</command> statement defines a shared
  3671. secret key for use with TSIG (see <xref linkend="tsig"/>)
  3672. or the command channel
  3673. (see <xref linkend="controls_statement_definition_and_usage"/>).
  3674. </para>
  3675. <para>
  3676. The <command>key</command> statement can occur at the
  3677. top level
  3678. of the configuration file or inside a <command>view</command>
  3679. statement. Keys defined in top-level <command>key</command>
  3680. statements can be used in all views. Keys intended for use in
  3681. a <command>controls</command> statement
  3682. (see <xref linkend="controls_statement_definition_and_usage"/>)
  3683. must be defined at the top level.
  3684. </para>
  3685. <para>
  3686. The <replaceable>key_id</replaceable>, also known as the
  3687. key name, is a domain name uniquely identifying the key. It can
  3688. be used in a <command>server</command>
  3689. statement to cause requests sent to that
  3690. server to be signed with this key, or in address match lists to
  3691. verify that incoming requests have been signed with a key
  3692. matching this name, algorithm, and secret.
  3693. </para>
  3694. <para>
  3695. The <replaceable>algorithm_id</replaceable> is a string
  3696. that specifies a security/authentication algorithm. Named
  3697. supports <literal>hmac-md5</literal>,
  3698. <literal>hmac-sha1</literal>, <literal>hmac-sha224</literal>,
  3699. <literal>hmac-sha256</literal>, <literal>hmac-sha384</literal>
  3700. and <literal>hmac-sha512</literal> TSIG authentication.
  3701. Truncated hashes are supported by appending the minimum
  3702. number of required bits preceded by a dash, e.g.
  3703. <literal>hmac-sha1-80</literal>. The
  3704. <replaceable>secret_string</replaceable> is the secret
  3705. to be used by the algorithm, and is treated as a base-64
  3706. encoded string.
  3707. </para>
  3708. </sect2>
  3709. <sect2>
  3710. <title><command>logging</command> Statement Grammar</title>
  3711. <programlisting><command>logging</command> {
  3712. [ <command>channel</command> <replaceable>channel_name</replaceable> {
  3713. ( <command>file</command> <replaceable>path_name</replaceable>
  3714. [ <command>versions</command> ( <replaceable>number</replaceable> | <command>unlimited</command> ) ]
  3715. [ <command>size</command> <replaceable>size spec</replaceable> ]
  3716. | <command>syslog</command> <replaceable>syslog_facility</replaceable>
  3717. | <command>stderr</command>
  3718. | <command>null</command> );
  3719. [ <command>severity</command> (<option>critical</option> | <option>error</option> | <option>warning</option> | <option>notice</option> |
  3720. <option>info</option> | <option>debug</option> [ <replaceable>level</replaceable> ] | <option>dynamic</option> ); ]
  3721. [ <command>print-category</command> <option>yes</option> or <option>no</option>; ]
  3722. [ <command>print-severity</command> <option>yes</option> or <option>no</option>; ]
  3723. [ <command>print-time</command> <option>yes</option> or <option>no</option>; ]
  3724. }; ]
  3725. [ <command>category</command> <replaceable>category_name</replaceable> {
  3726. <replaceable>channel_name</replaceable> ; [ <replaceable>channel_name</replaceable> ; ... ]
  3727. }; ]
  3728. ...
  3729. };
  3730. </programlisting>
  3731. </sect2>
  3732. <sect2>
  3733. <title><command>logging</command> Statement Definition and
  3734. Usage</title>
  3735. <para>
  3736. The <command>logging</command> statement configures a
  3737. wide
  3738. variety of logging options for the name server. Its <command>channel</command> phrase
  3739. associates output methods, format options and severity levels with
  3740. a name that can then be used with the <command>category</command> phrase
  3741. to select how various classes of messages are logged.
  3742. </para>
  3743. <para>
  3744. Only one <command>logging</command> statement is used to
  3745. define
  3746. as many channels and categories as are wanted. If there is no <command>logging</command> statement,
  3747. the logging configuration will be:
  3748. </para>
  3749. <programlisting>logging {
  3750. category default { default_syslog; default_debug; };
  3751. category unmatched { null; };
  3752. };
  3753. </programlisting>
  3754. <para>
  3755. In <acronym>BIND</acronym> 9, the logging configuration
  3756. is only established when
  3757. the entire configuration file has been parsed. In <acronym>BIND</acronym> 8, it was
  3758. established as soon as the <command>logging</command>
  3759. statement
  3760. was parsed. When the server is starting up, all logging messages
  3761. regarding syntax errors in the configuration file go to the default
  3762. channels, or to standard error if the "<option>-g</option>" option
  3763. was specified.
  3764. </para>
  3765. <sect3>
  3766. <title>The <command>channel</command> Phrase</title>
  3767. <para>
  3768. All log output goes to one or more <emphasis>channels</emphasis>;
  3769. you can make as many of them as you want.
  3770. </para>
  3771. <para>
  3772. Every channel definition must include a destination clause that
  3773. says whether messages selected for the channel go to a file, to a
  3774. particular syslog facility, to the standard error stream, or are
  3775. discarded. It can optionally also limit the message severity level
  3776. that will be accepted by the channel (the default is
  3777. <command>info</command>), and whether to include a
  3778. <command>named</command>-generated time stamp, the
  3779. category name
  3780. and/or severity level (the default is not to include any).
  3781. </para>
  3782. <para>
  3783. The <command>null</command> destination clause
  3784. causes all messages sent to the channel to be discarded;
  3785. in that case, other options for the channel are meaningless.
  3786. </para>
  3787. <para>
  3788. The <command>file</command> destination clause directs
  3789. the channel
  3790. to a disk file. It can include limitations
  3791. both on how large the file is allowed to become, and how many
  3792. versions
  3793. of the file will be saved each time the file is opened.
  3794. </para>
  3795. <para>
  3796. If you use the <command>versions</command> log file
  3797. option, then
  3798. <command>named</command> will retain that many backup
  3799. versions of the file by
  3800. renaming them when opening. For example, if you choose to keep
  3801. three old versions
  3802. of the file <filename>lamers.log</filename>, then just
  3803. before it is opened
  3804. <filename>lamers.log.1</filename> is renamed to
  3805. <filename>lamers.log.2</filename>, <filename>lamers.log.0</filename> is renamed
  3806. to <filename>lamers.log.1</filename>, and <filename>lamers.log</filename> is
  3807. renamed to <filename>lamers.log.0</filename>.
  3808. You can say <command>versions unlimited</command> to
  3809. not limit
  3810. the number of versions.
  3811. If a <command>size</command> option is associated with
  3812. the log file,
  3813. then renaming is only done when the file being opened exceeds the
  3814. indicated size. No backup versions are kept by default; any
  3815. existing
  3816. log file is simply appended.
  3817. </para>
  3818. <para>
  3819. The <command>size</command> option for files is used
  3820. to limit log
  3821. growth. If the file ever exceeds the size, then <command>named</command> will
  3822. stop writing to the file unless it has a <command>versions</command> option
  3823. associated with it. If backup versions are kept, the files are
  3824. rolled as
  3825. described above and a new one begun. If there is no
  3826. <command>versions</command> option, no more data will
  3827. be written to the log
  3828. until some out-of-band mechanism removes or truncates the log to
  3829. less than the
  3830. maximum size. The default behavior is not to limit the size of
  3831. the
  3832. file.
  3833. </para>
  3834. <para>
  3835. Example usage of the <command>size</command> and
  3836. <command>versions</command> options:
  3837. </para>
  3838. <programlisting>channel an_example_channel {
  3839. file "example.log" versions 3 size 20m;
  3840. print-time yes;
  3841. print-category yes;
  3842. };
  3843. </programlisting>
  3844. <para>
  3845. The <command>syslog</command> destination clause
  3846. directs the
  3847. channel to the system log. Its argument is a
  3848. syslog facility as described in the <command>syslog</command> man
  3849. page. Known facilities are <command>kern</command>, <command>user</command>,
  3850. <command>mail</command>, <command>daemon</command>, <command>auth</command>,
  3851. <command>syslog</command>, <command>lpr</command>, <command>news</command>,
  3852. <command>uucp</command>, <command>cron</command>, <command>authpriv</command>,
  3853. <command>ftp</command>, <command>local0</command>, <command>local1</command>,
  3854. <command>local2</command>, <command>local3</command>, <command>local4</command>,
  3855. <command>local5</command>, <command>local6</command> and
  3856. <command>local7</command>, however not all facilities
  3857. are supported on
  3858. all operating systems.
  3859. How <command>syslog</command> will handle messages
  3860. sent to
  3861. this facility is described in the <command>syslog.conf</command> man
  3862. page. If you have a system which uses a very old version of <command>syslog</command> that
  3863. only uses two arguments to the <command>openlog()</command> function,
  3864. then this clause is silently ignored.
  3865. </para>
  3866. <para>
  3867. The <command>severity</command> clause works like <command>syslog</command>'s
  3868. "priorities", except that they can also be used if you are writing
  3869. straight to a file rather than using <command>syslog</command>.
  3870. Messages which are not at least of the severity level given will
  3871. not be selected for the channel; messages of higher severity
  3872. levels
  3873. will be accepted.
  3874. </para>
  3875. <para>
  3876. If you are using <command>syslog</command>, then the <command>syslog.conf</command> priorities
  3877. will also determine what eventually passes through. For example,
  3878. defining a channel facility and severity as <command>daemon</command> and <command>debug</command> but
  3879. only logging <command>daemon.warning</command> via <command>syslog.conf</command> will
  3880. cause messages of severity <command>info</command> and
  3881. <command>notice</command> to
  3882. be dropped. If the situation were reversed, with <command>named</command> writing
  3883. messages of only <command>warning</command> or higher,
  3884. then <command>syslogd</command> would
  3885. print all messages it received from the channel.
  3886. </para>
  3887. <para>
  3888. The <command>stderr</command> destination clause
  3889. directs the
  3890. channel to the server's standard error stream. This is intended
  3891. for
  3892. use when the server is running as a foreground process, for
  3893. example
  3894. when debugging a configuration.
  3895. </para>
  3896. <para>
  3897. The server can supply extensive debugging information when
  3898. it is in debugging mode. If the server's global debug level is
  3899. greater
  3900. than zero, then debugging mode will be active. The global debug
  3901. level is set either by starting the <command>named</command> server
  3902. with the <option>-d</option> flag followed by a positive integer,
  3903. or by running <command>rndc trace</command>.
  3904. The global debug level
  3905. can be set to zero, and debugging mode turned off, by running <command>rndc
  3906. notrace</command>. All debugging messages in the server have a debug
  3907. level, and higher debug levels give more detailed output. Channels
  3908. that specify a specific debug severity, for example:
  3909. </para>
  3910. <programlisting>channel specific_debug_level {
  3911. file "foo";
  3912. severity debug 3;
  3913. };
  3914. </programlisting>
  3915. <para>
  3916. will get debugging output of level 3 or less any time the
  3917. server is in debugging mode, regardless of the global debugging
  3918. level. Channels with <command>dynamic</command>
  3919. severity use the
  3920. server's global debug level to determine what messages to print.
  3921. </para>
  3922. <para>
  3923. If <command>print-time</command> has been turned on,
  3924. then
  3925. the date and time will be logged. <command>print-time</command> may
  3926. be specified for a <command>syslog</command> channel,
  3927. but is usually
  3928. pointless since <command>syslog</command> also logs
  3929. the date and
  3930. time. If <command>print-category</command> is
  3931. requested, then the
  3932. category of the message will be logged as well. Finally, if <command>print-severity</command> is
  3933. on, then the severity level of the message will be logged. The <command>print-</command> options may
  3934. be used in any combination, and will always be printed in the
  3935. following
  3936. order: time, category, severity. Here is an example where all
  3937. three <command>print-</command> options
  3938. are on:
  3939. </para>
  3940. <para>
  3941. <computeroutput>28-Feb-2000 15:05:32.863 general: notice: running</computeroutput>
  3942. </para>
  3943. <para>
  3944. There are four predefined channels that are used for
  3945. <command>named</command>'s default logging as follows.
  3946. How they are
  3947. used is described in <xref linkend="the_category_phrase"/>.
  3948. </para>
  3949. <programlisting>channel default_syslog {
  3950. // send to syslog's daemon facility
  3951. syslog daemon;
  3952. // only send priority info and higher
  3953. severity info;
  3954. channel default_debug {
  3955. // write to named.run in the working directory
  3956. // Note: stderr is used instead of "named.run" if
  3957. // the server is started with the '-f' option.
  3958. file "named.run";
  3959. // log at the server's current debug level
  3960. severity dynamic;
  3961. };
  3962. channel default_stderr {
  3963. // writes to stderr
  3964. stderr;
  3965. // only send priority info and higher
  3966. severity info;
  3967. };
  3968. channel null {
  3969. // toss anything sent to this channel
  3970. null;
  3971. };
  3972. </programlisting>
  3973. <para>
  3974. The <command>default_debug</command> channel has the
  3975. special
  3976. property that it only produces output when the server's debug
  3977. level is
  3978. nonzero. It normally writes to a file called <filename>named.run</filename>
  3979. in the server's working directory.
  3980. </para>
  3981. <para>
  3982. For security reasons, when the "<option>-u</option>"
  3983. command line option is used, the <filename>named.run</filename> file
  3984. is created only after <command>named</command> has
  3985. changed to the
  3986. new UID, and any debug output generated while <command>named</command> is
  3987. starting up and still running as root is discarded. If you need
  3988. to capture this output, you must run the server with the "<option>-g</option>"
  3989. option and redirect standard error to a file.
  3990. </para>
  3991. <para>
  3992. Once a channel is defined, it cannot be redefined. Thus you
  3993. cannot alter the built-in channels directly, but you can modify
  3994. the default logging by pointing categories at channels you have
  3995. defined.
  3996. </para>
  3997. </sect3>
  3998. <sect3 id="the_category_phrase">
  3999. <title>The <command>category</command> Phrase</title>
  4000. <para>
  4001. There are many categories, so you can send the logs you want
  4002. to see wherever you want, without seeing logs you don't want. If
  4003. you don't specify a list of channels for a category, then log
  4004. messages
  4005. in that category will be sent to the <command>default</command> category
  4006. instead. If you don't specify a default category, the following
  4007. "default default" is used:
  4008. </para>
  4009. <programlisting>category default { default_syslog; default_debug; };
  4010. </programlisting>
  4011. <para>
  4012. As an example, let's say you want to log security events to
  4013. a file, but you also want keep the default logging behavior. You'd
  4014. specify the following:
  4015. </para>
  4016. <programlisting>channel my_security_channel {
  4017. file "my_security_file";
  4018. severity info;
  4019. };
  4020. category security {
  4021. my_security_channel;
  4022. default_syslog;
  4023. default_debug;
  4024. };</programlisting>
  4025. <para>
  4026. To discard all messages in a category, specify the <command>null</command> channel:
  4027. </para>
  4028. <programlisting>category xfer-out { null; };
  4029. category notify { null; };
  4030. </programlisting>
  4031. <para>
  4032. Following are the available categories and brief descriptions
  4033. of the types of log information they contain. More
  4034. categories may be added in future <acronym>BIND</acronym> releases.
  4035. </para>
  4036. <informaltable colsep="0" rowsep="0">
  4037. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  4038. <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
  4039. <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
  4040. <tbody>
  4041. <row rowsep="0">
  4042. <entry colname="1">
  4043. <para><command>default</command></para>
  4044. </entry>
  4045. <entry colname="2">
  4046. <para>
  4047. The default category defines the logging
  4048. options for those categories where no specific
  4049. configuration has been
  4050. defined.
  4051. </para>
  4052. </entry>
  4053. </row>
  4054. <row rowsep="0">
  4055. <entry colname="1">
  4056. <para><command>general</command></para>
  4057. </entry>
  4058. <entry colname="2">
  4059. <para>
  4060. The catch-all. Many things still aren't
  4061. classified into categories, and they all end up here.
  4062. </para>
  4063. </entry>
  4064. </row>
  4065. <row rowsep="0">
  4066. <entry colname="1">
  4067. <para><command>database</command></para>
  4068. </entry>
  4069. <entry colname="2">
  4070. <para>
  4071. Messages relating to the databases used
  4072. internally by the name server to store zone and cache
  4073. data.
  4074. </para>
  4075. </entry>
  4076. </row>
  4077. <row rowsep="0">
  4078. <entry colname="1">
  4079. <para><command>security</command></para>
  4080. </entry>
  4081. <entry colname="2">
  4082. <para>
  4083. Approval and denial of requests.
  4084. </para>
  4085. </entry>
  4086. </row>
  4087. <row rowsep="0">
  4088. <entry colname="1">
  4089. <para><command>config</command></para>
  4090. </entry>
  4091. <entry colname="2">
  4092. <para>
  4093. Configuration file parsing and processing.
  4094. </para>
  4095. </entry>
  4096. </row>
  4097. <row rowsep="0">
  4098. <entry colname="1">
  4099. <para><command>resolver</command></para>
  4100. </entry>
  4101. <entry colname="2">
  4102. <para>
  4103. DNS resolution, such as the recursive
  4104. lookups performed on behalf of clients by a caching name
  4105. server.
  4106. </para>
  4107. </entry>
  4108. </row>
  4109. <row rowsep="0">
  4110. <entry colname="1">
  4111. <para><command>xfer-in</command></para>
  4112. </entry>
  4113. <entry colname="2">
  4114. <para>
  4115. Zone transfers the server is receiving.
  4116. </para>
  4117. </entry>
  4118. </row>
  4119. <row rowsep="0">
  4120. <entry colname="1">
  4121. <para><command>xfer-out</command></para>
  4122. </entry>
  4123. <entry colname="2">
  4124. <para>
  4125. Zone transfers the server is sending.
  4126. </para>
  4127. </entry>
  4128. </row>
  4129. <row rowsep="0">
  4130. <entry colname="1">
  4131. <para><command>notify</command></para>
  4132. </entry>
  4133. <entry colname="2">
  4134. <para>
  4135. The NOTIFY protocol.
  4136. </para>
  4137. </entry>
  4138. </row>
  4139. <row rowsep="0">
  4140. <entry colname="1">
  4141. <para><command>client</command></para>
  4142. </entry>
  4143. <entry colname="2">
  4144. <para>
  4145. Processing of client requests.
  4146. </para>
  4147. </entry>
  4148. </row>
  4149. <row rowsep="0">
  4150. <entry colname="1">
  4151. <para><command>unmatched</command></para>
  4152. </entry>
  4153. <entry colname="2">
  4154. <para>
  4155. Messages that <command>named</command> was unable to determine the
  4156. class of or for which there was no matching <command>view</command>.
  4157. A one line summary is also logged to the <command>client</command> category.
  4158. This category is best sent to a file or stderr, by
  4159. default it is sent to
  4160. the <command>null</command> channel.
  4161. </para>
  4162. </entry>
  4163. </row>
  4164. <row rowsep="0">
  4165. <entry colname="1">
  4166. <para><command>network</command></para>
  4167. </entry>
  4168. <entry colname="2">
  4169. <para>
  4170. Network operations.
  4171. </para>
  4172. </entry>
  4173. </row>
  4174. <row rowsep="0">
  4175. <entry colname="1">
  4176. <para><command>update</command></para>
  4177. </entry>
  4178. <entry colname="2">
  4179. <para>
  4180. Dynamic updates.
  4181. </para>
  4182. </entry>
  4183. </row>
  4184. <row rowsep="0">
  4185. <entry colname="1">
  4186. <para><command>update-security</command></para>
  4187. </entry>
  4188. <entry colname="2">
  4189. <para>
  4190. Approval and denial of update requests.
  4191. </para>
  4192. </entry>
  4193. </row>
  4194. <row rowsep="0">
  4195. <entry colname="1">
  4196. <para><command>queries</command></para>
  4197. </entry>
  4198. <entry colname="2">
  4199. <para>
  4200. Specify where queries should be logged to.
  4201. </para>
  4202. <para>
  4203. At startup, specifying the category <command>queries</command> will also
  4204. enable query logging unless <command>querylog</command> option has been
  4205. specified.
  4206. </para>
  4207. <para>
  4208. The query log entry reports the client's IP
  4209. address and port number, and the query name,
  4210. class and type. Next it reports whether the
  4211. Recursion Desired flag was set (+ if set, -
  4212. if not set), if the query was signed (S),
  4213. EDNS was in use (E), if TCP was used (T), if
  4214. DO (DNSSEC Ok) was set (D), or if CD (Checking
  4215. Disabled) was set (C). After this the
  4216. destination address the query was sent to is
  4217. reported.
  4218. </para>
  4219. <para>
  4220. <computeroutput>client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</computeroutput>
  4221. </para>
  4222. <para>
  4223. <computeroutput>client ::1#62537: query: www.example.net IN AAAA -SE</computeroutput>
  4224. </para>
  4225. </entry>
  4226. </row>
  4227. <row rowsep="0">
  4228. <entry colname="1">
  4229. <para><command>query-errors</command></para>
  4230. </entry>
  4231. <entry colname="2">
  4232. <para>
  4233. Information about queries that resulted in some
  4234. failure.
  4235. </para>
  4236. </entry>
  4237. </row>
  4238. <row rowsep="0">
  4239. <entry colname="1">
  4240. <para><command>dispatch</command></para>
  4241. </entry>
  4242. <entry colname="2">
  4243. <para>
  4244. Dispatching of incoming packets to the
  4245. server modules where they are to be processed.
  4246. </para>
  4247. </entry>
  4248. </row>
  4249. <row rowsep="0">
  4250. <entry colname="1">
  4251. <para><command>dnssec</command></para>
  4252. </entry>
  4253. <entry colname="2">
  4254. <para>
  4255. DNSSEC and TSIG protocol processing.
  4256. </para>
  4257. </entry>
  4258. </row>
  4259. <row rowsep="0">
  4260. <entry colname="1">
  4261. <para><command>lame-servers</command></para>
  4262. </entry>
  4263. <entry colname="2">
  4264. <para>
  4265. Lame servers. These are misconfigurations
  4266. in remote servers, discovered by BIND 9 when trying to
  4267. query those servers during resolution.
  4268. </para>
  4269. </entry>
  4270. </row>
  4271. <row rowsep="0">
  4272. <entry colname="1">
  4273. <para><command>delegation-only</command></para>
  4274. </entry>
  4275. <entry colname="2">
  4276. <para>
  4277. Delegation only. Logs queries that have been
  4278. forced to NXDOMAIN as the result of a
  4279. delegation-only zone or a
  4280. <command>delegation-only</command> in a hint
  4281. or stub zone declaration.
  4282. </para>
  4283. </entry>
  4284. </row>
  4285. <row rowsep="0">
  4286. <entry colname="1">
  4287. <para><command>edns-disabled</command></para>
  4288. </entry>
  4289. <entry colname="2">
  4290. <para>
  4291. Log queries that have been forced to use plain
  4292. DNS due to timeouts. This is often due to
  4293. the remote servers not being RFC 1034 compliant
  4294. (not always returning FORMERR or similar to
  4295. EDNS queries and other extensions to the DNS
  4296. when they are not understood). In other words, this is
  4297. targeted at servers that fail to respond to
  4298. DNS queries that they don't understand.
  4299. </para>
  4300. <para>
  4301. Note: the log message can also be due to
  4302. packet loss. Before reporting servers for
  4303. non-RFC 1034 compliance they should be re-tested
  4304. to determine the nature of the non-compliance.
  4305. This testing should prevent or reduce the
  4306. number of false-positive reports.
  4307. </para>
  4308. <para>
  4309. Note: eventually <command>named</command> will have to stop
  4310. treating such timeouts as due to RFC 1034 non
  4311. compliance and start treating it as plain
  4312. packet loss. Falsely classifying packet
  4313. loss as due to RFC 1034 non compliance impacts
  4314. on DNSSEC validation which requires EDNS for
  4315. the DNSSEC records to be returned.
  4316. </para>
  4317. </entry>
  4318. </row>
  4319. <row rowsep="0">
  4320. <entry colname="1">
  4321. <para><command>RPZ</command></para>
  4322. </entry>
  4323. <entry colname="2">
  4324. <para>
  4325. Information about errors in response policy zone files,
  4326. rewritten responses, and at the highest
  4327. <command>debug</command> levels, mere rewriting
  4328. attempts.
  4329. </para>
  4330. </entry>
  4331. </row>
  4332. </tbody>
  4333. </tgroup>
  4334. </informaltable>
  4335. </sect3>
  4336. <sect3>
  4337. <title>The <command>query-errors</command> Category</title>
  4338. <para>
  4339. The <command>query-errors</command> category is
  4340. specifically intended for debugging purposes: To identify
  4341. why and how specific queries result in responses which
  4342. indicate an error.
  4343. Messages of this category are therefore only logged
  4344. with <command>debug</command> levels.
  4345. </para>
  4346. <para>
  4347. At the debug levels of 1 or higher, each response with the
  4348. rcode of SERVFAIL is logged as follows:
  4349. </para>
  4350. <para>
  4351. <computeroutput>client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</computeroutput>
  4352. </para>
  4353. <para>
  4354. This means an error resulting in SERVFAIL was
  4355. detected at line 3880 of source file
  4356. <filename>query.c</filename>.
  4357. Log messages of this level will particularly
  4358. help identify the cause of SERVFAIL for an
  4359. authoritative server.
  4360. </para>
  4361. <para>
  4362. At the debug levels of 2 or higher, detailed context
  4363. information of recursive resolutions that resulted in
  4364. SERVFAIL is logged.
  4365. The log message will look like as follows:
  4366. </para>
  4367. <para>
  4368. <!-- NOTE: newlines and some spaces added so this would fit on page -->
  4369. <programlisting>
  4370. fetch completed at resolver.c:2970 for www.example.com/A
  4371. in 30.000183: timed out/success [domain:example.com,
  4372. referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
  4373. badresp:1,adberr:0,findfail:0,valfail:0]
  4374. </programlisting>
  4375. </para>
  4376. <para>
  4377. The first part before the colon shows that a recursive
  4378. resolution for AAAA records of www.example.com completed
  4379. in 30.000183 seconds and the final result that led to the
  4380. SERVFAIL was determined at line 2970 of source file
  4381. <filename>resolver.c</filename>.
  4382. </para>
  4383. <para>
  4384. The following part shows the detected final result and the
  4385. latest result of DNSSEC validation.
  4386. The latter is always success when no validation attempt
  4387. is made.
  4388. In this example, this query resulted in SERVFAIL probably
  4389. because all name servers are down or unreachable, leading
  4390. to a timeout in 30 seconds.
  4391. DNSSEC validation was probably not attempted.
  4392. </para>
  4393. <para>
  4394. The last part enclosed in square brackets shows statistics
  4395. information collected for this particular resolution
  4396. attempt.
  4397. The <varname>domain</varname> field shows the deepest zone
  4398. that the resolver reached;
  4399. it is the zone where the error was finally detected.
  4400. The meaning of the other fields is summarized in the
  4401. following table.
  4402. </para>
  4403. <informaltable colsep="0" rowsep="0">
  4404. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  4405. <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
  4406. <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
  4407. <tbody>
  4408. <row rowsep="0">
  4409. <entry colname="1">
  4410. <para><varname>referral</varname></para>
  4411. </entry>
  4412. <entry colname="2">
  4413. <para>
  4414. The number of referrals the resolver received
  4415. throughout the resolution process.
  4416. In the above example this is 2, which are most
  4417. likely com and example.com.
  4418. </para>
  4419. </entry>
  4420. </row>
  4421. <row rowsep="0">
  4422. <entry colname="1">
  4423. <para><varname>restart</varname></para>
  4424. </entry>
  4425. <entry colname="2">
  4426. <para>
  4427. The number of cycles that the resolver tried
  4428. remote servers at the <varname>domain</varname>
  4429. zone.
  4430. In each cycle the resolver sends one query
  4431. (possibly resending it, depending on the response)
  4432. to each known name server of
  4433. the <varname>domain</varname> zone.
  4434. </para>
  4435. </entry>
  4436. </row>
  4437. <row rowsep="0">
  4438. <entry colname="1">
  4439. <para><varname>qrysent</varname></para>
  4440. </entry>
  4441. <entry colname="2">
  4442. <para>
  4443. The number of queries the resolver sent at the
  4444. <varname>domain</varname> zone.
  4445. </para>
  4446. </entry>
  4447. </row>
  4448. <row rowsep="0">
  4449. <entry colname="1">
  4450. <para><varname>timeout</varname></para>
  4451. </entry>
  4452. <entry colname="2">
  4453. <para>
  4454. The number of timeouts since the resolver
  4455. received the last response.
  4456. </para>
  4457. </entry>
  4458. </row>
  4459. <row rowsep="0">
  4460. <entry colname="1">
  4461. <para><varname>lame</varname></para>
  4462. </entry>
  4463. <entry colname="2">
  4464. <para>
  4465. The number of lame servers the resolver detected
  4466. at the <varname>domain</varname> zone.
  4467. A server is detected to be lame either by an
  4468. invalid response or as a result of lookup in
  4469. BIND9's address database (ADB), where lame
  4470. servers are cached.
  4471. </para>
  4472. </entry>
  4473. </row>
  4474. <row rowsep="0">
  4475. <entry colname="1">
  4476. <para><varname>neterr</varname></para>
  4477. </entry>
  4478. <entry colname="2">
  4479. <para>
  4480. The number of erroneous results that the
  4481. resolver encountered in sending queries
  4482. at the <varname>domain</varname> zone.
  4483. One common case is the remote server is
  4484. unreachable and the resolver receives an ICMP
  4485. unreachable error message.
  4486. </para>
  4487. </entry>
  4488. </row>
  4489. <row rowsep="0">
  4490. <entry colname="1">
  4491. <para><varname>badresp</varname></para>
  4492. </entry>
  4493. <entry colname="2">
  4494. <para>
  4495. The number of unexpected responses (other than
  4496. <varname>lame</varname>) to queries sent by the
  4497. resolver at the <varname>domain</varname> zone.
  4498. </para>
  4499. </entry>
  4500. </row>
  4501. <row rowsep="0">
  4502. <entry colname="1">
  4503. <para><varname>adberr</varname></para>
  4504. </entry>
  4505. <entry colname="2">
  4506. <para>
  4507. Failures in finding remote server addresses
  4508. of the <varname>domain</varname> zone in the ADB.
  4509. One common case of this is that the remote
  4510. server's name does not have any address records.
  4511. </para>
  4512. </entry>
  4513. </row>
  4514. <row rowsep="0">
  4515. <entry colname="1">
  4516. <para><varname>findfail</varname></para>
  4517. </entry>
  4518. <entry colname="2">
  4519. <para>
  4520. Failures of resolving remote server addresses.
  4521. This is a total number of failures throughout
  4522. the resolution process.
  4523. </para>
  4524. </entry>
  4525. </row>
  4526. <row rowsep="0">
  4527. <entry colname="1">
  4528. <para><varname>valfail</varname></para>
  4529. </entry>
  4530. <entry colname="2">
  4531. <para>
  4532. Failures of DNSSEC validation.
  4533. Validation failures are counted throughout
  4534. the resolution process (not limited to
  4535. the <varname>domain</varname> zone), but should
  4536. only happen in <varname>domain</varname>.
  4537. </para>
  4538. </entry>
  4539. </row>
  4540. </tbody>
  4541. </tgroup>
  4542. </informaltable>
  4543. <para>
  4544. At the debug levels of 3 or higher, the same messages
  4545. as those at the debug 1 level are logged for other errors
  4546. than SERVFAIL.
  4547. Note that negative responses such as NXDOMAIN are not
  4548. regarded as errors here.
  4549. </para>
  4550. <para>
  4551. At the debug levels of 4 or higher, the same messages
  4552. as those at the debug 2 level are logged for other errors
  4553. than SERVFAIL.
  4554. Unlike the above case of level 3, messages are logged for
  4555. negative responses.
  4556. This is because any unexpected results can be difficult to
  4557. debug in the recursion case.
  4558. </para>
  4559. </sect3>
  4560. </sect2>
  4561. <sect2>
  4562. <title><command>lwres</command> Statement Grammar</title>
  4563. <para>
  4564. This is the grammar of the <command>lwres</command>
  4565. statement in the <filename>named.conf</filename> file:
  4566. </para>
  4567. <programlisting><command>lwres</command> {
  4568. <optional> listen-on { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
  4569. <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  4570. <optional> view <replaceable>view_name</replaceable>; </optional>
  4571. <optional> search { <replaceable>domain_name</replaceable> ; <optional> <replaceable>domain_name</replaceable> ; ... </optional> }; </optional>
  4572. <optional> ndots <replaceable>number</replaceable>; </optional>
  4573. };
  4574. </programlisting>
  4575. </sect2>
  4576. <sect2>
  4577. <title><command>lwres</command> Statement Definition and Usage</title>
  4578. <para>
  4579. The <command>lwres</command> statement configures the
  4580. name
  4581. server to also act as a lightweight resolver server. (See
  4582. <xref linkend="lwresd"/>.) There may be multiple
  4583. <command>lwres</command> statements configuring
  4584. lightweight resolver servers with different properties.
  4585. </para>
  4586. <para>
  4587. The <command>listen-on</command> statement specifies a
  4588. list of
  4589. addresses (and ports) that this instance of a lightweight resolver
  4590. daemon
  4591. should accept requests on. If no port is specified, port 921 is
  4592. used.
  4593. If this statement is omitted, requests will be accepted on
  4594. 127.0.0.1,
  4595. port 921.
  4596. </para>
  4597. <para>
  4598. The <command>view</command> statement binds this
  4599. instance of a
  4600. lightweight resolver daemon to a view in the DNS namespace, so that
  4601. the
  4602. response will be constructed in the same manner as a normal DNS
  4603. query
  4604. matching this view. If this statement is omitted, the default view
  4605. is
  4606. used, and if there is no default view, an error is triggered.
  4607. </para>
  4608. <para>
  4609. The <command>search</command> statement is equivalent to
  4610. the
  4611. <command>search</command> statement in
  4612. <filename>/etc/resolv.conf</filename>. It provides a
  4613. list of domains
  4614. which are appended to relative names in queries.
  4615. </para>
  4616. <para>
  4617. The <command>ndots</command> statement is equivalent to
  4618. the
  4619. <command>ndots</command> statement in
  4620. <filename>/etc/resolv.conf</filename>. It indicates the
  4621. minimum
  4622. number of dots in a relative domain name that should result in an
  4623. exact match lookup before search path elements are appended.
  4624. </para>
  4625. </sect2>
  4626. <sect2>
  4627. <title><command>masters</command> Statement Grammar</title>
  4628. <programlisting>
  4629. <command>masters</command> <replaceable>name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> |
  4630. <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> };
  4631. </programlisting>
  4632. </sect2>
  4633. <sect2>
  4634. <title><command>masters</command> Statement Definition and
  4635. Usage</title>
  4636. <para><command>masters</command>
  4637. lists allow for a common set of masters to be easily used by
  4638. multiple stub and slave zones.
  4639. </para>
  4640. </sect2>
  4641. <sect2>
  4642. <title><command>options</command> Statement Grammar</title>
  4643. <para>
  4644. This is the grammar of the <command>options</command>
  4645. statement in the <filename>named.conf</filename> file:
  4646. </para>
  4647. <programlisting><command>options</command> {
  4648. <optional> attach-cache <replaceable>cache_name</replaceable>; </optional>
  4649. <optional> version <replaceable>version_string</replaceable>; </optional>
  4650. <optional> hostname <replaceable>hostname_string</replaceable>; </optional>
  4651. <optional> server-id <replaceable>server_id_string</replaceable>; </optional>
  4652. <optional> directory <replaceable>path_name</replaceable>; </optional>
  4653. <optional> key-directory <replaceable>path_name</replaceable>; </optional>
  4654. <optional> managed-keys-directory <replaceable>path_name</replaceable>; </optional>
  4655. <optional> named-xfer <replaceable>path_name</replaceable>; </optional>
  4656. <optional> tkey-gssapi-keytab <replaceable>path_name</replaceable>; </optional>
  4657. <optional> tkey-gssapi-credential <replaceable>principal</replaceable>; </optional>
  4658. <optional> tkey-domain <replaceable>domainname</replaceable>; </optional>
  4659. <optional> tkey-dhkey <replaceable>key_name</replaceable> <replaceable>key_tag</replaceable>; </optional>
  4660. <optional> cache-file <replaceable>path_name</replaceable>; </optional>
  4661. <optional> dump-file <replaceable>path_name</replaceable>; </optional>
  4662. <optional> bindkeys-file <replaceable>path_name</replaceable>; </optional>
  4663. <optional> secroots-file <replaceable>path_name</replaceable>; </optional>
  4664. <optional> session-keyfile <replaceable>path_name</replaceable>; </optional>
  4665. <optional> session-keyname <replaceable>key_name</replaceable>; </optional>
  4666. <optional> session-keyalg <replaceable>algorithm_id</replaceable>; </optional>
  4667. <optional> memstatistics <replaceable>yes_or_no</replaceable>; </optional>
  4668. <optional> memstatistics-file <replaceable>path_name</replaceable>; </optional>
  4669. <optional> pid-file <replaceable>path_name</replaceable>; </optional>
  4670. <optional> recursing-file <replaceable>path_name</replaceable>; </optional>
  4671. <optional> statistics-file <replaceable>path_name</replaceable>; </optional>
  4672. <optional> zone-statistics <replaceable>yes_or_no</replaceable>; </optional>
  4673. <optional> auth-nxdomain <replaceable>yes_or_no</replaceable>; </optional>
  4674. <optional> deallocate-on-exit <replaceable>yes_or_no</replaceable>; </optional>
  4675. <optional> dialup <replaceable>dialup_option</replaceable>; </optional>
  4676. <optional> fake-iquery <replaceable>yes_or_no</replaceable>; </optional>
  4677. <optional> fetch-glue <replaceable>yes_or_no</replaceable>; </optional>
  4678. <optional> flush-zones-on-shutdown <replaceable>yes_or_no</replaceable>; </optional>
  4679. <optional> has-old-clients <replaceable>yes_or_no</replaceable>; </optional>
  4680. <optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
  4681. <optional> host-statistics-max <replaceable>number</replaceable>; </optional>
  4682. <optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
  4683. <optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
  4684. <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable>; </optional>
  4685. <optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
  4686. <optional> rfc2308-type1 <replaceable>yes_or_no</replaceable>; </optional>
  4687. <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
  4688. <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable>; </optional>
  4689. <optional> ixfr-from-differences (<replaceable>yes_or_no</replaceable> | <constant>master</constant> | <constant>slave</constant>); </optional>
  4690. <optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
  4691. <optional> dnssec-validation (<replaceable>yes_or_no</replaceable> | <constant>auto</constant>); </optional>
  4692. <optional> dnssec-lookaside ( <replaceable>auto</replaceable> |
  4693. <replaceable>no</replaceable> |
  4694. <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> ); </optional>
  4695. <optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
  4696. <optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
  4697. <optional> forward ( <replaceable>only</replaceable> | <replaceable>first</replaceable> ); </optional>
  4698. <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  4699. <optional> dual-stack-servers <optional>port <replaceable>ip_port</replaceable></optional> {
  4700. ( <replaceable>domain_name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> |
  4701. <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ) ;
  4702. ... }; </optional>
  4703. <optional> check-names ( <replaceable>master</replaceable> | <replaceable>slave</replaceable> | <replaceable>response</replaceable> )
  4704. ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
  4705. <optional> check-dup-records ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
  4706. <optional> check-mx ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
  4707. <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
  4708. <optional> check-integrity <replaceable>yes_or_no</replaceable>; </optional>
  4709. <optional> check-mx-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
  4710. <optional> check-srv-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
  4711. <optional> check-sibling <replaceable>yes_or_no</replaceable>; </optional>
  4712. <optional> allow-new-zones { <replaceable>yes_or_no</replaceable> }; </optional>
  4713. <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
  4714. <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
  4715. <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
  4716. <optional> allow-query-cache { <replaceable>address_match_list</replaceable> }; </optional>
  4717. <optional> allow-query-cache-on { <replaceable>address_match_list</replaceable> }; </optional>
  4718. <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
  4719. <optional> allow-recursion { <replaceable>address_match_list</replaceable> }; </optional>
  4720. <optional> allow-recursion-on { <replaceable>address_match_list</replaceable> }; </optional>
  4721. <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
  4722. <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
  4723. <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
  4724. <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
  4725. <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ;</optional>
  4726. <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
  4727. <optional> allow-v6-synthesis { <replaceable>address_match_list</replaceable> }; </optional>
  4728. <optional> blackhole { <replaceable>address_match_list</replaceable> }; </optional>
  4729. <optional> use-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
  4730. <optional> avoid-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
  4731. <optional> use-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
  4732. <optional> avoid-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
  4733. <optional> listen-on <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
  4734. <optional> listen-on-v6 <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
  4735. <optional> query-source ( ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> )
  4736. <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> |
  4737. <optional> address ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
  4738. <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
  4739. <optional> query-source-v6 ( ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> )
  4740. <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> |
  4741. <optional> address ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
  4742. <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
  4743. <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
  4744. <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
  4745. <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
  4746. <optional> max-transfer-time-in <replaceable>number</replaceable>; </optional>
  4747. <optional> max-transfer-time-out <replaceable>number</replaceable>; </optional>
  4748. <optional> max-transfer-idle-in <replaceable>number</replaceable>; </optional>
  4749. <optional> max-transfer-idle-out <replaceable>number</replaceable>; </optional>
  4750. <optional> tcp-clients <replaceable>number</replaceable>; </optional>
  4751. <optional> reserved-sockets <replaceable>number</replaceable>; </optional>
  4752. <optional> recursive-clients <replaceable>number</replaceable>; </optional>
  4753. <optional> serial-query-rate <replaceable>number</replaceable>; </optional>
  4754. <optional> serial-queries <replaceable>number</replaceable>; </optional>
  4755. <optional> tcp-listen-queue <replaceable>number</replaceable>; </optional>
  4756. <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable>; </optional>
  4757. <optional> transfers-in <replaceable>number</replaceable>; </optional>
  4758. <optional> transfers-out <replaceable>number</replaceable>; </optional>
  4759. <optional> transfers-per-ns <replaceable>number</replaceable>; </optional>
  4760. <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  4761. <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  4762. <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  4763. <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
  4764. <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  4765. <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
  4766. <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
  4767. <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  4768. <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  4769. <optional> notify-to-soa <replaceable>yes_or_no</replaceable> ; </optional>
  4770. <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
  4771. <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  4772. <optional> max-ixfr-log-size <replaceable>number</replaceable>; </optional>
  4773. <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
  4774. <optional> coresize <replaceable>size_spec</replaceable> ; </optional>
  4775. <optional> datasize <replaceable>size_spec</replaceable> ; </optional>
  4776. <optional> files <replaceable>size_spec</replaceable> ; </optional>
  4777. <optional> stacksize <replaceable>size_spec</replaceable> ; </optional>
  4778. <optional> cleaning-interval <replaceable>number</replaceable>; </optional>
  4779. <optional> heartbeat-interval <replaceable>number</replaceable>; </optional>
  4780. <optional> interface-interval <replaceable>number</replaceable>; </optional>
  4781. <optional> statistics-interval <replaceable>number</replaceable>; </optional>
  4782. <optional> topology { <replaceable>address_match_list</replaceable> }</optional>;
  4783. <optional> sortlist { <replaceable>address_match_list</replaceable> }</optional>;
  4784. <optional> rrset-order { <replaceable>order_spec</replaceable> ; <optional> <replaceable>order_spec</replaceable> ; ... </optional> </optional> };
  4785. <optional> lame-ttl <replaceable>number</replaceable>; </optional>
  4786. <optional> max-ncache-ttl <replaceable>number</replaceable>; </optional>
  4787. <optional> max-cache-ttl <replaceable>number</replaceable>; </optional>
  4788. <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
  4789. <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
  4790. <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
  4791. <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
  4792. <optional> min-roots <replaceable>number</replaceable>; </optional>
  4793. <optional> use-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
  4794. <optional> provide-ixfr <replaceable>yes_or_no</replaceable>; </optional>
  4795. <optional> request-ixfr <replaceable>yes_or_no</replaceable>; </optional>
  4796. <optional> treat-cr-as-space <replaceable>yes_or_no</replaceable> ; </optional>
  4797. <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
  4798. <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
  4799. <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
  4800. <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
  4801. <optional> port <replaceable>ip_port</replaceable>; </optional>
  4802. <optional> additional-from-auth <replaceable>yes_or_no</replaceable> ; </optional>
  4803. <optional> additional-from-cache <replaceable>yes_or_no</replaceable> ; </optional>
  4804. <optional> random-device <replaceable>path_name</replaceable> ; </optional>
  4805. <optional> max-cache-size <replaceable>size_spec</replaceable> ; </optional>
  4806. <optional> match-mapped-addresses <replaceable>yes_or_no</replaceable>; </optional>
  4807. <optional> filter-aaaa-on-v4 ( <replaceable>yes_or_no</replaceable> | <replaceable>break-dnssec</replaceable> ); </optional>
  4808. <optional> filter-aaaa { <replaceable>address_match_list</replaceable> }; </optional>
  4809. <optional> dns64 <replaceable>IPv6-prefix</replaceable> {
  4810. <optional> clients { <replaceable>address_match_list</replaceable> }; </optional>
  4811. <optional> mapped { <replaceable>address_match_list</replaceable> }; </optional>
  4812. <optional> exclude { <replaceable>address_match_list</replaceable> }; </optional>
  4813. <optional> suffix IPv6-address; </optional>
  4814. <optional> recursive-only <replaceable>yes_or_no</replaceable>; </optional>
  4815. <optional> break-dnssec <replaceable>yes_or_no</replaceable>; </optional>
  4816. }; </optional>;
  4817. <optional> dns64-server <replaceable>name</replaceable> </optional>
  4818. <optional> dns64-contact <replaceable>name</replaceable> </optional>
  4819. <optional> preferred-glue ( <replaceable>A</replaceable> | <replaceable>AAAA</replaceable> | <replaceable>NONE</replaceable> ); </optional>
  4820. <optional> edns-udp-size <replaceable>number</replaceable>; </optional>
  4821. <optional> max-udp-size <replaceable>number</replaceable>; </optional>
  4822. <optional> root-delegation-only <optional> exclude { <replaceable>namelist</replaceable> } </optional> ; </optional>
  4823. <optional> querylog <replaceable>yes_or_no</replaceable> ; </optional>
  4824. <optional> disable-algorithms <replaceable>domain</replaceable> { <replaceable>algorithm</replaceable>;
  4825. <optional> <replaceable>algorithm</replaceable>; </optional> }; </optional>
  4826. <optional> acache-enable <replaceable>yes_or_no</replaceable> ; </optional>
  4827. <optional> acache-cleaning-interval <replaceable>number</replaceable>; </optional>
  4828. <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
  4829. <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
  4830. <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
  4831. <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
  4832. <optional> empty-server <replaceable>name</replaceable> ; </optional>
  4833. <optional> empty-contact <replaceable>name</replaceable> ; </optional>
  4834. <optional> empty-zones-enable <replaceable>yes_or_no</replaceable> ; </optional>
  4835. <optional> disable-empty-zone <replaceable>zone_name</replaceable> ; </optional>
  4836. <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
  4837. <optional> zero-no-soa-ttl-cache <replaceable>yes_or_no</replaceable> ; </optional>
  4838. <optional> resolver-query-timeout <replaceable>number</replaceable> ; </optional>
  4839. <optional> deny-answer-addresses { <replaceable>address_match_list</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
  4840. <optional> deny-answer-aliases { <replaceable>namelist</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
  4841. <optional> response-policy { <replaceable>zone_name</replaceable> <optional> policy given | disabled | passthru | nxdomain | nodata | cname <replaceable>domain</replaceable> </optional> ; } ; </optional>
  4842. };
  4843. </programlisting>
  4844. </sect2>
  4845. <sect2 id="options">
  4846. <title><command>options</command> Statement Definition and
  4847. Usage</title>
  4848. <para>
  4849. The <command>options</command> statement sets up global
  4850. options
  4851. to be used by <acronym>BIND</acronym>. This statement
  4852. may appear only
  4853. once in a configuration file. If there is no <command>options</command>
  4854. statement, an options block with each option set to its default will
  4855. be used.
  4856. </para>
  4857. <variablelist>
  4858. <varlistentry>
  4859. <term><command>attach-cache</command></term>
  4860. <listitem>
  4861. <para>
  4862. Allows multiple views to share a single cache
  4863. database.
  4864. Each view has its own cache database by default, but
  4865. if multiple views have the same operational policy
  4866. for name resolution and caching, those views can
  4867. share a single cache to save memory and possibly
  4868. improve resolution efficiency by using this option.
  4869. </para>
  4870. <para>
  4871. The <command>attach-cache</command> option
  4872. may also be specified in <command>view</command>
  4873. statements, in which case it overrides the
  4874. global <command>attach-cache</command> option.
  4875. </para>
  4876. <para>
  4877. The <replaceable>cache_name</replaceable> specifies
  4878. the cache to be shared.
  4879. When the <command>named</command> server configures
  4880. views which are supposed to share a cache, it
  4881. creates a cache with the specified name for the
  4882. first view of these sharing views.
  4883. The rest of the views will simply refer to the
  4884. already created cache.
  4885. </para>
  4886. <para>
  4887. One common configuration to share a cache would be to
  4888. allow all views to share a single cache.
  4889. This can be done by specifying
  4890. the <command>attach-cache</command> as a global
  4891. option with an arbitrary name.
  4892. </para>
  4893. <para>
  4894. Another possible operation is to allow a subset of
  4895. all views to share a cache while the others to
  4896. retain their own caches.
  4897. For example, if there are three views A, B, and C,
  4898. and only A and B should share a cache, specify the
  4899. <command>attach-cache</command> option as a view A (or
  4900. B)'s option, referring to the other view name:
  4901. </para>
  4902. <programlisting>
  4903. view "A" {
  4904. // this view has its own cache
  4905. ...
  4906. };
  4907. view "B" {
  4908. // this view refers to A's cache
  4909. attach-cache "A";
  4910. };
  4911. view "C" {
  4912. // this view has its own cache
  4913. ...
  4914. };
  4915. </programlisting>
  4916. <para>
  4917. Views that share a cache must have the same policy
  4918. on configurable parameters that may affect caching.
  4919. The current implementation requires the following
  4920. configurable options be consistent among these
  4921. views:
  4922. <command>check-names</command>,
  4923. <command>cleaning-interval</command>,
  4924. <command>dnssec-accept-expired</command>,
  4925. <command>dnssec-validation</command>,
  4926. <command>max-cache-ttl</command>,
  4927. <command>max-ncache-ttl</command>,
  4928. <command>max-cache-size</command>, and
  4929. <command>zero-no-soa-ttl</command>.
  4930. </para>
  4931. <para>
  4932. Note that there may be other parameters that may
  4933. cause confusion if they are inconsistent for
  4934. different views that share a single cache.
  4935. For example, if these views define different sets of
  4936. forwarders that can return different answers for the
  4937. same question, sharing the answer does not make
  4938. sense or could even be harmful.
  4939. It is administrator's responsibility to ensure
  4940. configuration differences in different views do
  4941. not cause disruption with a shared cache.
  4942. </para>
  4943. </listitem>
  4944. </varlistentry>
  4945. <varlistentry>
  4946. <term><command>directory</command></term>
  4947. <listitem>
  4948. <para>
  4949. The working directory of the server.
  4950. Any non-absolute pathnames in the configuration file will be
  4951. taken
  4952. as relative to this directory. The default location for most
  4953. server
  4954. output files (e.g. <filename>named.run</filename>)
  4955. is this directory.
  4956. If a directory is not specified, the working directory
  4957. defaults to `<filename>.</filename>', the directory from
  4958. which the server
  4959. was started. The directory specified should be an absolute
  4960. path.
  4961. </para>
  4962. </listitem>
  4963. </varlistentry>
  4964. <varlistentry>
  4965. <term><command>key-directory</command></term>
  4966. <listitem>
  4967. <para>
  4968. When performing dynamic update of secure zones, the
  4969. directory where the public and private DNSSEC key files
  4970. should be found, if different than the current working
  4971. directory. (Note that this option has no effect on the
  4972. paths for files containing non-DNSSEC keys such as
  4973. <filename>bind.keys</filename>,
  4974. <filename>rndc.key</filename> or
  4975. <filename>session.key</filename>.)
  4976. </para>
  4977. </listitem>
  4978. </varlistentry>
  4979. <varlistentry>
  4980. <term><command>managed-keys-directory</command></term>
  4981. <listitem>
  4982. <para>
  4983. The directory used to hold the files used to track managed keys.
  4984. By default it is the working directory. It there are no
  4985. views then the file <filename>managed-keys.bind</filename>
  4986. otherwise a SHA256 hash of the view name is used with
  4987. <filename>.mkeys</filename> extension added.
  4988. </para>
  4989. </listitem>
  4990. </varlistentry>
  4991. <varlistentry>
  4992. <term><command>named-xfer</command></term>
  4993. <listitem>
  4994. <para>
  4995. <emphasis>This option is obsolete.</emphasis> It
  4996. was used in <acronym>BIND</acronym> 8 to specify
  4997. the pathname to the <command>named-xfer</command>
  4998. program. In <acronym>BIND</acronym> 9, no separate
  4999. <command>named-xfer</command> program is needed;
  5000. its functionality is built into the name server.
  5001. </para>
  5002. </listitem>
  5003. </varlistentry>
  5004. <varlistentry>
  5005. <term><command>tkey-gssapi-keytab</command></term>
  5006. <listitem>
  5007. <para>
  5008. The KRB5 keytab file to use for GSS-TSIG updates. If
  5009. this option is set and tkey-gssapi-credential is not
  5010. set, then updates will be allowed with any key
  5011. matching a principal in the specified keytab.
  5012. </para>
  5013. </listitem>
  5014. </varlistentry>
  5015. <varlistentry>
  5016. <term><command>tkey-gssapi-credential</command></term>
  5017. <listitem>
  5018. <para>
  5019. The security credential with which the server should
  5020. authenticate keys requested by the GSS-TSIG protocol.
  5021. Currently only Kerberos 5 authentication is available
  5022. and the credential is a Kerberos principal which the
  5023. server can acquire through the default system key
  5024. file, normally <filename>/etc/krb5.keytab</filename>.
  5025. The location keytab file can be overridden using the
  5026. tkey-gssapi-keytab option. Normally this principal is
  5027. of the form "<userinput>DNS/</userinput><varname>server.domain</varname>".
  5028. To use GSS-TSIG, <command>tkey-domain</command> must
  5029. also be set if a specific keytab is not set with
  5030. tkey-gssapi-keytab.
  5031. </para>
  5032. </listitem>
  5033. </varlistentry>
  5034. <varlistentry>
  5035. <term><command>tkey-domain</command></term>
  5036. <listitem>
  5037. <para>
  5038. The domain appended to the names of all shared keys
  5039. generated with <command>TKEY</command>. When a
  5040. client requests a <command>TKEY</command> exchange,
  5041. it may or may not specify the desired name for the
  5042. key. If present, the name of the shared key will
  5043. be <varname>client specified part</varname> +
  5044. <varname>tkey-domain</varname>. Otherwise, the
  5045. name of the shared key will be <varname>random hex
  5046. digits</varname> + <varname>tkey-domain</varname>.
  5047. In most cases, the <command>domainname</command>
  5048. should be the server's domain name, or an otherwise
  5049. non-existent subdomain like
  5050. "_tkey.<varname>domainname</varname>". If you are
  5051. using GSS-TSIG, this variable must be defined, unless
  5052. you specify a specific keytab using tkey-gssapi-keytab.
  5053. </para>
  5054. </listitem>
  5055. </varlistentry>
  5056. <varlistentry>
  5057. <term><command>tkey-dhkey</command></term>
  5058. <listitem>
  5059. <para>
  5060. The Diffie-Hellman key used by the server
  5061. to generate shared keys with clients using the Diffie-Hellman
  5062. mode
  5063. of <command>TKEY</command>. The server must be
  5064. able to load the
  5065. public and private keys from files in the working directory.
  5066. In
  5067. most cases, the keyname should be the server's host name.
  5068. </para>
  5069. </listitem>
  5070. </varlistentry>
  5071. <varlistentry>
  5072. <term><command>cache-file</command></term>
  5073. <listitem>
  5074. <para>
  5075. This is for testing only. Do not use.
  5076. </para>
  5077. </listitem>
  5078. </varlistentry>
  5079. <varlistentry>
  5080. <term><command>dump-file</command></term>
  5081. <listitem>
  5082. <para>
  5083. The pathname of the file the server dumps
  5084. the database to when instructed to do so with
  5085. <command>rndc dumpdb</command>.
  5086. If not specified, the default is <filename>named_dump.db</filename>.
  5087. </para>
  5088. </listitem>
  5089. </varlistentry>
  5090. <varlistentry>
  5091. <term><command>memstatistics-file</command></term>
  5092. <listitem>
  5093. <para>
  5094. The pathname of the file the server writes memory
  5095. usage statistics to on exit. If not specified,
  5096. the default is <filename>named.memstats</filename>.
  5097. </para>
  5098. </listitem>
  5099. </varlistentry>
  5100. <varlistentry>
  5101. <term><command>pid-file</command></term>
  5102. <listitem>
  5103. <para>
  5104. The pathname of the file the server writes its process ID
  5105. in. If not specified, the default is
  5106. <filename>/var/run/named/named.pid</filename>.
  5107. The PID file is used by programs that want to send signals to
  5108. the running
  5109. name server. Specifying <command>pid-file none</command> disables the
  5110. use of a PID file &mdash; no file will be written and any
  5111. existing one will be removed. Note that <command>none</command>
  5112. is a keyword, not a filename, and therefore is not enclosed
  5113. in
  5114. double quotes.
  5115. </para>
  5116. </listitem>
  5117. </varlistentry>
  5118. <varlistentry>
  5119. <term><command>recursing-file</command></term>
  5120. <listitem>
  5121. <para>
  5122. The pathname of the file the server dumps
  5123. the queries that are currently recursing when instructed
  5124. to do so with <command>rndc recursing</command>.
  5125. If not specified, the default is <filename>named.recursing</filename>.
  5126. </para>
  5127. </listitem>
  5128. </varlistentry>
  5129. <varlistentry>
  5130. <term><command>statistics-file</command></term>
  5131. <listitem>
  5132. <para>
  5133. The pathname of the file the server appends statistics
  5134. to when instructed to do so using <command>rndc stats</command>.
  5135. If not specified, the default is <filename>named.stats</filename> in the
  5136. server's current directory. The format of the file is
  5137. described
  5138. in <xref linkend="statsfile"/>.
  5139. </para>
  5140. </listitem>
  5141. </varlistentry>
  5142. <varlistentry>
  5143. <term><command>bindkeys-file</command></term>
  5144. <listitem>
  5145. <para>
  5146. The pathname of a file to override the built-in trusted
  5147. keys provided by <command>named</command>.
  5148. See the discussion of <command>dnssec-lookaside</command>
  5149. and <command>dnssec-validation</command> for details.
  5150. If not specified, the default is
  5151. <filename>/etc/bind.keys</filename>.
  5152. </para>
  5153. </listitem>
  5154. </varlistentry>
  5155. <varlistentry>
  5156. <term><command>secroots-file</command></term>
  5157. <listitem>
  5158. <para>
  5159. The pathname of the file the server dumps
  5160. security roots to when instructed to do so with
  5161. <command>rndc secroots</command>.
  5162. If not specified, the default is
  5163. <filename>named.secroots</filename>.
  5164. </para>
  5165. </listitem>
  5166. </varlistentry>
  5167. <varlistentry>
  5168. <term><command>session-keyfile</command></term>
  5169. <listitem>
  5170. <para>
  5171. The pathname of the file into which to write a TSIG
  5172. session key generated by <command>named</command> for use by
  5173. <command>nsupdate -l</command>. If not specified, the
  5174. default is <filename>/var/run/named/session.key</filename>.
  5175. (See <xref linkend="dynamic_update_policies"/>, and in
  5176. particular the discussion of the
  5177. <command>update-policy</command> statement's
  5178. <userinput>local</userinput> option for more
  5179. information about this feature.)
  5180. </para>
  5181. </listitem>
  5182. </varlistentry>
  5183. <varlistentry>
  5184. <term><command>session-keyname</command></term>
  5185. <listitem>
  5186. <para>
  5187. The key name to use for the TSIG session key.
  5188. If not specified, the default is "local-ddns".
  5189. </para>
  5190. </listitem>
  5191. </varlistentry>
  5192. <varlistentry>
  5193. <term><command>session-keyalg</command></term>
  5194. <listitem>
  5195. <para>
  5196. The algorithm to use for the TSIG session key.
  5197. Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
  5198. hmac-sha384, hmac-sha512 and hmac-md5. If not
  5199. specified, the default is hmac-sha256.
  5200. </para>
  5201. </listitem>
  5202. </varlistentry>
  5203. <varlistentry>
  5204. <term><command>port</command></term>
  5205. <listitem>
  5206. <para>
  5207. The UDP/TCP port number the server uses for
  5208. receiving and sending DNS protocol traffic.
  5209. The default is 53. This option is mainly intended for server
  5210. testing;
  5211. a server using a port other than 53 will not be able to
  5212. communicate with
  5213. the global DNS.
  5214. </para>
  5215. </listitem>
  5216. </varlistentry>
  5217. <varlistentry>
  5218. <term><command>random-device</command></term>
  5219. <listitem>
  5220. <para>
  5221. The source of entropy to be used by the server. Entropy is
  5222. primarily needed
  5223. for DNSSEC operations, such as TKEY transactions and dynamic
  5224. update of signed
  5225. zones. This options specifies the device (or file) from which
  5226. to read
  5227. entropy. If this is a file, operations requiring entropy will
  5228. fail when the
  5229. file has been exhausted. If not specified, the default value
  5230. is
  5231. <filename>/dev/random</filename>
  5232. (or equivalent) when present, and none otherwise. The
  5233. <command>random-device</command> option takes
  5234. effect during
  5235. the initial configuration load at server startup time and
  5236. is ignored on subsequent reloads.
  5237. </para>
  5238. </listitem>
  5239. </varlistentry>
  5240. <varlistentry>
  5241. <term><command>preferred-glue</command></term>
  5242. <listitem>
  5243. <para>
  5244. If specified, the listed type (A or AAAA) will be emitted
  5245. before other glue
  5246. in the additional section of a query response.
  5247. The default is not to prefer any type (NONE).
  5248. </para>
  5249. </listitem>
  5250. </varlistentry>
  5251. <varlistentry id="root_delegation_only">
  5252. <term><command>root-delegation-only</command></term>
  5253. <listitem>
  5254. <para>
  5255. Turn on enforcement of delegation-only in TLDs
  5256. (top level domains) and root zones with an optional
  5257. exclude list.
  5258. </para>
  5259. <para>
  5260. DS queries are expected to be made to and be answered by
  5261. delegation only zones. Such queries and responses are
  5262. treated as an exception to delegation-only processing
  5263. and are not converted to NXDOMAIN responses provided
  5264. a CNAME is not discovered at the query name.
  5265. </para>
  5266. <para>
  5267. If a delegation only zone server also serves a child
  5268. zone it is not always possible to determine whether
  5269. an answer comes from the delegation only zone or the
  5270. child zone. SOA NS and DNSKEY records are apex
  5271. only records and a matching response that contains
  5272. these records or DS is treated as coming from a
  5273. child zone. RRSIG records are also examined to see
  5274. if they are signed by a child zone or not. The
  5275. authority section is also examined to see if there
  5276. is evidence that the answer is from the child zone.
  5277. Answers that are determined to be from a child zone
  5278. are not converted to NXDOMAIN responses. Despite
  5279. all these checks there is still a possibility of
  5280. false negatives when a child zone is being served.
  5281. </para>
  5282. <para>
  5283. Similarly false positives can arise from empty nodes
  5284. (no records at the name) in the delegation only zone
  5285. when the query type is not ANY.
  5286. </para>
  5287. <para>
  5288. Note some TLDs are not delegation only (e.g. "DE", "LV",
  5289. "US" and "MUSEUM"). This list is not exhaustive.
  5290. </para>
  5291. <programlisting>
  5292. options {
  5293. root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
  5294. };
  5295. </programlisting>
  5296. </listitem>
  5297. </varlistentry>
  5298. <varlistentry>
  5299. <term><command>disable-algorithms</command></term>
  5300. <listitem>
  5301. <para>
  5302. Disable the specified DNSSEC algorithms at and below the
  5303. specified name.
  5304. Multiple <command>disable-algorithms</command>
  5305. statements are allowed.
  5306. Only the most specific will be applied.
  5307. </para>
  5308. </listitem>
  5309. </varlistentry>
  5310. <varlistentry>
  5311. <term><command>dnssec-lookaside</command></term>
  5312. <listitem>
  5313. <para>
  5314. When set, <command>dnssec-lookaside</command> provides the
  5315. validator with an alternate method to validate DNSKEY
  5316. records at the top of a zone. When a DNSKEY is at or
  5317. below a domain specified by the deepest
  5318. <command>dnssec-lookaside</command>, and the normal DNSSEC
  5319. validation has left the key untrusted, the trust-anchor
  5320. will be appended to the key name and a DLV record will be
  5321. looked up to see if it can validate the key. If the DLV
  5322. record validates a DNSKEY (similarly to the way a DS
  5323. record does) the DNSKEY RRset is deemed to be trusted.
  5324. </para>
  5325. <para>
  5326. If <command>dnssec-lookaside</command> is set to
  5327. <userinput>auto</userinput>, then built-in default
  5328. values for the DLV domain and trust anchor will be
  5329. used, along with a built-in key for validation.
  5330. </para>
  5331. <para>
  5332. If <command>dnssec-lookaside</command> is set to
  5333. <userinput>no</userinput>, then dnssec-lookaside
  5334. is not used.
  5335. </para>
  5336. <para>
  5337. The default DLV key is stored in the file
  5338. <filename>bind.keys</filename>;
  5339. <command>named</command> will load that key at
  5340. startup if <command>dnssec-lookaside</command> is set to
  5341. <constant>auto</constant>. A copy of the file is
  5342. installed along with <acronym>BIND</acronym> 9, and is
  5343. current as of the release date. If the DLV key expires, a
  5344. new copy of <filename>bind.keys</filename> can be downloaded
  5345. from <ulink>https://www.isc.org/solutions/dlv</ulink>.
  5346. </para>
  5347. <para>
  5348. (To prevent problems if <filename>bind.keys</filename> is
  5349. not found, the current key is also compiled in to
  5350. <command>named</command>. Relying on this is not
  5351. recommended, however, as it requires <command>named</command>
  5352. to be recompiled with a new key when the DLV key expires.)
  5353. </para>
  5354. <para>
  5355. NOTE: <command>named</command> only loads certain specific
  5356. keys from <filename>bind.keys</filename>: those for the
  5357. DLV zone and for the DNS root zone. The file cannot be
  5358. used to store keys for other zones.
  5359. </para>
  5360. </listitem>
  5361. </varlistentry>
  5362. <varlistentry>
  5363. <term><command>dnssec-must-be-secure</command></term>
  5364. <listitem>
  5365. <para>
  5366. Specify hierarchies which must be or may not be secure
  5367. (signed and validated). If <userinput>yes</userinput>,
  5368. then <command>named</command> will only accept answers if
  5369. they are secure. If <userinput>no</userinput>, then normal
  5370. DNSSEC validation applies allowing for insecure answers to
  5371. be accepted. The specified domain must be under a
  5372. <command>trusted-keys</command> or
  5373. <command>managed-keys</command> statement, or
  5374. <command>dnssec-lookaside</command> must be active.
  5375. </para>
  5376. </listitem>
  5377. </varlistentry>
  5378. <varlistentry>
  5379. <term><command>dns64</command></term>
  5380. <listitem>
  5381. <para>
  5382. This directive instructs <command>named</command> to
  5383. return mapped IPv4 addresses to AAAA queries when
  5384. there are no AAAA records. It is intended to be
  5385. used in conjunction with a NAT64. Each
  5386. <command>dns64</command> defines one DNS64 prefix.
  5387. Multiple DNS64 prefixes can be defined.
  5388. </para>
  5389. <para>
  5390. Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
  5391. 64 and 96 as per RFC 6052.
  5392. </para>
  5393. <para>
  5394. Additionally a reverse IP6.ARPA zone will be created for
  5395. the prefix to provide a mapping from the IP6.ARPA names
  5396. to the corresponding IN-ADDR.ARPA names using synthesized
  5397. CNAMEs. <command>dns64-server</command> and
  5398. <command>dns64-contact</command> can be used to specify
  5399. the name of the server and contact for the zones. These
  5400. are settable at the view / options level. These are
  5401. not settable on a per-prefix basis.
  5402. </para>
  5403. <para>
  5404. Each <command>dns64</command> supports an optional
  5405. <command>clients</command> ACL that determines which
  5406. clients are affected by this directive. If not defined,
  5407. it defaults to <userinput>any;</userinput>.
  5408. </para>
  5409. <para>
  5410. Each <command>dns64</command> supports an optional
  5411. <command>mapped</command> ACL that selects which
  5412. IPv4 addresses are to be mapped in the corresponding
  5413. A RRset. If not defined it defaults to
  5414. <userinput>any;</userinput>.
  5415. </para>
  5416. <para>
  5417. Normally, DNS64 won't apply to a domain name that
  5418. owns one or more AAAA records; these records will
  5419. simply be returned. The optional
  5420. <command>exclude</command> ACL allows specification
  5421. of a list of IPv6 addresses that will be ignored
  5422. if they appear in a domain name's AAAA records, and
  5423. DNS64 will be applied to any A records the domain
  5424. name owns. If not defined, <command>exclude</command>
  5425. defaults to none.
  5426. </para>
  5427. <para>
  5428. A optional <command>suffix</command> can also
  5429. be defined to set the bits trailing the mapped
  5430. IPv4 address bits. By default these bits are
  5431. set to <userinput>::</userinput>. The bits
  5432. matching the prefix and mapped IPv4 address
  5433. must be zero.
  5434. </para>
  5435. <para>
  5436. If <command>recursive-only</command> is set to
  5437. <command>yes</command> the DNS64 synthesis will
  5438. only happen for recursive queries. The default
  5439. is <command>no</command>.
  5440. </para>
  5441. <para>
  5442. If <command>break-dnssec</command> is set to
  5443. <command>yes</command> the DNS64 synthesis will
  5444. happen even if the result, if validated, would
  5445. cause a DNSSEC validation failure. If this option
  5446. is set to <command>no</command> (the default), the DO
  5447. is set on the incoming query, and there are RRSIGs on
  5448. the applicable records, then synthesis will not happen.
  5449. </para>
  5450. <programlisting>
  5451. acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
  5452. dns64 64:FF9B::/96 {
  5453. clients { any; };
  5454. mapped { !rfc1918; any; };
  5455. exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
  5456. suffix ::;
  5457. };
  5458. </programlisting>
  5459. </listitem>
  5460. </varlistentry>
  5461. </variablelist>
  5462. <sect3 id="boolean_options">
  5463. <title>Boolean Options</title>
  5464. <variablelist>
  5465. <varlistentry>
  5466. <term><command>allow-new-zones</command></term>
  5467. <listitem>
  5468. <para>
  5469. If <userinput>yes</userinput>, then zones can be
  5470. added at runtime via <command>rndc addzone</command>
  5471. or deleted via <command>rndc delzone</command>.
  5472. The default is <userinput>no</userinput>.
  5473. </para>
  5474. </listitem>
  5475. </varlistentry>
  5476. <varlistentry>
  5477. <term><command>auth-nxdomain</command></term>
  5478. <listitem>
  5479. <para>
  5480. If <userinput>yes</userinput>, then the <command>AA</command> bit
  5481. is always set on NXDOMAIN responses, even if the server is
  5482. not actually
  5483. authoritative. The default is <userinput>no</userinput>;
  5484. this is
  5485. a change from <acronym>BIND</acronym> 8. If you
  5486. are using very old DNS software, you
  5487. may need to set it to <userinput>yes</userinput>.
  5488. </para>
  5489. </listitem>
  5490. </varlistentry>
  5491. <varlistentry>
  5492. <term><command>deallocate-on-exit</command></term>
  5493. <listitem>
  5494. <para>
  5495. This option was used in <acronym>BIND</acronym>
  5496. 8 to enable checking
  5497. for memory leaks on exit. <acronym>BIND</acronym> 9 ignores the option and always performs
  5498. the checks.
  5499. </para>
  5500. </listitem>
  5501. </varlistentry>
  5502. <varlistentry>
  5503. <term><command>memstatistics</command></term>
  5504. <listitem>
  5505. <para>
  5506. Write memory statistics to the file specified by
  5507. <command>memstatistics-file</command> at exit.
  5508. The default is <userinput>no</userinput> unless
  5509. '-m record' is specified on the command line in
  5510. which case it is <userinput>yes</userinput>.
  5511. </para>
  5512. </listitem>
  5513. </varlistentry>
  5514. <varlistentry>
  5515. <term><command>dialup</command></term>
  5516. <listitem>
  5517. <para>
  5518. If <userinput>yes</userinput>, then the
  5519. server treats all zones as if they are doing zone transfers
  5520. across
  5521. a dial-on-demand dialup link, which can be brought up by
  5522. traffic
  5523. originating from this server. This has different effects
  5524. according
  5525. to zone type and concentrates the zone maintenance so that
  5526. it all
  5527. happens in a short interval, once every <command>heartbeat-interval</command> and
  5528. hopefully during the one call. It also suppresses some of
  5529. the normal
  5530. zone maintenance traffic. The default is <userinput>no</userinput>.
  5531. </para>
  5532. <para>
  5533. The <command>dialup</command> option
  5534. may also be specified in the <command>view</command> and
  5535. <command>zone</command> statements,
  5536. in which case it overrides the global <command>dialup</command>
  5537. option.
  5538. </para>
  5539. <para>
  5540. If the zone is a master zone, then the server will send out a
  5541. NOTIFY
  5542. request to all the slaves (default). This should trigger the
  5543. zone serial
  5544. number check in the slave (providing it supports NOTIFY)
  5545. allowing the slave
  5546. to verify the zone while the connection is active.
  5547. The set of servers to which NOTIFY is sent can be controlled
  5548. by
  5549. <command>notify</command> and <command>also-notify</command>.
  5550. </para>
  5551. <para>
  5552. If the
  5553. zone is a slave or stub zone, then the server will suppress
  5554. the regular
  5555. "zone up to date" (refresh) queries and only perform them
  5556. when the
  5557. <command>heartbeat-interval</command> expires in
  5558. addition to sending
  5559. NOTIFY requests.
  5560. </para>
  5561. <para>
  5562. Finer control can be achieved by using
  5563. <userinput>notify</userinput> which only sends NOTIFY
  5564. messages,
  5565. <userinput>notify-passive</userinput> which sends NOTIFY
  5566. messages and
  5567. suppresses the normal refresh queries, <userinput>refresh</userinput>
  5568. which suppresses normal refresh processing and sends refresh
  5569. queries
  5570. when the <command>heartbeat-interval</command>
  5571. expires, and
  5572. <userinput>passive</userinput> which just disables normal
  5573. refresh
  5574. processing.
  5575. </para>
  5576. <informaltable colsep="0" rowsep="0">
  5577. <tgroup cols="4" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  5578. <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
  5579. <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
  5580. <colspec colname="3" colnum="3" colsep="0" colwidth="1.150in"/>
  5581. <colspec colname="4" colnum="4" colsep="0" colwidth="1.150in"/>
  5582. <tbody>
  5583. <row rowsep="0">
  5584. <entry colname="1">
  5585. <para>
  5586. dialup mode
  5587. </para>
  5588. </entry>
  5589. <entry colname="2">
  5590. <para>
  5591. normal refresh
  5592. </para>
  5593. </entry>
  5594. <entry colname="3">
  5595. <para>
  5596. heart-beat refresh
  5597. </para>
  5598. </entry>
  5599. <entry colname="4">
  5600. <para>
  5601. heart-beat notify
  5602. </para>
  5603. </entry>
  5604. </row>
  5605. <row rowsep="0">
  5606. <entry colname="1">
  5607. <para><command>no</command> (default)</para>
  5608. </entry>
  5609. <entry colname="2">
  5610. <para>
  5611. yes
  5612. </para>
  5613. </entry>
  5614. <entry colname="3">
  5615. <para>
  5616. no
  5617. </para>
  5618. </entry>
  5619. <entry colname="4">
  5620. <para>
  5621. no
  5622. </para>
  5623. </entry>
  5624. </row>
  5625. <row rowsep="0">
  5626. <entry colname="1">
  5627. <para><command>yes</command></para>
  5628. </entry>
  5629. <entry colname="2">
  5630. <para>
  5631. no
  5632. </para>
  5633. </entry>
  5634. <entry colname="3">
  5635. <para>
  5636. yes
  5637. </para>
  5638. </entry>
  5639. <entry colname="4">
  5640. <para>
  5641. yes
  5642. </para>
  5643. </entry>
  5644. </row>
  5645. <row rowsep="0">
  5646. <entry colname="1">
  5647. <para><command>notify</command></para>
  5648. </entry>
  5649. <entry colname="2">
  5650. <para>
  5651. yes
  5652. </para>
  5653. </entry>
  5654. <entry colname="3">
  5655. <para>
  5656. no
  5657. </para>
  5658. </entry>
  5659. <entry colname="4">
  5660. <para>
  5661. yes
  5662. </para>
  5663. </entry>
  5664. </row>
  5665. <row rowsep="0">
  5666. <entry colname="1">
  5667. <para><command>refresh</command></para>
  5668. </entry>
  5669. <entry colname="2">
  5670. <para>
  5671. no
  5672. </para>
  5673. </entry>
  5674. <entry colname="3">
  5675. <para>
  5676. yes
  5677. </para>
  5678. </entry>
  5679. <entry colname="4">
  5680. <para>
  5681. no
  5682. </para>
  5683. </entry>
  5684. </row>
  5685. <row rowsep="0">
  5686. <entry colname="1">
  5687. <para><command>passive</command></para>
  5688. </entry>
  5689. <entry colname="2">
  5690. <para>
  5691. no
  5692. </para>
  5693. </entry>
  5694. <entry colname="3">
  5695. <para>
  5696. no
  5697. </para>
  5698. </entry>
  5699. <entry colname="4">
  5700. <para>
  5701. no
  5702. </para>
  5703. </entry>
  5704. </row>
  5705. <row rowsep="0">
  5706. <entry colname="1">
  5707. <para><command>notify-passive</command></para>
  5708. </entry>
  5709. <entry colname="2">
  5710. <para>
  5711. no
  5712. </para>
  5713. </entry>
  5714. <entry colname="3">
  5715. <para>
  5716. no
  5717. </para>
  5718. </entry>
  5719. <entry colname="4">
  5720. <para>
  5721. yes
  5722. </para>
  5723. </entry>
  5724. </row>
  5725. </tbody>
  5726. </tgroup>
  5727. </informaltable>
  5728. <para>
  5729. Note that normal NOTIFY processing is not affected by
  5730. <command>dialup</command>.
  5731. </para>
  5732. </listitem>
  5733. </varlistentry>
  5734. <varlistentry>
  5735. <term><command>fake-iquery</command></term>
  5736. <listitem>
  5737. <para>
  5738. In <acronym>BIND</acronym> 8, this option
  5739. enabled simulating the obsolete DNS query type
  5740. IQUERY. <acronym>BIND</acronym> 9 never does
  5741. IQUERY simulation.
  5742. </para>
  5743. </listitem>
  5744. </varlistentry>
  5745. <varlistentry>
  5746. <term><command>fetch-glue</command></term>
  5747. <listitem>
  5748. <para>
  5749. This option is obsolete.
  5750. In BIND 8, <userinput>fetch-glue yes</userinput>
  5751. caused the server to attempt to fetch glue resource records
  5752. it
  5753. didn't have when constructing the additional
  5754. data section of a response. This is now considered a bad
  5755. idea
  5756. and BIND 9 never does it.
  5757. </para>
  5758. </listitem>
  5759. </varlistentry>
  5760. <varlistentry>
  5761. <term><command>flush-zones-on-shutdown</command></term>
  5762. <listitem>
  5763. <para>
  5764. When the nameserver exits due receiving SIGTERM,
  5765. flush or do not flush any pending zone writes. The default
  5766. is
  5767. <command>flush-zones-on-shutdown</command> <userinput>no</userinput>.
  5768. </para>
  5769. </listitem>
  5770. </varlistentry>
  5771. <varlistentry>
  5772. <term><command>has-old-clients</command></term>
  5773. <listitem>
  5774. <para>
  5775. This option was incorrectly implemented
  5776. in <acronym>BIND</acronym> 8, and is ignored by <acronym>BIND</acronym> 9.
  5777. To achieve the intended effect
  5778. of
  5779. <command>has-old-clients</command> <userinput>yes</userinput>, specify
  5780. the two separate options <command>auth-nxdomain</command> <userinput>yes</userinput>
  5781. and <command>rfc2308-type1</command> <userinput>no</userinput> instead.
  5782. </para>
  5783. </listitem>
  5784. </varlistentry>
  5785. <varlistentry>
  5786. <term><command>host-statistics</command></term>
  5787. <listitem>
  5788. <para>
  5789. In BIND 8, this enables keeping of
  5790. statistics for every host that the name server interacts
  5791. with.
  5792. Not implemented in BIND 9.
  5793. </para>
  5794. </listitem>
  5795. </varlistentry>
  5796. <varlistentry>
  5797. <term><command>maintain-ixfr-base</command></term>
  5798. <listitem>
  5799. <para>
  5800. <emphasis>This option is obsolete</emphasis>.
  5801. It was used in <acronym>BIND</acronym> 8 to
  5802. determine whether a transaction log was
  5803. kept for Incremental Zone Transfer. <acronym>BIND</acronym> 9 maintains a transaction
  5804. log whenever possible. If you need to disable outgoing
  5805. incremental zone
  5806. transfers, use <command>provide-ixfr</command> <userinput>no</userinput>.
  5807. </para>
  5808. </listitem>
  5809. </varlistentry>
  5810. <varlistentry>
  5811. <term><command>minimal-responses</command></term>
  5812. <listitem>
  5813. <para>
  5814. If <userinput>yes</userinput>, then when generating
  5815. responses the server will only add records to the authority
  5816. and additional data sections when they are required (e.g.
  5817. delegations, negative responses). This may improve the
  5818. performance of the server.
  5819. The default is <userinput>no</userinput>.
  5820. </para>
  5821. </listitem>
  5822. </varlistentry>
  5823. <varlistentry>
  5824. <term><command>multiple-cnames</command></term>
  5825. <listitem>
  5826. <para>
  5827. This option was used in <acronym>BIND</acronym> 8 to allow
  5828. a domain name to have multiple CNAME records in violation of
  5829. the DNS standards. <acronym>BIND</acronym> 9.2 onwards
  5830. always strictly enforces the CNAME rules both in master
  5831. files and dynamic updates.
  5832. </para>
  5833. </listitem>
  5834. </varlistentry>
  5835. <varlistentry>
  5836. <term><command>notify</command></term>
  5837. <listitem>
  5838. <para>
  5839. If <userinput>yes</userinput> (the default),
  5840. DNS NOTIFY messages are sent when a zone the server is
  5841. authoritative for
  5842. changes, see <xref linkend="notify"/>. The messages are
  5843. sent to the
  5844. servers listed in the zone's NS records (except the master
  5845. server identified
  5846. in the SOA MNAME field), and to any servers listed in the
  5847. <command>also-notify</command> option.
  5848. </para>
  5849. <para>
  5850. If <userinput>master-only</userinput>, notifies are only
  5851. sent
  5852. for master zones.
  5853. If <userinput>explicit</userinput>, notifies are sent only
  5854. to
  5855. servers explicitly listed using <command>also-notify</command>.
  5856. If <userinput>no</userinput>, no notifies are sent.
  5857. </para>
  5858. <para>
  5859. The <command>notify</command> option may also be
  5860. specified in the <command>zone</command>
  5861. statement,
  5862. in which case it overrides the <command>options notify</command> statement.
  5863. It would only be necessary to turn off this option if it
  5864. caused slaves
  5865. to crash.
  5866. </para>
  5867. </listitem>
  5868. </varlistentry>
  5869. <varlistentry>
  5870. <term><command>notify-to-soa</command></term>
  5871. <listitem>
  5872. <para>
  5873. If <userinput>yes</userinput> do not check the nameservers
  5874. in the NS RRset against the SOA MNAME. Normally a NOTIFY
  5875. message is not sent to the SOA MNAME (SOA ORIGIN) as it is
  5876. supposed to contain the name of the ultimate master.
  5877. Sometimes, however, a slave is listed as the SOA MNAME in
  5878. hidden master configurations and in that case you would
  5879. want the ultimate master to still send NOTIFY messages to
  5880. all the nameservers listed in the NS RRset.
  5881. </para>
  5882. </listitem>
  5883. </varlistentry>
  5884. <varlistentry>
  5885. <term><command>recursion</command></term>
  5886. <listitem>
  5887. <para>
  5888. If <userinput>yes</userinput>, and a
  5889. DNS query requests recursion, then the server will attempt
  5890. to do
  5891. all the work required to answer the query. If recursion is
  5892. off
  5893. and the server does not already know the answer, it will
  5894. return a
  5895. referral response. The default is
  5896. <userinput>yes</userinput>.
  5897. Note that setting <command>recursion no</command> does not prevent
  5898. clients from getting data from the server's cache; it only
  5899. prevents new data from being cached as an effect of client
  5900. queries.
  5901. Caching may still occur as an effect the server's internal
  5902. operation, such as NOTIFY address lookups.
  5903. See also <command>fetch-glue</command> above.
  5904. </para>
  5905. </listitem>
  5906. </varlistentry>
  5907. <varlistentry>
  5908. <term><command>rfc2308-type1</command></term>
  5909. <listitem>
  5910. <para>
  5911. Setting this to <userinput>yes</userinput> will
  5912. cause the server to send NS records along with the SOA
  5913. record for negative
  5914. answers. The default is <userinput>no</userinput>.
  5915. </para>
  5916. <note>
  5917. <simpara>
  5918. Not yet implemented in <acronym>BIND</acronym>
  5919. 9.
  5920. </simpara>
  5921. </note>
  5922. </listitem>
  5923. </varlistentry>
  5924. <varlistentry>
  5925. <term><command>use-id-pool</command></term>
  5926. <listitem>
  5927. <para>
  5928. <emphasis>This option is obsolete</emphasis>.
  5929. <acronym>BIND</acronym> 9 always allocates query
  5930. IDs from a pool.
  5931. </para>
  5932. </listitem>
  5933. </varlistentry>
  5934. <varlistentry>
  5935. <term><command>zone-statistics</command></term>
  5936. <listitem>
  5937. <para>
  5938. If <userinput>yes</userinput>, the server will collect
  5939. statistical data on all zones (unless specifically turned
  5940. off
  5941. on a per-zone basis by specifying <command>zone-statistics no</command>
  5942. in the <command>zone</command> statement).
  5943. The default is <userinput>no</userinput>.
  5944. These statistics may be accessed
  5945. using <command>rndc stats</command>, which will
  5946. dump them to the file listed
  5947. in the <command>statistics-file</command>. See
  5948. also <xref linkend="statsfile"/>.
  5949. </para>
  5950. </listitem>
  5951. </varlistentry>
  5952. <varlistentry>
  5953. <term><command>use-ixfr</command></term>
  5954. <listitem>
  5955. <para>
  5956. <emphasis>This option is obsolete</emphasis>.
  5957. If you need to disable IXFR to a particular server or
  5958. servers, see
  5959. the information on the <command>provide-ixfr</command> option
  5960. in <xref linkend="server_statement_definition_and_usage"/>.
  5961. See also
  5962. <xref linkend="incremental_zone_transfers"/>.
  5963. </para>
  5964. </listitem>
  5965. </varlistentry>
  5966. <varlistentry>
  5967. <term><command>provide-ixfr</command></term>
  5968. <listitem>
  5969. <para>
  5970. See the description of
  5971. <command>provide-ixfr</command> in
  5972. <xref linkend="server_statement_definition_and_usage"/>.
  5973. </para>
  5974. </listitem>
  5975. </varlistentry>
  5976. <varlistentry>
  5977. <term><command>request-ixfr</command></term>
  5978. <listitem>
  5979. <para>
  5980. See the description of
  5981. <command>request-ixfr</command> in
  5982. <xref linkend="server_statement_definition_and_usage"/>.
  5983. </para>
  5984. </listitem>
  5985. </varlistentry>
  5986. <varlistentry>
  5987. <term><command>treat-cr-as-space</command></term>
  5988. <listitem>
  5989. <para>
  5990. This option was used in <acronym>BIND</acronym>
  5991. 8 to make
  5992. the server treat carriage return ("<command>\r</command>") characters the same way
  5993. as a space or tab character,
  5994. to facilitate loading of zone files on a UNIX system that
  5995. were generated
  5996. on an NT or DOS machine. In <acronym>BIND</acronym> 9, both UNIX "<command>\n</command>"
  5997. and NT/DOS "<command>\r\n</command>" newlines
  5998. are always accepted,
  5999. and the option is ignored.
  6000. </para>
  6001. </listitem>
  6002. </varlistentry>
  6003. <varlistentry>
  6004. <term><command>additional-from-auth</command></term>
  6005. <term><command>additional-from-cache</command></term>
  6006. <listitem>
  6007. <para>
  6008. These options control the behavior of an authoritative
  6009. server when
  6010. answering queries which have additional data, or when
  6011. following CNAME
  6012. and DNAME chains.
  6013. </para>
  6014. <para>
  6015. When both of these options are set to <userinput>yes</userinput>
  6016. (the default) and a
  6017. query is being answered from authoritative data (a zone
  6018. configured into the server), the additional data section of
  6019. the
  6020. reply will be filled in using data from other authoritative
  6021. zones
  6022. and from the cache. In some situations this is undesirable,
  6023. such
  6024. as when there is concern over the correctness of the cache,
  6025. or
  6026. in servers where slave zones may be added and modified by
  6027. untrusted third parties. Also, avoiding
  6028. the search for this additional data will speed up server
  6029. operations
  6030. at the possible expense of additional queries to resolve
  6031. what would
  6032. otherwise be provided in the additional section.
  6033. </para>
  6034. <para>
  6035. For example, if a query asks for an MX record for host <literal>foo.example.com</literal>,
  6036. and the record found is "<literal>MX 10 mail.example.net</literal>", normally the address
  6037. records (A and AAAA) for <literal>mail.example.net</literal> will be provided as well,
  6038. if known, even though they are not in the example.com zone.
  6039. Setting these options to <command>no</command>
  6040. disables this behavior and makes
  6041. the server only search for additional data in the zone it
  6042. answers from.
  6043. </para>
  6044. <para>
  6045. These options are intended for use in authoritative-only
  6046. servers, or in authoritative-only views. Attempts to set
  6047. them to <command>no</command> without also
  6048. specifying
  6049. <command>recursion no</command> will cause the
  6050. server to
  6051. ignore the options and log a warning message.
  6052. </para>
  6053. <para>
  6054. Specifying <command>additional-from-cache no</command> actually
  6055. disables the use of the cache not only for additional data
  6056. lookups
  6057. but also when looking up the answer. This is usually the
  6058. desired
  6059. behavior in an authoritative-only server where the
  6060. correctness of
  6061. the cached data is an issue.
  6062. </para>
  6063. <para>
  6064. When a name server is non-recursively queried for a name
  6065. that is not
  6066. below the apex of any served zone, it normally answers with
  6067. an
  6068. "upwards referral" to the root servers or the servers of
  6069. some other
  6070. known parent of the query name. Since the data in an
  6071. upwards referral
  6072. comes from the cache, the server will not be able to provide
  6073. upwards
  6074. referrals when <command>additional-from-cache no</command>
  6075. has been specified. Instead, it will respond to such
  6076. queries
  6077. with REFUSED. This should not cause any problems since
  6078. upwards referrals are not required for the resolution
  6079. process.
  6080. </para>
  6081. </listitem>
  6082. </varlistentry>
  6083. <varlistentry>
  6084. <term><command>match-mapped-addresses</command></term>
  6085. <listitem>
  6086. <para>
  6087. If <userinput>yes</userinput>, then an
  6088. IPv4-mapped IPv6 address will match any address match
  6089. list entries that match the corresponding IPv4 address.
  6090. </para>
  6091. <para>
  6092. This option was introduced to work around a kernel quirk
  6093. in some operating systems that causes IPv4 TCP
  6094. connections, such as zone transfers, to be accepted on an
  6095. IPv6 socket using mapped addresses. This caused address
  6096. match lists designed for IPv4 to fail to match. However,
  6097. <command>named</command> now solves this problem
  6098. internally. The use of this option is discouraged.
  6099. </para>
  6100. </listitem>
  6101. </varlistentry>
  6102. <varlistentry>
  6103. <term><command>filter-aaaa-on-v4</command></term>
  6104. <listitem>
  6105. <para>
  6106. This option is only available when
  6107. <acronym>BIND</acronym> 9 is compiled with the
  6108. <userinput>--enable-filter-aaaa</userinput> option on the
  6109. "configure" command line. It is intended to help the
  6110. transition from IPv4 to IPv6 by not giving IPv6 addresses
  6111. to DNS clients unless they have connections to the IPv6
  6112. Internet. This is not recommended unless absolutely
  6113. necessary. The default is <userinput>no</userinput>.
  6114. The <command>filter-aaaa-on-v4</command> option
  6115. may also be specified in <command>view</command> statements
  6116. to override the global <command>filter-aaaa-on-v4</command>
  6117. option.
  6118. </para>
  6119. <para>
  6120. If <userinput>yes</userinput>,
  6121. the DNS client is at an IPv4 address, in <command>filter-aaaa</command>,
  6122. and if the response does not include DNSSEC signatures,
  6123. then all AAAA records are deleted from the response.
  6124. This filtering applies to all responses and not only
  6125. authoritative responses.
  6126. </para>
  6127. <para>
  6128. If <userinput>break-dnssec</userinput>,
  6129. then AAAA records are deleted even when dnssec is enabled.
  6130. As suggested by the name, this makes the response not verify,
  6131. because the DNSSEC protocol is designed detect deletions.
  6132. </para>
  6133. <para>
  6134. This mechanism can erroneously cause other servers to
  6135. not give AAAA records to their clients.
  6136. A recursing server with both IPv6 and IPv4 network connections
  6137. that queries an authoritative server using this mechanism
  6138. via IPv4 will be denied AAAA records even if its client is
  6139. using IPv6.
  6140. </para>
  6141. <para>
  6142. This mechanism is applied to authoritative as well as
  6143. non-authoritative records.
  6144. A client using IPv4 that is not allowed recursion can
  6145. erroneously be given AAAA records because the server is not
  6146. allowed to check for A records.
  6147. </para>
  6148. <para>
  6149. Some AAAA records are given to IPv4 clients in glue records.
  6150. IPv4 clients that are servers can then erroneously
  6151. answer requests for AAAA records received via IPv4.
  6152. </para>
  6153. </listitem>
  6154. </varlistentry>
  6155. <varlistentry>
  6156. <term><command>ixfr-from-differences</command></term>
  6157. <listitem>
  6158. <para>
  6159. When <userinput>yes</userinput> and the server loads a new version of a master
  6160. zone from its zone file or receives a new version of a slave
  6161. file by a non-incremental zone transfer, it will compare
  6162. the new version to the previous one and calculate a set
  6163. of differences. The differences are then logged in the
  6164. zone's journal file such that the changes can be transmitted
  6165. to downstream slaves as an incremental zone transfer.
  6166. </para>
  6167. <para>
  6168. By allowing incremental zone transfers to be used for
  6169. non-dynamic zones, this option saves bandwidth at the
  6170. expense of increased CPU and memory consumption at the
  6171. master.
  6172. In particular, if the new version of a zone is completely
  6173. different from the previous one, the set of differences
  6174. will be of a size comparable to the combined size of the
  6175. old and new zone version, and the server will need to
  6176. temporarily allocate memory to hold this complete
  6177. difference set.
  6178. </para>
  6179. <para><command>ixfr-from-differences</command>
  6180. also accepts <command>master</command> and
  6181. <command>slave</command> at the view and options
  6182. levels which causes
  6183. <command>ixfr-from-differences</command> to be enabled for
  6184. all <command>master</command> or
  6185. <command>slave</command> zones respectively.
  6186. It is off by default.
  6187. </para>
  6188. </listitem>
  6189. </varlistentry>
  6190. <varlistentry>
  6191. <term><command>multi-master</command></term>
  6192. <listitem>
  6193. <para>
  6194. This should be set when you have multiple masters for a zone
  6195. and the
  6196. addresses refer to different machines. If <userinput>yes</userinput>, <command>named</command> will
  6197. not log
  6198. when the serial number on the master is less than what <command>named</command>
  6199. currently
  6200. has. The default is <userinput>no</userinput>.
  6201. </para>
  6202. </listitem>
  6203. </varlistentry>
  6204. <varlistentry>
  6205. <term><command>dnssec-enable</command></term>
  6206. <listitem>
  6207. <para>
  6208. Enable DNSSEC support in <command>named</command>. Unless set to <userinput>yes</userinput>,
  6209. <command>named</command> behaves as if it does not support DNSSEC.
  6210. The default is <userinput>yes</userinput>.
  6211. </para>
  6212. </listitem>
  6213. </varlistentry>
  6214. <varlistentry>
  6215. <term><command>dnssec-validation</command></term>
  6216. <listitem>
  6217. <para>
  6218. Enable DNSSEC validation in <command>named</command>.
  6219. Note <command>dnssec-enable</command> also needs to be
  6220. set to <userinput>yes</userinput> to be effective.
  6221. If set to <userinput>no</userinput>, DNSSEC validation
  6222. is disabled. If set to <userinput>auto</userinput>,
  6223. DNSSEC validation is enabled, and a default
  6224. trust-anchor for the DNS root zone is used. If set to
  6225. <userinput>yes</userinput>, DNSSEC validation is enabled,
  6226. but a trust anchor must be manually configured using
  6227. a <command>trusted-keys</command> or
  6228. <command>managed-keys</command> statement. The default
  6229. is <userinput>yes</userinput>.
  6230. </para>
  6231. </listitem>
  6232. </varlistentry>
  6233. <varlistentry>
  6234. <term><command>dnssec-accept-expired</command></term>
  6235. <listitem>
  6236. <para>
  6237. Accept expired signatures when verifying DNSSEC signatures.
  6238. The default is <userinput>no</userinput>.
  6239. Setting this option to <userinput>yes</userinput>
  6240. leaves <command>named</command> vulnerable to
  6241. replay attacks.
  6242. </para>
  6243. </listitem>
  6244. </varlistentry>
  6245. <varlistentry>
  6246. <term><command>querylog</command></term>
  6247. <listitem>
  6248. <para>
  6249. Specify whether query logging should be started when <command>named</command>
  6250. starts.
  6251. If <command>querylog</command> is not specified,
  6252. then the query logging
  6253. is determined by the presence of the logging category <command>queries</command>.
  6254. </para>
  6255. </listitem>
  6256. </varlistentry>
  6257. <varlistentry>
  6258. <term><command>check-names</command></term>
  6259. <listitem>
  6260. <para>
  6261. This option is used to restrict the character set and syntax
  6262. of
  6263. certain domain names in master files and/or DNS responses
  6264. received
  6265. from the network. The default varies according to usage
  6266. area. For
  6267. <command>master</command> zones the default is <command>fail</command>.
  6268. For <command>slave</command> zones the default
  6269. is <command>warn</command>.
  6270. For answers received from the network (<command>response</command>)
  6271. the default is <command>ignore</command>.
  6272. </para>
  6273. <para>
  6274. The rules for legal hostnames and mail domains are derived
  6275. from RFC 952 and RFC 821 as modified by RFC 1123.
  6276. </para>
  6277. <para><command>check-names</command>
  6278. applies to the owner names of A, AAAA and MX records.
  6279. It also applies to the domain names in the RDATA of NS, SOA,
  6280. MX, and SRV records.
  6281. It also applies to the RDATA of PTR records where the owner
  6282. name indicated that it is a reverse lookup of a hostname
  6283. (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
  6284. </para>
  6285. </listitem>
  6286. </varlistentry>
  6287. <varlistentry>
  6288. <term><command>check-dup-records</command></term>
  6289. <listitem>
  6290. <para>
  6291. Check master zones for records that are treated as different
  6292. by DNSSEC but are semantically equal in plain DNS. The
  6293. default is to <command>warn</command>. Other possible
  6294. values are <command>fail</command> and
  6295. <command>ignore</command>.
  6296. </para>
  6297. </listitem>
  6298. </varlistentry>
  6299. <varlistentry>
  6300. <term><command>check-mx</command></term>
  6301. <listitem>
  6302. <para>
  6303. Check whether the MX record appears to refer to a IP address.
  6304. The default is to <command>warn</command>. Other possible
  6305. values are <command>fail</command> and
  6306. <command>ignore</command>.
  6307. </para>
  6308. </listitem>
  6309. </varlistentry>
  6310. <varlistentry>
  6311. <term><command>check-wildcard</command></term>
  6312. <listitem>
  6313. <para>
  6314. This option is used to check for non-terminal wildcards.
  6315. The use of non-terminal wildcards is almost always as a
  6316. result of a failure
  6317. to understand the wildcard matching algorithm (RFC 1034).
  6318. This option
  6319. affects master zones. The default (<command>yes</command>) is to check
  6320. for non-terminal wildcards and issue a warning.
  6321. </para>
  6322. </listitem>
  6323. </varlistentry>
  6324. <varlistentry>
  6325. <term><command>check-integrity</command></term>
  6326. <listitem>
  6327. <para>
  6328. Perform post load zone integrity checks on master
  6329. zones. This checks that MX and SRV records refer
  6330. to address (A or AAAA) records and that glue
  6331. address records exist for delegated zones. For
  6332. MX and SRV records only in-zone hostnames are
  6333. checked (for out-of-zone hostnames use
  6334. <command>named-checkzone</command>).
  6335. For NS records only names below top of zone are
  6336. checked (for out-of-zone names and glue consistency
  6337. checks use <command>named-checkzone</command>).
  6338. The default is <command>yes</command>.
  6339. </para>
  6340. </listitem>
  6341. </varlistentry>
  6342. <varlistentry>
  6343. <term><command>check-mx-cname</command></term>
  6344. <listitem>
  6345. <para>
  6346. If <command>check-integrity</command> is set then
  6347. fail, warn or ignore MX records that refer
  6348. to CNAMES. The default is to <command>warn</command>.
  6349. </para>
  6350. </listitem>
  6351. </varlistentry>
  6352. <varlistentry>
  6353. <term><command>check-srv-cname</command></term>
  6354. <listitem>
  6355. <para>
  6356. If <command>check-integrity</command> is set then
  6357. fail, warn or ignore SRV records that refer
  6358. to CNAMES. The default is to <command>warn</command>.
  6359. </para>
  6360. </listitem>
  6361. </varlistentry>
  6362. <varlistentry>
  6363. <term><command>check-sibling</command></term>
  6364. <listitem>
  6365. <para>
  6366. When performing integrity checks, also check that
  6367. sibling glue exists. The default is <command>yes</command>.
  6368. </para>
  6369. </listitem>
  6370. </varlistentry>
  6371. <varlistentry>
  6372. <term><command>zero-no-soa-ttl</command></term>
  6373. <listitem>
  6374. <para>
  6375. When returning authoritative negative responses to
  6376. SOA queries set the TTL of the SOA record returned in
  6377. the authority section to zero.
  6378. The default is <command>yes</command>.
  6379. </para>
  6380. </listitem>
  6381. </varlistentry>
  6382. <varlistentry>
  6383. <term><command>zero-no-soa-ttl-cache</command></term>
  6384. <listitem>
  6385. <para>
  6386. When caching a negative response to a SOA query
  6387. set the TTL to zero.
  6388. The default is <command>no</command>.
  6389. </para>
  6390. </listitem>
  6391. </varlistentry>
  6392. <varlistentry>
  6393. <term><command>update-check-ksk</command></term>
  6394. <listitem>
  6395. <para>
  6396. When set to the default value of <literal>yes</literal>,
  6397. check the KSK bit in each key to determine how the key
  6398. should be used when generating RRSIGs for a secure zone.
  6399. </para>
  6400. <para>
  6401. Ordinarily, zone-signing keys (that is, keys without the
  6402. KSK bit set) are used to sign the entire zone, while
  6403. key-signing keys (keys with the KSK bit set) are only
  6404. used to sign the DNSKEY RRset at the zone apex.
  6405. However, if this option is set to <literal>no</literal>,
  6406. then the KSK bit is ignored; KSKs are treated as if they
  6407. were ZSKs and are used to sign the entire zone. This is
  6408. similar to the <command>dnssec-signzone -z</command>
  6409. command line option.
  6410. </para>
  6411. <para>
  6412. When this option is set to <literal>yes</literal>, there
  6413. must be at least two active keys for every algorithm
  6414. represented in the DNSKEY RRset: at least one KSK and one
  6415. ZSK per algorithm. If there is any algorithm for which
  6416. this requirement is not met, this option will be ignored
  6417. for that algorithm.
  6418. </para>
  6419. </listitem>
  6420. </varlistentry>
  6421. <varlistentry>
  6422. <term><command>dnssec-dnskey-kskonly</command></term>
  6423. <listitem>
  6424. <para>
  6425. When this option and <command>update-check-ksk</command>
  6426. are both set to <literal>yes</literal>, only key-signing
  6427. keys (that is, keys with the KSK bit set) will be used
  6428. to sign the DNSKEY RRset at the zone apex. Zone-signing
  6429. keys (keys without the KSK bit set) will be used to sign
  6430. the remainder of the zone, but not the DNSKEY RRset.
  6431. This is similar to the
  6432. <command>dnssec-signzone -x</command> command line option.
  6433. </para>
  6434. <para>
  6435. The default is <command>no</command>. If
  6436. <command>update-check-ksk</command> is set to
  6437. <literal>no</literal>, this option is ignored.
  6438. </para>
  6439. </listitem>
  6440. </varlistentry>
  6441. <varlistentry>
  6442. <term><command>try-tcp-refresh</command></term>
  6443. <listitem>
  6444. <para>
  6445. Try to refresh the zone using TCP if UDP queries fail.
  6446. For BIND 8 compatibility, the default is
  6447. <command>yes</command>.
  6448. </para>
  6449. </listitem>
  6450. </varlistentry>
  6451. <varlistentry>
  6452. <term><command>dnssec-secure-to-insecure</command></term>
  6453. <listitem>
  6454. <para>
  6455. Allow a dynamic zone to transition from secure to
  6456. insecure (i.e., signed to unsigned) by deleting all
  6457. of the DNSKEY records. The default is <command>no</command>.
  6458. If set to <command>yes</command>, and if the DNSKEY RRset
  6459. at the zone apex is deleted, all RRSIG and NSEC records
  6460. will be removed from the zone as well.
  6461. </para>
  6462. <para>
  6463. If the zone uses NSEC3, then it is also necessary to
  6464. delete the NSEC3PARAM RRset from the zone apex; this will
  6465. cause the removal of all corresponding NSEC3 records.
  6466. (It is expected that this requirement will be eliminated
  6467. in a future release.)
  6468. </para>
  6469. <para>
  6470. Note that if a zone has been configured with
  6471. <command>auto-dnssec maintain</command> and the
  6472. private keys remain accessible in the key repository,
  6473. then the zone will be automatically signed again the
  6474. next time <command>named</command> is started.
  6475. </para>
  6476. </listitem>
  6477. </varlistentry>
  6478. </variablelist>
  6479. </sect3>
  6480. <sect3>
  6481. <title>Forwarding</title>
  6482. <para>
  6483. The forwarding facility can be used to create a large site-wide
  6484. cache on a few servers, reducing traffic over links to external
  6485. name servers. It can also be used to allow queries by servers that
  6486. do not have direct access to the Internet, but wish to look up
  6487. exterior
  6488. names anyway. Forwarding occurs only on those queries for which
  6489. the server is not authoritative and does not have the answer in
  6490. its cache.
  6491. </para>
  6492. <variablelist>
  6493. <varlistentry>
  6494. <term><command>forward</command></term>
  6495. <listitem>
  6496. <para>
  6497. This option is only meaningful if the
  6498. forwarders list is not empty. A value of <varname>first</varname>,
  6499. the default, causes the server to query the forwarders
  6500. first &mdash; and
  6501. if that doesn't answer the question, the server will then
  6502. look for
  6503. the answer itself. If <varname>only</varname> is
  6504. specified, the
  6505. server will only query the forwarders.
  6506. </para>
  6507. </listitem>
  6508. </varlistentry>
  6509. <varlistentry>
  6510. <term><command>forwarders</command></term>
  6511. <listitem>
  6512. <para>
  6513. Specifies the IP addresses to be used
  6514. for forwarding. The default is the empty list (no
  6515. forwarding).
  6516. </para>
  6517. </listitem>
  6518. </varlistentry>
  6519. </variablelist>
  6520. <para>
  6521. Forwarding can also be configured on a per-domain basis, allowing
  6522. for the global forwarding options to be overridden in a variety
  6523. of ways. You can set particular domains to use different
  6524. forwarders,
  6525. or have a different <command>forward only/first</command> behavior,
  6526. or not forward at all, see <xref linkend="zone_statement_grammar"/>.
  6527. </para>
  6528. </sect3>
  6529. <sect3>
  6530. <title>Dual-stack Servers</title>
  6531. <para>
  6532. Dual-stack servers are used as servers of last resort to work
  6533. around
  6534. problems in reachability due the lack of support for either IPv4
  6535. or IPv6
  6536. on the host machine.
  6537. </para>
  6538. <variablelist>
  6539. <varlistentry>
  6540. <term><command>dual-stack-servers</command></term>
  6541. <listitem>
  6542. <para>
  6543. Specifies host names or addresses of machines with access to
  6544. both IPv4 and IPv6 transports. If a hostname is used, the
  6545. server must be able
  6546. to resolve the name using only the transport it has. If the
  6547. machine is dual
  6548. stacked, then the <command>dual-stack-servers</command> have no effect unless
  6549. access to a transport has been disabled on the command line
  6550. (e.g. <command>named -4</command>).
  6551. </para>
  6552. </listitem>
  6553. </varlistentry>
  6554. </variablelist>
  6555. </sect3>
  6556. <sect3 id="access_control">
  6557. <title>Access Control</title>
  6558. <para>
  6559. Access to the server can be restricted based on the IP address
  6560. of the requesting system. See <xref linkend="address_match_lists"/> for
  6561. details on how to specify IP address lists.
  6562. </para>
  6563. <variablelist>
  6564. <varlistentry>
  6565. <term><command>allow-notify</command></term>
  6566. <listitem>
  6567. <para>
  6568. Specifies which hosts are allowed to
  6569. notify this server, a slave, of zone changes in addition
  6570. to the zone masters.
  6571. <command>allow-notify</command> may also be
  6572. specified in the
  6573. <command>zone</command> statement, in which case
  6574. it overrides the
  6575. <command>options allow-notify</command>
  6576. statement. It is only meaningful
  6577. for a slave zone. If not specified, the default is to
  6578. process notify messages
  6579. only from a zone's master.
  6580. </para>
  6581. </listitem>
  6582. </varlistentry>
  6583. <varlistentry>
  6584. <term><command>allow-query</command></term>
  6585. <listitem>
  6586. <para>
  6587. Specifies which hosts are allowed to ask ordinary
  6588. DNS questions. <command>allow-query</command> may
  6589. also be specified in the <command>zone</command>
  6590. statement, in which case it overrides the
  6591. <command>options allow-query</command> statement.
  6592. If not specified, the default is to allow queries
  6593. from all hosts.
  6594. </para>
  6595. <note>
  6596. <para>
  6597. <command>allow-query-cache</command> is now
  6598. used to specify access to the cache.
  6599. </para>
  6600. </note>
  6601. </listitem>
  6602. </varlistentry>
  6603. <varlistentry>
  6604. <term><command>allow-query-on</command></term>
  6605. <listitem>
  6606. <para>
  6607. Specifies which local addresses can accept ordinary
  6608. DNS questions. This makes it possible, for instance,
  6609. to allow queries on internal-facing interfaces but
  6610. disallow them on external-facing ones, without
  6611. necessarily knowing the internal network's addresses.
  6612. </para>
  6613. <para>
  6614. <command>allow-query-on</command> may
  6615. also be specified in the <command>zone</command>
  6616. statement, in which case it overrides the
  6617. <command>options allow-query-on</command> statement.
  6618. </para>
  6619. <para>
  6620. If not specified, the default is to allow queries
  6621. on all addresses.
  6622. </para>
  6623. <note>
  6624. <para>
  6625. <command>allow-query-cache</command> is
  6626. used to specify access to the cache.
  6627. </para>
  6628. </note>
  6629. </listitem>
  6630. </varlistentry>
  6631. <varlistentry>
  6632. <term><command>allow-query-cache</command></term>
  6633. <listitem>
  6634. <para>
  6635. Specifies which hosts are allowed to get answers
  6636. from the cache. If <command>allow-query-cache</command>
  6637. is not set then <command>allow-recursion</command>
  6638. is used if set, otherwise <command>allow-query</command>
  6639. is used if set unless <command>recursion no;</command> is
  6640. set in which case <command>none;</command> is used,
  6641. otherwise the default (<command>localnets;</command>
  6642. <command>localhost;</command>) is used.
  6643. </para>
  6644. </listitem>
  6645. </varlistentry>
  6646. <varlistentry>
  6647. <term><command>allow-query-cache-on</command></term>
  6648. <listitem>
  6649. <para>
  6650. Specifies which local addresses can give answers
  6651. from the cache. If not specified, the default is
  6652. to allow cache queries on any address,
  6653. <command>localnets</command> and
  6654. <command>localhost</command>.
  6655. </para>
  6656. </listitem>
  6657. </varlistentry>
  6658. <varlistentry>
  6659. <term><command>allow-recursion</command></term>
  6660. <listitem>
  6661. <para>
  6662. Specifies which hosts are allowed to make recursive
  6663. queries through this server. If
  6664. <command>allow-recursion</command> is not set
  6665. then <command>allow-query-cache</command> is
  6666. used if set, otherwise <command>allow-query</command>
  6667. is used if set, otherwise the default
  6668. (<command>localnets;</command>
  6669. <command>localhost;</command>) is used.
  6670. </para>
  6671. </listitem>
  6672. </varlistentry>
  6673. <varlistentry>
  6674. <term><command>allow-recursion-on</command></term>
  6675. <listitem>
  6676. <para>
  6677. Specifies which local addresses can accept recursive
  6678. queries. If not specified, the default is to allow
  6679. recursive queries on all addresses.
  6680. </para>
  6681. </listitem>
  6682. </varlistentry>
  6683. <varlistentry>
  6684. <term><command>allow-update</command></term>
  6685. <listitem>
  6686. <para>
  6687. Specifies which hosts are allowed to
  6688. submit Dynamic DNS updates for master zones. The default is
  6689. to deny
  6690. updates from all hosts. Note that allowing updates based
  6691. on the requestor's IP address is insecure; see
  6692. <xref linkend="dynamic_update_security"/> for details.
  6693. </para>
  6694. </listitem>
  6695. </varlistentry>
  6696. <varlistentry>
  6697. <term><command>allow-update-forwarding</command></term>
  6698. <listitem>
  6699. <para>
  6700. Specifies which hosts are allowed to
  6701. submit Dynamic DNS updates to slave zones to be forwarded to
  6702. the
  6703. master. The default is <userinput>{ none; }</userinput>,
  6704. which
  6705. means that no update forwarding will be performed. To
  6706. enable
  6707. update forwarding, specify
  6708. <userinput>allow-update-forwarding { any; };</userinput>.
  6709. Specifying values other than <userinput>{ none; }</userinput> or
  6710. <userinput>{ any; }</userinput> is usually
  6711. counterproductive, since
  6712. the responsibility for update access control should rest
  6713. with the
  6714. master server, not the slaves.
  6715. </para>
  6716. <para>
  6717. Note that enabling the update forwarding feature on a slave
  6718. server
  6719. may expose master servers relying on insecure IP address
  6720. based
  6721. access control to attacks; see <xref linkend="dynamic_update_security"/>
  6722. for more details.
  6723. </para>
  6724. </listitem>
  6725. </varlistentry>
  6726. <varlistentry>
  6727. <term><command>allow-v6-synthesis</command></term>
  6728. <listitem>
  6729. <para>
  6730. This option was introduced for the smooth transition from
  6731. AAAA
  6732. to A6 and from "nibble labels" to binary labels.
  6733. However, since both A6 and binary labels were then
  6734. deprecated,
  6735. this option was also deprecated.
  6736. It is now ignored with some warning messages.
  6737. </para>
  6738. </listitem>
  6739. </varlistentry>
  6740. <varlistentry>
  6741. <term><command>allow-transfer</command></term>
  6742. <listitem>
  6743. <para>
  6744. Specifies which hosts are allowed to
  6745. receive zone transfers from the server. <command>allow-transfer</command> may
  6746. also be specified in the <command>zone</command>
  6747. statement, in which
  6748. case it overrides the <command>options allow-transfer</command> statement.
  6749. If not specified, the default is to allow transfers to all
  6750. hosts.
  6751. </para>
  6752. </listitem>
  6753. </varlistentry>
  6754. <varlistentry>
  6755. <term><command>blackhole</command></term>
  6756. <listitem>
  6757. <para>
  6758. Specifies a list of addresses that the
  6759. server will not accept queries from or use to resolve a
  6760. query. Queries
  6761. from these addresses will not be responded to. The default
  6762. is <userinput>none</userinput>.
  6763. </para>
  6764. </listitem>
  6765. </varlistentry>
  6766. <varlistentry>
  6767. <term><command>filter-aaaa</command></term>
  6768. <listitem>
  6769. <para>
  6770. Specifies a list of addresses to which
  6771. <command>filter-aaaa-on-v4</command>
  6772. is applies. The default is <userinput>any</userinput>.
  6773. </para>
  6774. </listitem>
  6775. </varlistentry>
  6776. <varlistentry>
  6777. <term><command>resolver-query-timeout</command></term>
  6778. <listitem>
  6779. <para>
  6780. The amount of time the resolver will spend attempting
  6781. to resolve a recursive query before failing. The
  6782. default is <literal>10</literal> and the maximum is
  6783. <literal>30</literal>. Setting it to <literal>0</literal>
  6784. will result in the default being used.
  6785. </para>
  6786. </listitem>
  6787. </varlistentry>
  6788. </variablelist>
  6789. </sect3>
  6790. <sect3>
  6791. <title>Interfaces</title>
  6792. <para>
  6793. The interfaces and ports that the server will answer queries
  6794. from may be specified using the <command>listen-on</command> option. <command>listen-on</command> takes
  6795. an optional port and an <varname>address_match_list</varname>.
  6796. The server will listen on all interfaces allowed by the address
  6797. match list. If a port is not specified, port 53 will be used.
  6798. </para>
  6799. <para>
  6800. Multiple <command>listen-on</command> statements are
  6801. allowed.
  6802. For example,
  6803. </para>
  6804. <programlisting>listen-on { 5.6.7.8; };
  6805. listen-on port 1234 { !1.2.3.4; 1.2/16; };
  6806. </programlisting>
  6807. <para>
  6808. will enable the name server on port 53 for the IP address
  6809. 5.6.7.8, and on port 1234 of an address on the machine in net
  6810. 1.2 that is not 1.2.3.4.
  6811. </para>
  6812. <para>
  6813. If no <command>listen-on</command> is specified, the
  6814. server will listen on port 53 on all IPv4 interfaces.
  6815. </para>
  6816. <para>
  6817. The <command>listen-on-v6</command> option is used to
  6818. specify the interfaces and the ports on which the server will
  6819. listen
  6820. for incoming queries sent using IPv6.
  6821. </para>
  6822. <para>
  6823. When <programlisting>{ any; }</programlisting> is
  6824. specified
  6825. as the <varname>address_match_list</varname> for the
  6826. <command>listen-on-v6</command> option,
  6827. the server does not bind a separate socket to each IPv6 interface
  6828. address as it does for IPv4 if the operating system has enough API
  6829. support for IPv6 (specifically if it conforms to RFC 3493 and RFC
  6830. 3542).
  6831. Instead, it listens on the IPv6 wildcard address.
  6832. If the system only has incomplete API support for IPv6, however,
  6833. the behavior is the same as that for IPv4.
  6834. </para>
  6835. <para>
  6836. A list of particular IPv6 addresses can also be specified, in
  6837. which case
  6838. the server listens on a separate socket for each specified
  6839. address,
  6840. regardless of whether the desired API is supported by the system.
  6841. </para>
  6842. <para>
  6843. Multiple <command>listen-on-v6</command> options can
  6844. be used.
  6845. For example,
  6846. </para>
  6847. <programlisting>listen-on-v6 { any; };
  6848. listen-on-v6 port 1234 { !2001:db8::/32; any; };
  6849. </programlisting>
  6850. <para>
  6851. will enable the name server on port 53 for any IPv6 addresses
  6852. (with a single wildcard socket),
  6853. and on port 1234 of IPv6 addresses that is not in the prefix
  6854. 2001:db8::/32 (with separate sockets for each matched address.)
  6855. </para>
  6856. <para>
  6857. To make the server not listen on any IPv6 address, use
  6858. </para>
  6859. <programlisting>listen-on-v6 { none; };
  6860. </programlisting>
  6861. <para>
  6862. If no <command>listen-on-v6</command> option is
  6863. specified, the server will not listen on any IPv6 address
  6864. unless <command>-6</command> is specified when <command>named</command> is
  6865. invoked. If <command>-6</command> is specified then
  6866. <command>named</command> will listen on port 53 on all IPv6 interfaces by default.
  6867. </para>
  6868. </sect3>
  6869. <sect3 id="query_address">
  6870. <title>Query Address</title>
  6871. <para>
  6872. If the server doesn't know the answer to a question, it will
  6873. query other name servers. <command>query-source</command> specifies
  6874. the address and port used for such queries. For queries sent over
  6875. IPv6, there is a separate <command>query-source-v6</command> option.
  6876. If <command>address</command> is <command>*</command> (asterisk) or is omitted,
  6877. a wildcard IP address (<command>INADDR_ANY</command>)
  6878. will be used.
  6879. </para>
  6880. <para>
  6881. If <command>port</command> is <command>*</command> or is omitted,
  6882. a random port number from a pre-configured
  6883. range is picked up and will be used for each query.
  6884. The port range(s) is that specified in
  6885. the <command>use-v4-udp-ports</command> (for IPv4)
  6886. and <command>use-v6-udp-ports</command> (for IPv6)
  6887. options, excluding the ranges specified in
  6888. the <command>avoid-v4-udp-ports</command>
  6889. and <command>avoid-v6-udp-ports</command> options, respectively.
  6890. </para>
  6891. <para>
  6892. The defaults of the <command>query-source</command> and
  6893. <command>query-source-v6</command> options
  6894. are:
  6895. </para>
  6896. <programlisting>query-source address * port *;
  6897. query-source-v6 address * port *;
  6898. </programlisting>
  6899. <para>
  6900. If <command>use-v4-udp-ports</command> or
  6901. <command>use-v6-udp-ports</command> is unspecified,
  6902. <command>named</command> will check if the operating
  6903. system provides a programming interface to retrieve the
  6904. system's default range for ephemeral ports.
  6905. If such an interface is available,
  6906. <command>named</command> will use the corresponding system
  6907. default range; otherwise, it will use its own defaults:
  6908. </para>
  6909. <programlisting>use-v4-udp-ports { range 1024 65535; };
  6910. use-v6-udp-ports { range 1024 65535; };
  6911. </programlisting>
  6912. <para>
  6913. Note: make sure the ranges be sufficiently large for
  6914. security. A desirable size depends on various parameters,
  6915. but we generally recommend it contain at least 16384 ports
  6916. (14 bits of entropy).
  6917. Note also that the system's default range when used may be
  6918. too small for this purpose, and that the range may even be
  6919. changed while <command>named</command> is running; the new
  6920. range will automatically be applied when <command>named</command>
  6921. is reloaded.
  6922. It is encouraged to
  6923. configure <command>use-v4-udp-ports</command> and
  6924. <command>use-v6-udp-ports</command> explicitly so that the
  6925. ranges are sufficiently large and are reasonably
  6926. independent from the ranges used by other applications.
  6927. </para>
  6928. <para>
  6929. Note: the operational configuration
  6930. where <command>named</command> runs may prohibit the use
  6931. of some ports. For example, UNIX systems will not allow
  6932. <command>named</command> running without a root privilege
  6933. to use ports less than 1024.
  6934. If such ports are included in the specified (or detected)
  6935. set of query ports, the corresponding query attempts will
  6936. fail, resulting in resolution failures or delay.
  6937. It is therefore important to configure the set of ports
  6938. that can be safely used in the expected operational environment.
  6939. </para>
  6940. <para>
  6941. The defaults of the <command>avoid-v4-udp-ports</command> and
  6942. <command>avoid-v6-udp-ports</command> options
  6943. are:
  6944. </para>
  6945. <programlisting>avoid-v4-udp-ports {};
  6946. avoid-v6-udp-ports {};
  6947. </programlisting>
  6948. <para>
  6949. Note: BIND 9.5.0 introduced
  6950. the <command>use-queryport-pool</command>
  6951. option to support a pool of such random ports, but this
  6952. option is now obsolete because reusing the same ports in
  6953. the pool may not be sufficiently secure.
  6954. For the same reason, it is generally strongly discouraged to
  6955. specify a particular port for the
  6956. <command>query-source</command> or
  6957. <command>query-source-v6</command> options;
  6958. it implicitly disables the use of randomized port numbers.
  6959. </para>
  6960. <variablelist>
  6961. <varlistentry>
  6962. <term><command>use-queryport-pool</command></term>
  6963. <listitem>
  6964. <para>
  6965. This option is obsolete.
  6966. </para>
  6967. </listitem>
  6968. </varlistentry>
  6969. <varlistentry>
  6970. <term><command>queryport-pool-ports</command></term>
  6971. <listitem>
  6972. <para>
  6973. This option is obsolete.
  6974. </para>
  6975. </listitem>
  6976. </varlistentry>
  6977. <varlistentry>
  6978. <term><command>queryport-pool-updateinterval</command></term>
  6979. <listitem>
  6980. <para>
  6981. This option is obsolete.
  6982. </para>
  6983. </listitem>
  6984. </varlistentry>
  6985. </variablelist>
  6986. <note>
  6987. <para>
  6988. The address specified in the <command>query-source</command> option
  6989. is used for both UDP and TCP queries, but the port applies only
  6990. to UDP queries. TCP queries always use a random
  6991. unprivileged port.
  6992. </para>
  6993. </note>
  6994. <note>
  6995. <para>
  6996. Solaris 2.5.1 and earlier does not support setting the source
  6997. address for TCP sockets.
  6998. </para>
  6999. </note>
  7000. <note>
  7001. <para>
  7002. See also <command>transfer-source</command> and
  7003. <command>notify-source</command>.
  7004. </para>
  7005. </note>
  7006. </sect3>
  7007. <sect3 id="zone_transfers">
  7008. <title>Zone Transfers</title>
  7009. <para>
  7010. <acronym>BIND</acronym> has mechanisms in place to
  7011. facilitate zone transfers
  7012. and set limits on the amount of load that transfers place on the
  7013. system. The following options apply to zone transfers.
  7014. </para>
  7015. <variablelist>
  7016. <varlistentry>
  7017. <term><command>also-notify</command></term>
  7018. <listitem>
  7019. <para>
  7020. Defines a global list of IP addresses of name servers
  7021. that are also sent NOTIFY messages whenever a fresh copy of
  7022. the
  7023. zone is loaded, in addition to the servers listed in the
  7024. zone's NS records.
  7025. This helps to ensure that copies of the zones will
  7026. quickly converge on stealth servers.
  7027. Optionally, a port may be specified with each
  7028. <command>also-notify</command> address to send
  7029. the notify messages to a port other than the
  7030. default of 53.
  7031. If an <command>also-notify</command> list
  7032. is given in a <command>zone</command> statement,
  7033. it will override
  7034. the <command>options also-notify</command>
  7035. statement. When a <command>zone notify</command>
  7036. statement
  7037. is set to <command>no</command>, the IP
  7038. addresses in the global <command>also-notify</command> list will
  7039. not be sent NOTIFY messages for that zone. The default is
  7040. the empty
  7041. list (no global notification list).
  7042. </para>
  7043. </listitem>
  7044. </varlistentry>
  7045. <varlistentry>
  7046. <term><command>max-transfer-time-in</command></term>
  7047. <listitem>
  7048. <para>
  7049. Inbound zone transfers running longer than
  7050. this many minutes will be terminated. The default is 120
  7051. minutes
  7052. (2 hours). The maximum value is 28 days (40320 minutes).
  7053. </para>
  7054. </listitem>
  7055. </varlistentry>
  7056. <varlistentry>
  7057. <term><command>max-transfer-idle-in</command></term>
  7058. <listitem>
  7059. <para>
  7060. Inbound zone transfers making no progress
  7061. in this many minutes will be terminated. The default is 60
  7062. minutes
  7063. (1 hour). The maximum value is 28 days (40320 minutes).
  7064. </para>
  7065. </listitem>
  7066. </varlistentry>
  7067. <varlistentry>
  7068. <term><command>max-transfer-time-out</command></term>
  7069. <listitem>
  7070. <para>
  7071. Outbound zone transfers running longer than
  7072. this many minutes will be terminated. The default is 120
  7073. minutes
  7074. (2 hours). The maximum value is 28 days (40320 minutes).
  7075. </para>
  7076. </listitem>
  7077. </varlistentry>
  7078. <varlistentry>
  7079. <term><command>max-transfer-idle-out</command></term>
  7080. <listitem>
  7081. <para>
  7082. Outbound zone transfers making no progress
  7083. in this many minutes will be terminated. The default is 60
  7084. minutes (1
  7085. hour). The maximum value is 28 days (40320 minutes).
  7086. </para>
  7087. </listitem>
  7088. </varlistentry>
  7089. <varlistentry>
  7090. <term><command>serial-query-rate</command></term>
  7091. <listitem>
  7092. <para>
  7093. Slave servers will periodically query master
  7094. servers to find out if zone serial numbers have
  7095. changed. Each such query uses a minute amount of
  7096. the slave server's network bandwidth. To limit
  7097. the amount of bandwidth used, BIND 9 limits the
  7098. rate at which queries are sent. The value of the
  7099. <command>serial-query-rate</command> option, an
  7100. integer, is the maximum number of queries sent
  7101. per second. The default is 20.
  7102. </para>
  7103. <para>
  7104. In addition to controlling the rate SOA refresh
  7105. queries are issued at
  7106. <command>serial-query-rate</command> also controls
  7107. the rate at which NOTIFY messages are sent from
  7108. both master and slave zones.
  7109. </para>
  7110. </listitem>
  7111. </varlistentry>
  7112. <varlistentry>
  7113. <term><command>serial-queries</command></term>
  7114. <listitem>
  7115. <para>
  7116. In BIND 8, the <command>serial-queries</command>
  7117. option
  7118. set the maximum number of concurrent serial number queries
  7119. allowed to be outstanding at any given time.
  7120. BIND 9 does not limit the number of outstanding
  7121. serial queries and ignores the <command>serial-queries</command> option.
  7122. Instead, it limits the rate at which the queries are sent
  7123. as defined using the <command>serial-query-rate</command> option.
  7124. </para>
  7125. </listitem>
  7126. </varlistentry>
  7127. <varlistentry>
  7128. <term><command>transfer-format</command></term>
  7129. <listitem>
  7130. <para>
  7131. Zone transfers can be sent using two different formats,
  7132. <command>one-answer</command> and
  7133. <command>many-answers</command>.
  7134. The <command>transfer-format</command> option is used
  7135. on the master server to determine which format it sends.
  7136. <command>one-answer</command> uses one DNS message per
  7137. resource record transferred.
  7138. <command>many-answers</command> packs as many resource
  7139. records as possible into a message.
  7140. <command>many-answers</command> is more efficient, but is
  7141. only supported by relatively new slave servers,
  7142. such as <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
  7143. 8.x and <acronym>BIND</acronym> 4.9.5 onwards.
  7144. The <command>many-answers</command> format is also supported by
  7145. recent Microsoft Windows nameservers.
  7146. The default is <command>many-answers</command>.
  7147. <command>transfer-format</command> may be overridden on a
  7148. per-server basis by using the <command>server</command>
  7149. statement.
  7150. </para>
  7151. </listitem>
  7152. </varlistentry>
  7153. <varlistentry>
  7154. <term><command>transfers-in</command></term>
  7155. <listitem>
  7156. <para>
  7157. The maximum number of inbound zone transfers
  7158. that can be running concurrently. The default value is <literal>10</literal>.
  7159. Increasing <command>transfers-in</command> may
  7160. speed up the convergence
  7161. of slave zones, but it also may increase the load on the
  7162. local system.
  7163. </para>
  7164. </listitem>
  7165. </varlistentry>
  7166. <varlistentry>
  7167. <term><command>transfers-out</command></term>
  7168. <listitem>
  7169. <para>
  7170. The maximum number of outbound zone transfers
  7171. that can be running concurrently. Zone transfer requests in
  7172. excess
  7173. of the limit will be refused. The default value is <literal>10</literal>.
  7174. </para>
  7175. </listitem>
  7176. </varlistentry>
  7177. <varlistentry>
  7178. <term><command>transfers-per-ns</command></term>
  7179. <listitem>
  7180. <para>
  7181. The maximum number of inbound zone transfers
  7182. that can be concurrently transferring from a given remote
  7183. name server.
  7184. The default value is <literal>2</literal>.
  7185. Increasing <command>transfers-per-ns</command>
  7186. may
  7187. speed up the convergence of slave zones, but it also may
  7188. increase
  7189. the load on the remote name server. <command>transfers-per-ns</command> may
  7190. be overridden on a per-server basis by using the <command>transfers</command> phrase
  7191. of the <command>server</command> statement.
  7192. </para>
  7193. </listitem>
  7194. </varlistentry>
  7195. <varlistentry>
  7196. <term><command>transfer-source</command></term>
  7197. <listitem>
  7198. <para><command>transfer-source</command>
  7199. determines which local address will be bound to IPv4
  7200. TCP connections used to fetch zones transferred
  7201. inbound by the server. It also determines the
  7202. source IPv4 address, and optionally the UDP port,
  7203. used for the refresh queries and forwarded dynamic
  7204. updates. If not set, it defaults to a system
  7205. controlled value which will usually be the address
  7206. of the interface "closest to" the remote end. This
  7207. address must appear in the remote end's
  7208. <command>allow-transfer</command> option for the
  7209. zone being transferred, if one is specified. This
  7210. statement sets the
  7211. <command>transfer-source</command> for all zones,
  7212. but can be overridden on a per-view or per-zone
  7213. basis by including a
  7214. <command>transfer-source</command> statement within
  7215. the <command>view</command> or
  7216. <command>zone</command> block in the configuration
  7217. file.
  7218. </para>
  7219. <note>
  7220. <para>
  7221. Solaris 2.5.1 and earlier does not support setting the
  7222. source address for TCP sockets.
  7223. </para>
  7224. </note>
  7225. </listitem>
  7226. </varlistentry>
  7227. <varlistentry>
  7228. <term><command>transfer-source-v6</command></term>
  7229. <listitem>
  7230. <para>
  7231. The same as <command>transfer-source</command>,
  7232. except zone transfers are performed using IPv6.
  7233. </para>
  7234. </listitem>
  7235. </varlistentry>
  7236. <varlistentry>
  7237. <term><command>alt-transfer-source</command></term>
  7238. <listitem>
  7239. <para>
  7240. An alternate transfer source if the one listed in
  7241. <command>transfer-source</command> fails and
  7242. <command>use-alt-transfer-source</command> is
  7243. set.
  7244. </para>
  7245. <note>
  7246. If you do not wish the alternate transfer source
  7247. to be used, you should set
  7248. <command>use-alt-transfer-source</command>
  7249. appropriately and you should not depend upon
  7250. getting an answer back to the first refresh
  7251. query.
  7252. </note>
  7253. </listitem>
  7254. </varlistentry>
  7255. <varlistentry>
  7256. <term><command>alt-transfer-source-v6</command></term>
  7257. <listitem>
  7258. <para>
  7259. An alternate transfer source if the one listed in
  7260. <command>transfer-source-v6</command> fails and
  7261. <command>use-alt-transfer-source</command> is
  7262. set.
  7263. </para>
  7264. </listitem>
  7265. </varlistentry>
  7266. <varlistentry>
  7267. <term><command>use-alt-transfer-source</command></term>
  7268. <listitem>
  7269. <para>
  7270. Use the alternate transfer sources or not. If views are
  7271. specified this defaults to <command>no</command>
  7272. otherwise it defaults to
  7273. <command>yes</command> (for BIND 8
  7274. compatibility).
  7275. </para>
  7276. </listitem>
  7277. </varlistentry>
  7278. <varlistentry>
  7279. <term><command>notify-source</command></term>
  7280. <listitem>
  7281. <para><command>notify-source</command>
  7282. determines which local source address, and
  7283. optionally UDP port, will be used to send NOTIFY
  7284. messages. This address must appear in the slave
  7285. server's <command>masters</command> zone clause or
  7286. in an <command>allow-notify</command> clause. This
  7287. statement sets the <command>notify-source</command>
  7288. for all zones, but can be overridden on a per-zone or
  7289. per-view basis by including a
  7290. <command>notify-source</command> statement within
  7291. the <command>zone</command> or
  7292. <command>view</command> block in the configuration
  7293. file.
  7294. </para>
  7295. <note>
  7296. <para>
  7297. Solaris 2.5.1 and earlier does not support setting the
  7298. source address for TCP sockets.
  7299. </para>
  7300. </note>
  7301. </listitem>
  7302. </varlistentry>
  7303. <varlistentry>
  7304. <term><command>notify-source-v6</command></term>
  7305. <listitem>
  7306. <para>
  7307. Like <command>notify-source</command>,
  7308. but applies to notify messages sent to IPv6 addresses.
  7309. </para>
  7310. </listitem>
  7311. </varlistentry>
  7312. </variablelist>
  7313. </sect3>
  7314. <sect3>
  7315. <title>UDP Port Lists</title>
  7316. <para>
  7317. <command>use-v4-udp-ports</command>,
  7318. <command>avoid-v4-udp-ports</command>,
  7319. <command>use-v6-udp-ports</command>, and
  7320. <command>avoid-v6-udp-ports</command>
  7321. specify a list of IPv4 and IPv6 UDP ports that will be
  7322. used or not used as source ports for UDP messages.
  7323. See <xref linkend="query_address"/> about how the
  7324. available ports are determined.
  7325. For example, with the following configuration
  7326. </para>
  7327. <programlisting>
  7328. use-v6-udp-ports { range 32768 65535; };
  7329. avoid-v6-udp-ports { 40000; range 50000 60000; };
  7330. </programlisting>
  7331. <para>
  7332. UDP ports of IPv6 messages sent
  7333. from <command>named</command> will be in one
  7334. of the following ranges: 32768 to 39999, 40001 to 49999,
  7335. and 60001 to 65535.
  7336. </para>
  7337. <para>
  7338. <command>avoid-v4-udp-ports</command> and
  7339. <command>avoid-v6-udp-ports</command> can be used
  7340. to prevent <command>named</command> from choosing as its random source port a
  7341. port that is blocked by your firewall or a port that is
  7342. used by other applications;
  7343. if a query went out with a source port blocked by a
  7344. firewall, the
  7345. answer would not get by the firewall and the name server would
  7346. have to query again.
  7347. Note: the desired range can also be represented only with
  7348. <command>use-v4-udp-ports</command> and
  7349. <command>use-v6-udp-ports</command>, and the
  7350. <command>avoid-</command> options are redundant in that
  7351. sense; they are provided for backward compatibility and
  7352. to possibly simplify the port specification.
  7353. </para>
  7354. </sect3>
  7355. <sect3>
  7356. <title>Operating System Resource Limits</title>
  7357. <para>
  7358. The server's usage of many system resources can be limited.
  7359. Scaled values are allowed when specifying resource limits. For
  7360. example, <command>1G</command> can be used instead of
  7361. <command>1073741824</command> to specify a limit of
  7362. one
  7363. gigabyte. <command>unlimited</command> requests
  7364. unlimited use, or the
  7365. maximum available amount. <command>default</command>
  7366. uses the limit
  7367. that was in force when the server was started. See the description
  7368. of <command>size_spec</command> in <xref linkend="configuration_file_elements"/>.
  7369. </para>
  7370. <para>
  7371. The following options set operating system resource limits for
  7372. the name server process. Some operating systems don't support
  7373. some or
  7374. any of the limits. On such systems, a warning will be issued if
  7375. the
  7376. unsupported limit is used.
  7377. </para>
  7378. <variablelist>
  7379. <varlistentry>
  7380. <term><command>coresize</command></term>
  7381. <listitem>
  7382. <para>
  7383. The maximum size of a core dump. The default
  7384. is <literal>default</literal>.
  7385. </para>
  7386. </listitem>
  7387. </varlistentry>
  7388. <varlistentry>
  7389. <term><command>datasize</command></term>
  7390. <listitem>
  7391. <para>
  7392. The maximum amount of data memory the server
  7393. may use. The default is <literal>default</literal>.
  7394. This is a hard limit on server memory usage.
  7395. If the server attempts to allocate memory in excess of this
  7396. limit, the allocation will fail, which may in turn leave
  7397. the server unable to perform DNS service. Therefore,
  7398. this option is rarely useful as a way of limiting the
  7399. amount of memory used by the server, but it can be used
  7400. to raise an operating system data size limit that is
  7401. too small by default. If you wish to limit the amount
  7402. of memory used by the server, use the
  7403. <command>max-cache-size</command> and
  7404. <command>recursive-clients</command>
  7405. options instead.
  7406. </para>
  7407. </listitem>
  7408. </varlistentry>
  7409. <varlistentry>
  7410. <term><command>files</command></term>
  7411. <listitem>
  7412. <para>
  7413. The maximum number of files the server
  7414. may have open concurrently. The default is <literal>unlimited</literal>.
  7415. </para>
  7416. </listitem>
  7417. </varlistentry>
  7418. <varlistentry>
  7419. <term><command>stacksize</command></term>
  7420. <listitem>
  7421. <para>
  7422. The maximum amount of stack memory the server
  7423. may use. The default is <literal>default</literal>.
  7424. </para>
  7425. </listitem>
  7426. </varlistentry>
  7427. </variablelist>
  7428. </sect3>
  7429. <sect3 id="server_resource_limits">
  7430. <title>Server Resource Limits</title>
  7431. <para>
  7432. The following options set limits on the server's
  7433. resource consumption that are enforced internally by the
  7434. server rather than the operating system.
  7435. </para>
  7436. <variablelist>
  7437. <varlistentry>
  7438. <term><command>max-ixfr-log-size</command></term>
  7439. <listitem>
  7440. <para>
  7441. This option is obsolete; it is accepted
  7442. and ignored for BIND 8 compatibility. The option
  7443. <command>max-journal-size</command> performs a
  7444. similar function in BIND 9.
  7445. </para>
  7446. </listitem>
  7447. </varlistentry>
  7448. <varlistentry>
  7449. <term><command>max-journal-size</command></term>
  7450. <listitem>
  7451. <para>
  7452. Sets a maximum size for each journal file
  7453. (see <xref linkend="journal"/>). When the journal file
  7454. approaches
  7455. the specified size, some of the oldest transactions in the
  7456. journal
  7457. will be automatically removed. The default is
  7458. <literal>unlimited</literal>.
  7459. This may also be set on a per-zone basis.
  7460. </para>
  7461. </listitem>
  7462. </varlistentry>
  7463. <varlistentry>
  7464. <term><command>host-statistics-max</command></term>
  7465. <listitem>
  7466. <para>
  7467. In BIND 8, specifies the maximum number of host statistics
  7468. entries to be kept.
  7469. Not implemented in BIND 9.
  7470. </para>
  7471. </listitem>
  7472. </varlistentry>
  7473. <varlistentry>
  7474. <term><command>recursive-clients</command></term>
  7475. <listitem>
  7476. <para>
  7477. The maximum number of simultaneous recursive lookups
  7478. the server will perform on behalf of clients. The default
  7479. is
  7480. <literal>1000</literal>. Because each recursing
  7481. client uses a fair
  7482. bit of memory, on the order of 20 kilobytes, the value of
  7483. the
  7484. <command>recursive-clients</command> option may
  7485. have to be decreased
  7486. on hosts with limited memory.
  7487. </para>
  7488. </listitem>
  7489. </varlistentry>
  7490. <varlistentry>
  7491. <term><command>tcp-clients</command></term>
  7492. <listitem>
  7493. <para>
  7494. The maximum number of simultaneous client TCP
  7495. connections that the server will accept.
  7496. The default is <literal>100</literal>.
  7497. </para>
  7498. </listitem>
  7499. </varlistentry>
  7500. <varlistentry>
  7501. <term><command>reserved-sockets</command></term>
  7502. <listitem>
  7503. <para>
  7504. The number of file descriptors reserved for TCP, stdio,
  7505. etc. This needs to be big enough to cover the number of
  7506. interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as
  7507. to provide room for outgoing TCP queries and incoming zone
  7508. transfers. The default is <literal>512</literal>.
  7509. The minimum value is <literal>128</literal> and the
  7510. maximum value is <literal>128</literal> less than
  7511. maxsockets (-S). This option may be removed in the future.
  7512. </para>
  7513. <para>
  7514. This option has little effect on Windows.
  7515. </para>
  7516. </listitem>
  7517. </varlistentry>
  7518. <varlistentry>
  7519. <term><command>max-cache-size</command></term>
  7520. <listitem>
  7521. <para>
  7522. The maximum amount of memory to use for the
  7523. server's cache, in bytes.
  7524. When the amount of data in the cache
  7525. reaches this limit, the server will cause records to expire
  7526. prematurely based on an LRU based strategy so that
  7527. the limit is not exceeded.
  7528. A value of 0 is special, meaning that
  7529. records are purged from the cache only when their
  7530. TTLs expire.
  7531. Another special keyword <userinput>unlimited</userinput>
  7532. means the maximum value of 32-bit unsigned integers
  7533. (0xffffffff), which may not have the same effect as
  7534. 0 on machines that support more than 32 bits of
  7535. memory space.
  7536. Any positive values less than 2MB will be ignored reset
  7537. to 2MB.
  7538. In a server with multiple views, the limit applies
  7539. separately to the cache of each view.
  7540. The default is 0.
  7541. </para>
  7542. </listitem>
  7543. </varlistentry>
  7544. <varlistentry>
  7545. <term><command>tcp-listen-queue</command></term>
  7546. <listitem>
  7547. <para>
  7548. The listen queue depth. The default and minimum is 3.
  7549. If the kernel supports the accept filter "dataready" this
  7550. also controls how
  7551. many TCP connections that will be queued in kernel space
  7552. waiting for
  7553. some data before being passed to accept. Values less than 3
  7554. will be
  7555. silently raised.
  7556. </para>
  7557. </listitem>
  7558. </varlistentry>
  7559. </variablelist>
  7560. </sect3>
  7561. <sect3>
  7562. <title>Periodic Task Intervals</title>
  7563. <variablelist>
  7564. <varlistentry>
  7565. <term><command>cleaning-interval</command></term>
  7566. <listitem>
  7567. <para>
  7568. This interval is effectively obsolete. Previously,
  7569. the server would remove expired resource records
  7570. from the cache every <command>cleaning-interval</command> minutes.
  7571. <acronym>BIND</acronym> 9 now manages cache
  7572. memory in a more sophisticated manner and does not
  7573. rely on the periodic cleaning any more.
  7574. Specifying this option therefore has no effect on
  7575. the server's behavior.
  7576. </para>
  7577. </listitem>
  7578. </varlistentry>
  7579. <varlistentry>
  7580. <term><command>heartbeat-interval</command></term>
  7581. <listitem>
  7582. <para>
  7583. The server will perform zone maintenance tasks
  7584. for all zones marked as <command>dialup</command> whenever this
  7585. interval expires. The default is 60 minutes. Reasonable
  7586. values are up
  7587. to 1 day (1440 minutes). The maximum value is 28 days
  7588. (40320 minutes).
  7589. If set to 0, no zone maintenance for these zones will occur.
  7590. </para>
  7591. </listitem>
  7592. </varlistentry>
  7593. <varlistentry>
  7594. <term><command>interface-interval</command></term>
  7595. <listitem>
  7596. <para>
  7597. The server will scan the network interface list
  7598. every <command>interface-interval</command>
  7599. minutes. The default
  7600. is 60 minutes. The maximum value is 28 days (40320 minutes).
  7601. If set to 0, interface scanning will only occur when
  7602. the configuration file is loaded. After the scan, the
  7603. server will
  7604. begin listening for queries on any newly discovered
  7605. interfaces (provided they are allowed by the
  7606. <command>listen-on</command> configuration), and
  7607. will
  7608. stop listening on interfaces that have gone away.
  7609. </para>
  7610. </listitem>
  7611. </varlistentry>
  7612. <varlistentry>
  7613. <term><command>statistics-interval</command></term>
  7614. <listitem>
  7615. <para>
  7616. Name server statistics will be logged
  7617. every <command>statistics-interval</command>
  7618. minutes. The default is
  7619. 60. The maximum value is 28 days (40320 minutes).
  7620. If set to 0, no statistics will be logged.
  7621. </para><note>
  7622. <simpara>
  7623. Not yet implemented in
  7624. <acronym>BIND</acronym> 9.
  7625. </simpara>
  7626. </note>
  7627. </listitem>
  7628. </varlistentry>
  7629. </variablelist>
  7630. </sect3>
  7631. <sect3 id="topology">
  7632. <title>Topology</title>
  7633. <para>
  7634. All other things being equal, when the server chooses a name
  7635. server
  7636. to query from a list of name servers, it prefers the one that is
  7637. topologically closest to itself. The <command>topology</command> statement
  7638. takes an <command>address_match_list</command> and
  7639. interprets it
  7640. in a special way. Each top-level list element is assigned a
  7641. distance.
  7642. Non-negated elements get a distance based on their position in the
  7643. list, where the closer the match is to the start of the list, the
  7644. shorter the distance is between it and the server. A negated match
  7645. will be assigned the maximum distance from the server. If there
  7646. is no match, the address will get a distance which is further than
  7647. any non-negated list element, and closer than any negated element.
  7648. For example,
  7649. </para>
  7650. <programlisting>topology {
  7651. 10/8;
  7652. !1.2.3/24;
  7653. { 1.2/16; 3/8; };
  7654. };</programlisting>
  7655. <para>
  7656. will prefer servers on network 10 the most, followed by hosts
  7657. on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
  7658. exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
  7659. is preferred least of all.
  7660. </para>
  7661. <para>
  7662. The default topology is
  7663. </para>
  7664. <programlisting> topology { localhost; localnets; };
  7665. </programlisting>
  7666. <note>
  7667. <simpara>
  7668. The <command>topology</command> option
  7669. is not implemented in <acronym>BIND</acronym> 9.
  7670. </simpara>
  7671. </note>
  7672. </sect3>
  7673. <sect3 id="the_sortlist_statement">
  7674. <title>The <command>sortlist</command> Statement</title>
  7675. <para>
  7676. The response to a DNS query may consist of multiple resource
  7677. records (RRs) forming a resource records set (RRset).
  7678. The name server will normally return the
  7679. RRs within the RRset in an indeterminate order
  7680. (but see the <command>rrset-order</command>
  7681. statement in <xref linkend="rrset_ordering"/>).
  7682. The client resolver code should rearrange the RRs as appropriate,
  7683. that is, using any addresses on the local net in preference to
  7684. other addresses.
  7685. However, not all resolvers can do this or are correctly
  7686. configured.
  7687. When a client is using a local server, the sorting can be performed
  7688. in the server, based on the client's address. This only requires
  7689. configuring the name servers, not all the clients.
  7690. </para>
  7691. <para>
  7692. The <command>sortlist</command> statement (see below)
  7693. takes
  7694. an <command>address_match_list</command> and
  7695. interprets it even
  7696. more specifically than the <command>topology</command>
  7697. statement
  7698. does (<xref linkend="topology"/>).
  7699. Each top level statement in the <command>sortlist</command> must
  7700. itself be an explicit <command>address_match_list</command> with
  7701. one or two elements. The first element (which may be an IP
  7702. address,
  7703. an IP prefix, an ACL name or a nested <command>address_match_list</command>)
  7704. of each top level list is checked against the source address of
  7705. the query until a match is found.
  7706. </para>
  7707. <para>
  7708. Once the source address of the query has been matched, if
  7709. the top level statement contains only one element, the actual
  7710. primitive
  7711. element that matched the source address is used to select the
  7712. address
  7713. in the response to move to the beginning of the response. If the
  7714. statement is a list of two elements, then the second element is
  7715. treated the same as the <command>address_match_list</command> in
  7716. a <command>topology</command> statement. Each top
  7717. level element
  7718. is assigned a distance and the address in the response with the
  7719. minimum
  7720. distance is moved to the beginning of the response.
  7721. </para>
  7722. <para>
  7723. In the following example, any queries received from any of
  7724. the addresses of the host itself will get responses preferring
  7725. addresses
  7726. on any of the locally connected networks. Next most preferred are
  7727. addresses
  7728. on the 192.168.1/24 network, and after that either the
  7729. 192.168.2/24
  7730. or
  7731. 192.168.3/24 network with no preference shown between these two
  7732. networks. Queries received from a host on the 192.168.1/24 network
  7733. will prefer other addresses on that network to the 192.168.2/24
  7734. and
  7735. 192.168.3/24 networks. Queries received from a host on the
  7736. 192.168.4/24
  7737. or the 192.168.5/24 network will only prefer other addresses on
  7738. their directly connected networks.
  7739. </para>
  7740. <programlisting>sortlist {
  7741. // IF the local host
  7742. // THEN first fit on the following nets
  7743. { localhost;
  7744. { localnets;
  7745. 192.168.1/24;
  7746. { 192.168.2/24; 192.168.3/24; }; }; };
  7747. // IF on class C 192.168.1 THEN use .1, or .2 or .3
  7748. { 192.168.1/24;
  7749. { 192.168.1/24;
  7750. { 192.168.2/24; 192.168.3/24; }; }; };
  7751. // IF on class C 192.168.2 THEN use .2, or .1 or .3
  7752. { 192.168.2/24;
  7753. { 192.168.2/24;
  7754. { 192.168.1/24; 192.168.3/24; }; }; };
  7755. // IF on class C 192.168.3 THEN use .3, or .1 or .2
  7756. { 192.168.3/24;
  7757. { 192.168.3/24;
  7758. { 192.168.1/24; 192.168.2/24; }; }; };
  7759. // IF .4 or .5 THEN prefer that net
  7760. { { 192.168.4/24; 192.168.5/24; };
  7761. };
  7762. };</programlisting>
  7763. <para>
  7764. The following example will give reasonable behavior for the
  7765. local host and hosts on directly connected networks. It is similar
  7766. to the behavior of the address sort in <acronym>BIND</acronym> 4.9.x. Responses sent
  7767. to queries from the local host will favor any of the directly
  7768. connected
  7769. networks. Responses sent to queries from any other hosts on a
  7770. directly
  7771. connected network will prefer addresses on that same network.
  7772. Responses
  7773. to other queries will not be sorted.
  7774. </para>
  7775. <programlisting>sortlist {
  7776. { localhost; localnets; };
  7777. { localnets; };
  7778. };
  7779. </programlisting>
  7780. </sect3>
  7781. <sect3 id="rrset_ordering">
  7782. <title id="rrset_ordering_title">RRset Ordering</title>
  7783. <para>
  7784. When multiple records are returned in an answer it may be
  7785. useful to configure the order of the records placed into the
  7786. response.
  7787. The <command>rrset-order</command> statement permits
  7788. configuration
  7789. of the ordering of the records in a multiple record response.
  7790. See also the <command>sortlist</command> statement,
  7791. <xref linkend="the_sortlist_statement"/>.
  7792. </para>
  7793. <para>
  7794. An <command>order_spec</command> is defined as
  7795. follows:
  7796. </para>
  7797. <para>
  7798. <optional>class <replaceable>class_name</replaceable></optional>
  7799. <optional>type <replaceable>type_name</replaceable></optional>
  7800. <optional>name <replaceable>"domain_name"</replaceable></optional>
  7801. order <replaceable>ordering</replaceable>
  7802. </para>
  7803. <para>
  7804. If no class is specified, the default is <command>ANY</command>.
  7805. If no type is specified, the default is <command>ANY</command>.
  7806. If no name is specified, the default is "<command>*</command>" (asterisk).
  7807. </para>
  7808. <para>
  7809. The legal values for <command>ordering</command> are:
  7810. </para>
  7811. <informaltable colsep="0" rowsep="0">
  7812. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  7813. <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
  7814. <colspec colname="2" colnum="2" colsep="0" colwidth="3.750in"/>
  7815. <tbody>
  7816. <row rowsep="0">
  7817. <entry colname="1">
  7818. <para><command>fixed</command></para>
  7819. </entry>
  7820. <entry colname="2">
  7821. <para>
  7822. Records are returned in the order they
  7823. are defined in the zone file.
  7824. </para>
  7825. </entry>
  7826. </row>
  7827. <row rowsep="0">
  7828. <entry colname="1">
  7829. <para><command>random</command></para>
  7830. </entry>
  7831. <entry colname="2">
  7832. <para>
  7833. Records are returned in some random order.
  7834. </para>
  7835. </entry>
  7836. </row>
  7837. <row rowsep="0">
  7838. <entry colname="1">
  7839. <para><command>cyclic</command></para>
  7840. </entry>
  7841. <entry colname="2">
  7842. <para>
  7843. Records are returned in a cyclic round-robin order.
  7844. </para>
  7845. <para>
  7846. If <acronym>BIND</acronym> is configured with the
  7847. "--enable-fixed-rrset" option at compile time, then
  7848. the initial ordering of the RRset will match the
  7849. one specified in the zone file.
  7850. </para>
  7851. </entry>
  7852. </row>
  7853. </tbody>
  7854. </tgroup>
  7855. </informaltable>
  7856. <para>
  7857. For example:
  7858. </para>
  7859. <programlisting>rrset-order {
  7860. class IN type A name "host.example.com" order random;
  7861. order cyclic;
  7862. };
  7863. </programlisting>
  7864. <para>
  7865. will cause any responses for type A records in class IN that
  7866. have "<literal>host.example.com</literal>" as a
  7867. suffix, to always be returned
  7868. in random order. All other records are returned in cyclic order.
  7869. </para>
  7870. <para>
  7871. If multiple <command>rrset-order</command> statements
  7872. appear,
  7873. they are not combined &mdash; the last one applies.
  7874. </para>
  7875. <note>
  7876. <simpara>
  7877. In this release of <acronym>BIND</acronym> 9, the
  7878. <command>rrset-order</command> statement does not support
  7879. "fixed" ordering by default. Fixed ordering can be enabled
  7880. at compile time by specifying "--enable-fixed-rrset" on
  7881. the "configure" command line.
  7882. </simpara>
  7883. </note>
  7884. </sect3>
  7885. <sect3 id="tuning">
  7886. <title>Tuning</title>
  7887. <variablelist>
  7888. <varlistentry>
  7889. <term><command>lame-ttl</command></term>
  7890. <listitem>
  7891. <para>
  7892. Sets the number of seconds to cache a
  7893. lame server indication. 0 disables caching. (This is
  7894. <emphasis role="bold">NOT</emphasis> recommended.)
  7895. The default is <literal>600</literal> (10 minutes) and the
  7896. maximum value is
  7897. <literal>1800</literal> (30 minutes).
  7898. </para>
  7899. <para>
  7900. Lame-ttl also controls the amount of time DNSSEC
  7901. validation failures are cached. There is a minimum
  7902. of 30 seconds applied to bad cache entries if the
  7903. lame-ttl is set to less than 30 seconds.
  7904. </para>
  7905. </listitem>
  7906. </varlistentry>
  7907. <varlistentry>
  7908. <term><command>max-ncache-ttl</command></term>
  7909. <listitem>
  7910. <para>
  7911. To reduce network traffic and increase performance,
  7912. the server stores negative answers. <command>max-ncache-ttl</command> is
  7913. used to set a maximum retention time for these answers in
  7914. the server
  7915. in seconds. The default
  7916. <command>max-ncache-ttl</command> is <literal>10800</literal> seconds (3 hours).
  7917. <command>max-ncache-ttl</command> cannot exceed
  7918. 7 days and will
  7919. be silently truncated to 7 days if set to a greater value.
  7920. </para>
  7921. </listitem>
  7922. </varlistentry>
  7923. <varlistentry>
  7924. <term><command>max-cache-ttl</command></term>
  7925. <listitem>
  7926. <para>
  7927. Sets the maximum time for which the server will
  7928. cache ordinary (positive) answers. The default is
  7929. one week (7 days).
  7930. A value of zero may cause all queries to return
  7931. SERVFAIL, because of lost caches of intermediate
  7932. RRsets (such as NS and glue AAAA/A records) in the
  7933. resolution process.
  7934. </para>
  7935. </listitem>
  7936. </varlistentry>
  7937. <varlistentry>
  7938. <term><command>min-roots</command></term>
  7939. <listitem>
  7940. <para>
  7941. The minimum number of root servers that
  7942. is required for a request for the root servers to be
  7943. accepted. The default
  7944. is <userinput>2</userinput>.
  7945. </para>
  7946. <note>
  7947. <simpara>
  7948. Not implemented in <acronym>BIND</acronym> 9.
  7949. </simpara>
  7950. </note>
  7951. </listitem>
  7952. </varlistentry>
  7953. <varlistentry>
  7954. <term><command>sig-validity-interval</command></term>
  7955. <listitem>
  7956. <para>
  7957. Specifies the number of days into the future when
  7958. DNSSEC signatures automatically generated as a
  7959. result of dynamic updates (<xref
  7960. linkend="dynamic_update"/>) will expire. There
  7961. is an optional second field which specifies how
  7962. long before expiry that the signatures will be
  7963. regenerated. If not specified, the signatures will
  7964. be regenerated at 1/4 of base interval. The second
  7965. field is specified in days if the base interval is
  7966. greater than 7 days otherwise it is specified in hours.
  7967. The default base interval is <literal>30</literal> days
  7968. giving a re-signing interval of 7 1/2 days. The maximum
  7969. values are 10 years (3660 days).
  7970. </para>
  7971. <para>
  7972. The signature inception time is unconditionally
  7973. set to one hour before the current time to allow
  7974. for a limited amount of clock skew.
  7975. </para>
  7976. <para>
  7977. The <command>sig-validity-interval</command>
  7978. should be, at least, several multiples of the SOA
  7979. expire interval to allow for reasonable interaction
  7980. between the various timer and expiry dates.
  7981. </para>
  7982. </listitem>
  7983. </varlistentry>
  7984. <varlistentry>
  7985. <term><command>sig-signing-nodes</command></term>
  7986. <listitem>
  7987. <para>
  7988. Specify the maximum number of nodes to be
  7989. examined in each quantum when signing a zone with
  7990. a new DNSKEY. The default is
  7991. <literal>100</literal>.
  7992. </para>
  7993. </listitem>
  7994. </varlistentry>
  7995. <varlistentry>
  7996. <term><command>sig-signing-signatures</command></term>
  7997. <listitem>
  7998. <para>
  7999. Specify a threshold number of signatures that
  8000. will terminate processing a quantum when signing
  8001. a zone with a new DNSKEY. The default is
  8002. <literal>10</literal>.
  8003. </para>
  8004. </listitem>
  8005. </varlistentry>
  8006. <varlistentry>
  8007. <term><command>sig-signing-type</command></term>
  8008. <listitem>
  8009. <para>
  8010. Specify a private RDATA type to be used when generating
  8011. key signing records. The default is
  8012. <literal>65534</literal>.
  8013. </para>
  8014. <para>
  8015. It is expected that this parameter may be removed
  8016. in a future version once there is a standard type.
  8017. </para>
  8018. </listitem>
  8019. </varlistentry>
  8020. <varlistentry>
  8021. <term><command>min-refresh-time</command></term>
  8022. <term><command>max-refresh-time</command></term>
  8023. <term><command>min-retry-time</command></term>
  8024. <term><command>max-retry-time</command></term>
  8025. <listitem>
  8026. <para>
  8027. These options control the server's behavior on refreshing a
  8028. zone
  8029. (querying for SOA changes) or retrying failed transfers.
  8030. Usually the SOA values for the zone are used, but these
  8031. values
  8032. are set by the master, giving slave server administrators
  8033. little
  8034. control over their contents.
  8035. </para>
  8036. <para>
  8037. These options allow the administrator to set a minimum and
  8038. maximum
  8039. refresh and retry time either per-zone, per-view, or
  8040. globally.
  8041. These options are valid for slave and stub zones,
  8042. and clamp the SOA refresh and retry times to the specified
  8043. values.
  8044. </para>
  8045. <para>
  8046. The following defaults apply.
  8047. <command>min-refresh-time</command> 300 seconds,
  8048. <command>max-refresh-time</command> 2419200 seconds
  8049. (4 weeks), <command>min-retry-time</command> 500 seconds,
  8050. and <command>max-retry-time</command> 1209600 seconds
  8051. (2 weeks).
  8052. </para>
  8053. </listitem>
  8054. </varlistentry>
  8055. <varlistentry>
  8056. <term><command>edns-udp-size</command></term>
  8057. <listitem>
  8058. <para>
  8059. Sets the advertised EDNS UDP buffer size in bytes
  8060. to control the size of packets received.
  8061. Valid values are 512 to 4096 (values outside this range
  8062. will be silently adjusted). The default value
  8063. is 4096. The usual reason for setting
  8064. <command>edns-udp-size</command> to a non-default
  8065. value is to get UDP answers to pass through broken
  8066. firewalls that block fragmented packets and/or
  8067. block UDP packets that are greater than 512 bytes.
  8068. </para>
  8069. <para>
  8070. <command>named</command> will fallback to using 512 bytes
  8071. if it get a series of timeout at the initial value. 512
  8072. bytes is not being offered to encourage sites to fix their
  8073. firewalls. Small EDNS UDP sizes will result in the
  8074. excessive use of TCP.
  8075. </para>
  8076. </listitem>
  8077. </varlistentry>
  8078. <varlistentry>
  8079. <term><command>max-udp-size</command></term>
  8080. <listitem>
  8081. <para>
  8082. Sets the maximum EDNS UDP message size
  8083. <command>named</command> will send in bytes.
  8084. Valid values are 512 to 4096 (values outside this
  8085. range will be silently adjusted). The default
  8086. value is 4096. The usual reason for setting
  8087. <command>max-udp-size</command> to a non-default
  8088. value is to get UDP answers to pass through broken
  8089. firewalls that block fragmented packets and/or
  8090. block UDP packets that are greater than 512 bytes.
  8091. This is independent of the advertised receive
  8092. buffer (<command>edns-udp-size</command>).
  8093. </para>
  8094. <para>
  8095. Setting this to a low value will encourage additional
  8096. TCP traffic to the nameserver.
  8097. </para>
  8098. </listitem>
  8099. </varlistentry>
  8100. <varlistentry>
  8101. <term><command>masterfile-format</command></term>
  8102. <listitem>
  8103. <para>Specifies
  8104. the file format of zone files (see
  8105. <xref linkend="zonefile_format"/>).
  8106. The default value is <constant>text</constant>, which is the
  8107. standard textual representation. Files in other formats
  8108. than <constant>text</constant> are typically expected
  8109. to be generated by the <command>named-compilezone</command> tool.
  8110. Note that when a zone file in a different format than
  8111. <constant>text</constant> is loaded, <command>named</command>
  8112. may omit some of the checks which would be performed for a
  8113. file in the <constant>text</constant> format. In particular,
  8114. <command>check-names</command> checks do not apply
  8115. for the <constant>raw</constant> format. This means
  8116. a zone file in the <constant>raw</constant> format
  8117. must be generated with the same check level as that
  8118. specified in the <command>named</command> configuration
  8119. file. This statement sets the
  8120. <command>masterfile-format</command> for all zones,
  8121. but can be overridden on a per-zone or per-view basis
  8122. by including a <command>masterfile-format</command>
  8123. statement within the <command>zone</command> or
  8124. <command>view</command> block in the configuration
  8125. file.
  8126. </para>
  8127. </listitem>
  8128. </varlistentry>
  8129. <varlistentry id="clients-per-query">
  8130. <term><command>clients-per-query</command></term>
  8131. <term><command>max-clients-per-query</command></term>
  8132. <listitem>
  8133. <para>These set the
  8134. initial value (minimum) and maximum number of recursive
  8135. simultaneous clients for any given query
  8136. (&lt;qname,qtype,qclass&gt;) that the server will accept
  8137. before dropping additional clients. <command>named</command> will attempt to
  8138. self tune this value and changes will be logged. The
  8139. default values are 10 and 100.
  8140. </para>
  8141. <para>
  8142. This value should reflect how many queries come in for
  8143. a given name in the time it takes to resolve that name.
  8144. If the number of queries exceed this value, <command>named</command> will
  8145. assume that it is dealing with a non-responsive zone
  8146. and will drop additional queries. If it gets a response
  8147. after dropping queries, it will raise the estimate. The
  8148. estimate will then be lowered in 20 minutes if it has
  8149. remained unchanged.
  8150. </para>
  8151. <para>
  8152. If <command>clients-per-query</command> is set to zero,
  8153. then there is no limit on the number of clients per query
  8154. and no queries will be dropped.
  8155. </para>
  8156. <para>
  8157. If <command>max-clients-per-query</command> is set to zero,
  8158. then there is no upper bound other than imposed by
  8159. <command>recursive-clients</command>.
  8160. </para>
  8161. </listitem>
  8162. </varlistentry>
  8163. <varlistentry>
  8164. <term><command>notify-delay</command></term>
  8165. <listitem>
  8166. <para>
  8167. The delay, in seconds, between sending sets of notify
  8168. messages for a zone. The default is five (5) seconds.
  8169. </para>
  8170. <para>
  8171. The overall rate that NOTIFY messages are sent for all
  8172. zones is controlled by <command>serial-query-rate</command>.
  8173. </para>
  8174. </listitem>
  8175. </varlistentry>
  8176. </variablelist>
  8177. </sect3>
  8178. <sect3 id="builtin">
  8179. <title>Built-in server information zones</title>
  8180. <para>
  8181. The server provides some helpful diagnostic information
  8182. through a number of built-in zones under the
  8183. pseudo-top-level-domain <literal>bind</literal> in the
  8184. <command>CHAOS</command> class. These zones are part
  8185. of a
  8186. built-in view (see <xref linkend="view_statement_grammar"/>) of
  8187. class
  8188. <command>CHAOS</command> which is separate from the
  8189. default view of
  8190. class <command>IN</command>; therefore, any global
  8191. server options
  8192. such as <command>allow-query</command> do not apply
  8193. the these zones.
  8194. If you feel the need to disable these zones, use the options
  8195. below, or hide the built-in <command>CHAOS</command>
  8196. view by
  8197. defining an explicit view of class <command>CHAOS</command>
  8198. that matches all clients.
  8199. </para>
  8200. <variablelist>
  8201. <varlistentry>
  8202. <term><command>version</command></term>
  8203. <listitem>
  8204. <para>
  8205. The version the server should report
  8206. via a query of the name <literal>version.bind</literal>
  8207. with type <command>TXT</command>, class <command>CHAOS</command>.
  8208. The default is the real version number of this server.
  8209. Specifying <command>version none</command>
  8210. disables processing of the queries.
  8211. </para>
  8212. </listitem>
  8213. </varlistentry>
  8214. <varlistentry>
  8215. <term><command>hostname</command></term>
  8216. <listitem>
  8217. <para>
  8218. The hostname the server should report via a query of
  8219. the name <filename>hostname.bind</filename>
  8220. with type <command>TXT</command>, class <command>CHAOS</command>.
  8221. This defaults to the hostname of the machine hosting the
  8222. name server as
  8223. found by the gethostname() function. The primary purpose of such queries
  8224. is to
  8225. identify which of a group of anycast servers is actually
  8226. answering your queries. Specifying <command>hostname none;</command>
  8227. disables processing of the queries.
  8228. </para>
  8229. </listitem>
  8230. </varlistentry>
  8231. <varlistentry>
  8232. <term><command>server-id</command></term>
  8233. <listitem>
  8234. <para>
  8235. The ID the server should report when receiving a Name
  8236. Server Identifier (NSID) query, or a query of the name
  8237. <filename>ID.SERVER</filename> with type
  8238. <command>TXT</command>, class <command>CHAOS</command>.
  8239. The primary purpose of such queries is to
  8240. identify which of a group of anycast servers is actually
  8241. answering your queries. Specifying <command>server-id none;</command>
  8242. disables processing of the queries.
  8243. Specifying <command>server-id hostname;</command> will cause <command>named</command> to
  8244. use the hostname as found by the gethostname() function.
  8245. The default <command>server-id</command> is <command>none</command>.
  8246. </para>
  8247. </listitem>
  8248. </varlistentry>
  8249. </variablelist>
  8250. </sect3>
  8251. <sect3 id="empty">
  8252. <title>Built-in Empty Zones</title>
  8253. <para>
  8254. Named has some built-in empty zones (SOA and NS records only).
  8255. These are for zones that should normally be answered locally
  8256. and which queries should not be sent to the Internet's root
  8257. servers. The official servers which cover these namespaces
  8258. return NXDOMAIN responses to these queries. In particular,
  8259. these cover the reverse namespaces for addresses from
  8260. RFC 1918, RFC 4193, and RFC 5737. They also include the
  8261. reverse namespace for IPv6 local address (locally assigned),
  8262. IPv6 link local addresses, the IPv6 loopback address and the
  8263. IPv6 unknown address.
  8264. </para>
  8265. <para>
  8266. Named will attempt to determine if a built-in zone already exists
  8267. or is active (covered by a forward-only forwarding declaration)
  8268. and will not create an empty zone in that case.
  8269. </para>
  8270. <para>
  8271. The current list of empty zones is:
  8272. <itemizedlist>
  8273. <listitem>10.IN-ADDR.ARPA</listitem>
  8274. <listitem>16.172.IN-ADDR.ARPA</listitem>
  8275. <listitem>17.172.IN-ADDR.ARPA</listitem>
  8276. <listitem>18.172.IN-ADDR.ARPA</listitem>
  8277. <listitem>19.172.IN-ADDR.ARPA</listitem>
  8278. <listitem>20.172.IN-ADDR.ARPA</listitem>
  8279. <listitem>21.172.IN-ADDR.ARPA</listitem>
  8280. <listitem>22.172.IN-ADDR.ARPA</listitem>
  8281. <listitem>23.172.IN-ADDR.ARPA</listitem>
  8282. <listitem>24.172.IN-ADDR.ARPA</listitem>
  8283. <listitem>25.172.IN-ADDR.ARPA</listitem>
  8284. <listitem>26.172.IN-ADDR.ARPA</listitem>
  8285. <listitem>27.172.IN-ADDR.ARPA</listitem>
  8286. <listitem>28.172.IN-ADDR.ARPA</listitem>
  8287. <listitem>29.172.IN-ADDR.ARPA</listitem>
  8288. <listitem>30.172.IN-ADDR.ARPA</listitem>
  8289. <listitem>31.172.IN-ADDR.ARPA</listitem>
  8290. <listitem>168.192.IN-ADDR.ARPA</listitem>
  8291. <listitem>0.IN-ADDR.ARPA</listitem>
  8292. <listitem>127.IN-ADDR.ARPA</listitem>
  8293. <listitem>254.169.IN-ADDR.ARPA</listitem>
  8294. <listitem>2.0.192.IN-ADDR.ARPA</listitem>
  8295. <listitem>100.51.198.IN-ADDR.ARPA</listitem>
  8296. <listitem>113.0.203.IN-ADDR.ARPA</listitem>
  8297. <listitem>255.255.255.255.IN-ADDR.ARPA</listitem>
  8298. <listitem>0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA</listitem>
  8299. <listitem>1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA</listitem>
  8300. <listitem>8.B.D.0.1.0.0.2.IP6.ARPA</listitem>
  8301. <listitem>D.F.IP6.ARPA</listitem>
  8302. <listitem>8.E.F.IP6.ARPA</listitem>
  8303. <listitem>9.E.F.IP6.ARPA</listitem>
  8304. <listitem>A.E.F.IP6.ARPA</listitem>
  8305. <listitem>B.E.F.IP6.ARPA</listitem>
  8306. </itemizedlist>
  8307. </para>
  8308. <para>
  8309. Empty zones are settable at the view level and only apply to
  8310. views of class IN. Disabled empty zones are only inherited
  8311. from options if there are no disabled empty zones specified
  8312. at the view level. To override the options list of disabled
  8313. zones, you can disable the root zone at the view level, for example:
  8314. <programlisting>
  8315. disable-empty-zone ".";
  8316. </programlisting>
  8317. </para>
  8318. <para>
  8319. If you are using the address ranges covered here, you should
  8320. already have reverse zones covering the addresses you use.
  8321. In practice this appears to not be the case with many queries
  8322. being made to the infrastructure servers for names in these
  8323. spaces. So many in fact that sacrificial servers were needed
  8324. to be deployed to channel the query load away from the
  8325. infrastructure servers.
  8326. </para>
  8327. <note>
  8328. The real parent servers for these zones should disable all
  8329. empty zone under the parent zone they serve. For the real
  8330. root servers, this is all built-in empty zones. This will
  8331. enable them to return referrals to deeper in the tree.
  8332. </note>
  8333. <variablelist>
  8334. <varlistentry>
  8335. <term><command>empty-server</command></term>
  8336. <listitem>
  8337. <para>
  8338. Specify what server name will appear in the returned
  8339. SOA record for empty zones. If none is specified, then
  8340. the zone's name will be used.
  8341. </para>
  8342. </listitem>
  8343. </varlistentry>
  8344. <varlistentry>
  8345. <term><command>empty-contact</command></term>
  8346. <listitem>
  8347. <para>
  8348. Specify what contact name will appear in the returned
  8349. SOA record for empty zones. If none is specified, then
  8350. "." will be used.
  8351. </para>
  8352. </listitem>
  8353. </varlistentry>
  8354. <varlistentry>
  8355. <term><command>empty-zones-enable</command></term>
  8356. <listitem>
  8357. <para>
  8358. Enable or disable all empty zones. By default, they
  8359. are enabled.
  8360. </para>
  8361. </listitem>
  8362. </varlistentry>
  8363. <varlistentry>
  8364. <term><command>disable-empty-zone</command></term>
  8365. <listitem>
  8366. <para>
  8367. Disable individual empty zones. By default, none are
  8368. disabled. This option can be specified multiple times.
  8369. </para>
  8370. </listitem>
  8371. </varlistentry>
  8372. </variablelist>
  8373. </sect3>
  8374. <sect3 id="acache">
  8375. <title>Additional Section Caching</title>
  8376. <para>
  8377. The additional section cache, also called <command>acache</command>,
  8378. is an internal cache to improve the response performance of BIND 9.
  8379. When additional section caching is enabled, BIND 9 will
  8380. cache an internal short-cut to the additional section content for
  8381. each answer RR.
  8382. Note that <command>acache</command> is an internal caching
  8383. mechanism of BIND 9, and is not related to the DNS caching
  8384. server function.
  8385. </para>
  8386. <para>
  8387. Additional section caching does not change the
  8388. response content (except the RRsets ordering of the additional
  8389. section, see below), but can improve the response performance
  8390. significantly.
  8391. It is particularly effective when BIND 9 acts as an authoritative
  8392. server for a zone that has many delegations with many glue RRs.
  8393. </para>
  8394. <para>
  8395. In order to obtain the maximum performance improvement
  8396. from additional section caching, setting
  8397. <command>additional-from-cache</command>
  8398. to <command>no</command> is recommended, since the current
  8399. implementation of <command>acache</command>
  8400. does not short-cut of additional section information from the
  8401. DNS cache data.
  8402. </para>
  8403. <para>
  8404. One obvious disadvantage of <command>acache</command> is
  8405. that it requires much more
  8406. memory for the internal cached data.
  8407. Thus, if the response performance does not matter and memory
  8408. consumption is much more critical, the
  8409. <command>acache</command> mechanism can be
  8410. disabled by setting <command>acache-enable</command> to
  8411. <command>no</command>.
  8412. It is also possible to specify the upper limit of memory
  8413. consumption
  8414. for acache by using <command>max-acache-size</command>.
  8415. </para>
  8416. <para>
  8417. Additional section caching also has a minor effect on the
  8418. RRset ordering in the additional section.
  8419. Without <command>acache</command>,
  8420. <command>cyclic</command> order is effective for the additional
  8421. section as well as the answer and authority sections.
  8422. However, additional section caching fixes the ordering when it
  8423. first caches an RRset for the additional section, and the same
  8424. ordering will be kept in succeeding responses, regardless of the
  8425. setting of <command>rrset-order</command>.
  8426. The effect of this should be minor, however, since an
  8427. RRset in the additional section
  8428. typically only contains a small number of RRs (and in many cases
  8429. it only contains a single RR), in which case the
  8430. ordering does not matter much.
  8431. </para>
  8432. <para>
  8433. The following is a summary of options related to
  8434. <command>acache</command>.
  8435. </para>
  8436. <variablelist>
  8437. <varlistentry>
  8438. <term><command>acache-enable</command></term>
  8439. <listitem>
  8440. <para>
  8441. If <command>yes</command>, additional section caching is
  8442. enabled. The default value is <command>no</command>.
  8443. </para>
  8444. </listitem>
  8445. </varlistentry>
  8446. <varlistentry>
  8447. <term><command>acache-cleaning-interval</command></term>
  8448. <listitem>
  8449. <para>
  8450. The server will remove stale cache entries, based on an LRU
  8451. based
  8452. algorithm, every <command>acache-cleaning-interval</command> minutes.
  8453. The default is 60 minutes.
  8454. If set to 0, no periodic cleaning will occur.
  8455. </para>
  8456. </listitem>
  8457. </varlistentry>
  8458. <varlistentry>
  8459. <term><command>max-acache-size</command></term>
  8460. <listitem>
  8461. <para>
  8462. The maximum amount of memory in bytes to use for the server's acache.
  8463. When the amount of data in the acache reaches this limit,
  8464. the server
  8465. will clean more aggressively so that the limit is not
  8466. exceeded.
  8467. In a server with multiple views, the limit applies
  8468. separately to the
  8469. acache of each view.
  8470. The default is <literal>16M</literal>.
  8471. </para>
  8472. </listitem>
  8473. </varlistentry>
  8474. </variablelist>
  8475. </sect3>
  8476. <sect3>
  8477. <title>Content Filtering</title>
  8478. <para>
  8479. <acronym>BIND</acronym> 9 provides the ability to filter
  8480. out DNS responses from external DNS servers containing
  8481. certain types of data in the answer section.
  8482. Specifically, it can reject address (A or AAAA) records if
  8483. the corresponding IPv4 or IPv6 addresses match the given
  8484. <varname>address_match_list</varname> of the
  8485. <command>deny-answer-addresses</command> option.
  8486. It can also reject CNAME or DNAME records if the "alias"
  8487. name (i.e., the CNAME alias or the substituted query name
  8488. due to DNAME) matches the
  8489. given <varname>namelist</varname> of the
  8490. <command>deny-answer-aliases</command> option, where
  8491. "match" means the alias name is a subdomain of one of
  8492. the <varname>name_list</varname> elements.
  8493. If the optional <varname>namelist</varname> is specified
  8494. with <command>except-from</command>, records whose query name
  8495. matches the list will be accepted regardless of the filter
  8496. setting.
  8497. Likewise, if the alias name is a subdomain of the
  8498. corresponding zone, the <command>deny-answer-aliases</command>
  8499. filter will not apply;
  8500. for example, even if "example.com" is specified for
  8501. <command>deny-answer-aliases</command>,
  8502. </para>
  8503. <programlisting>www.example.com. CNAME xxx.example.com.</programlisting>
  8504. <para>
  8505. returned by an "example.com" server will be accepted.
  8506. </para>
  8507. <para>
  8508. In the <varname>address_match_list</varname> of the
  8509. <command>deny-answer-addresses</command> option, only
  8510. <varname>ip_addr</varname>
  8511. and <varname>ip_prefix</varname>
  8512. are meaningful;
  8513. any <varname>key_id</varname> will be silently ignored.
  8514. </para>
  8515. <para>
  8516. If a response message is rejected due to the filtering,
  8517. the entire message is discarded without being cached, and
  8518. a SERVFAIL error will be returned to the client.
  8519. </para>
  8520. <para>
  8521. This filtering is intended to prevent "DNS rebinding attacks," in
  8522. which an attacker, in response to a query for a domain name the
  8523. attacker controls, returns an IP address within your own network or
  8524. an alias name within your own domain.
  8525. A naive web browser or script could then serve as an
  8526. unintended proxy, allowing the attacker
  8527. to get access to an internal node of your local network
  8528. that couldn't be externally accessed otherwise.
  8529. See the paper available at
  8530. <ulink>
  8531. http://portal.acm.org/citation.cfm?id=1315245.1315298
  8532. </ulink>
  8533. for more details about the attacks.
  8534. </para>
  8535. <para>
  8536. For example, if you own a domain named "example.net" and
  8537. your internal network uses an IPv4 prefix 192.0.2.0/24,
  8538. you might specify the following rules:
  8539. </para>
  8540. <programlisting>deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
  8541. deny-answer-aliases { "example.net"; };
  8542. </programlisting>
  8543. <para>
  8544. If an external attacker lets a web browser in your local
  8545. network look up an IPv4 address of "attacker.example.com",
  8546. the attacker's DNS server would return a response like this:
  8547. </para>
  8548. <programlisting>attacker.example.com. A 192.0.2.1</programlisting>
  8549. <para>
  8550. in the answer section.
  8551. Since the rdata of this record (the IPv4 address) matches
  8552. the specified prefix 192.0.2.0/24, this response will be
  8553. ignored.
  8554. </para>
  8555. <para>
  8556. On the other hand, if the browser looks up a legitimate
  8557. internal web server "www.example.net" and the
  8558. following response is returned to
  8559. the <acronym>BIND</acronym> 9 server
  8560. </para>
  8561. <programlisting>www.example.net. A 192.0.2.2</programlisting>
  8562. <para>
  8563. it will be accepted since the owner name "www.example.net"
  8564. matches the <command>except-from</command> element,
  8565. "example.net".
  8566. </para>
  8567. <para>
  8568. Note that this is not really an attack on the DNS per se.
  8569. In fact, there is nothing wrong for an "external" name to
  8570. be mapped to your "internal" IP address or domain name
  8571. from the DNS point of view.
  8572. It might actually be provided for a legitimate purpose,
  8573. such as for debugging.
  8574. As long as the mapping is provided by the correct owner,
  8575. it is not possible or does not make sense to detect
  8576. whether the intent of the mapping is legitimate or not
  8577. within the DNS.
  8578. The "rebinding" attack must primarily be protected at the
  8579. application that uses the DNS.
  8580. For a large site, however, it may be difficult to protect
  8581. all possible applications at once.
  8582. This filtering feature is provided only to help such an
  8583. operational environment;
  8584. it is generally discouraged to turn it on unless you are
  8585. very sure you have no other choice and the attack is a
  8586. real threat for your applications.
  8587. </para>
  8588. <para>
  8589. Care should be particularly taken if you want to use this
  8590. option for addresses within 127.0.0.0/8.
  8591. These addresses are obviously "internal", but many
  8592. applications conventionally rely on a DNS mapping from
  8593. some name to such an address.
  8594. Filtering out DNS records containing this address
  8595. spuriously can break such applications.
  8596. </para>
  8597. </sect3>
  8598. <sect3>
  8599. <title>Response Policy Zone (RPZ) Rewriting</title>
  8600. <para>
  8601. <acronym>BIND</acronym> 9 includes an intentionally limited
  8602. mechanism to modify DNS responses for recursive requests
  8603. somewhat similar to email anti-spam DNS blacklists.
  8604. Responses can be changed to deny the existence of domains(NXDOMAIN),
  8605. deny the existence of IP addresses for domains (NODATA),
  8606. or contain other IP addresses or data.
  8607. </para>
  8608. <para>
  8609. The actions encoded in a response policy zone (RPZ) are applied
  8610. only to queries that ask for recursion (RD=1).
  8611. Response policy zones are named in the
  8612. <command>response-policy</command> option for the view or among the
  8613. global options if there is no response-policy option for the view.
  8614. RPZs are ordinary DNS zones containing RRsets
  8615. that can be queried normally if allowed.
  8616. It is usually best to restrict those queries with something like
  8617. <command>allow-query { localhost; };</command>.
  8618. </para>
  8619. <para>
  8620. There are four kinds of RPZ records, QNAME, IP, NSIP,
  8621. and NSDNAME.
  8622. QNAME records are applied to query names of requests and targets
  8623. of CNAME records resolved to generate the response.
  8624. The owner name of a QNAME RPZ record is the query name relativized
  8625. to the RPZ.
  8626. </para>
  8627. <para>
  8628. The second kind of RPZ record, an IP policy record,
  8629. is triggered by addresses in A and AAAA records
  8630. for the ANSWER sections of responses.
  8631. IP policy records have owner names that are
  8632. subdomains of <userinput>rpz-ip</userinput> relativized to the
  8633. RPZ origin name and encode an IP address or address block.
  8634. IPv4 addresses are encoded as
  8635. <userinput>prefixlength.B4.B3.B2.B1.rpz-ip</userinput>.
  8636. The prefix length must be between 1 and 32.
  8637. All four bytes, B4, B3, B2, and B1, must be present.
  8638. B4 is the decimal value of the least significant byte of the
  8639. IPv4 address as in IN-ADDR.ARPA.
  8640. IPv6 addresses are encoded in a format similar to the standard
  8641. IPv6 text representation,
  8642. <userinput>prefixlength.W8.W7.W6.W5.W4.W3.W2.W1.rpz-ip</userinput>.
  8643. Each of W8,...,W1 is a one to four digit hexadecimal number
  8644. representing 16 bits of the IPv6 address as in the standard text
  8645. representation of IPv6 addresses, but reversed as in IN-ADDR.ARPA.
  8646. All 8 words must be present except when consecutive
  8647. zero words are replaced with <userinput>.zz.</userinput>
  8648. analogous to double colons (::) in standard IPv6 text encodings.
  8649. The prefix length must be between 1 and 128.
  8650. </para>
  8651. <para>
  8652. NSDNAME policy records match names of authoritative servers
  8653. for the query name, a parent of the query name, a CNAME,
  8654. or a parent of a CNAME.
  8655. They are encoded as subdomains of
  8656. <userinput>rpz-nsdomain</userinput> relativized
  8657. to the RPZ origin name.
  8658. </para>
  8659. <para>
  8660. NSIP policy records match IP addresses in A and AAAA RRsets
  8661. for domains that can be checked against NSDNAME policy records.
  8662. The are encoded like IP policies except as subdomains of
  8663. <userinput>rpz-nsip</userinput>.
  8664. </para>
  8665. <para>
  8666. The query response is checked against all RPZs, so
  8667. two or more policy records can apply to a single response.
  8668. Because DNS responses can be rewritten according by at most a
  8669. single policy record, a single policy (other than
  8670. <command>DISABLED</command> policies) must be chosen.
  8671. Policies are chosen in the following order:
  8672. <itemizedlist>
  8673. <listitem>Among applicable zones, use the RPZ that appears first
  8674. in the response-policy option.
  8675. </listitem>
  8676. <listitem>Prefer QNAME to IP to NSDNAME to NSIP policy records
  8677. in a single RPZ
  8678. </listitem>
  8679. <listitem>Among applicable NSDNAME policy records, prefer the
  8680. policy record that matches the lexically smallest name
  8681. </listitem>
  8682. <listitem>Among IP or NSIP policy records, prefer the record
  8683. with the longest prefix.
  8684. </listitem>
  8685. <listitem>Among records with the same prefex length,
  8686. prefer the IP or NSIP policy record that matches
  8687. the smallest IP address.
  8688. </listitem>
  8689. </itemizedlist>
  8690. </para>
  8691. <para>
  8692. When the processing of a response is restarted to resolve
  8693. DNAME or CNAME records and an applicable policy record set has
  8694. not been found,
  8695. all RPZs are again consulted for the DNAME or CNAME names
  8696. and addresses.
  8697. </para>
  8698. <para>
  8699. Authority verification issues and variations in authority data
  8700. can cause inconsistent results for NSIP and NSDNAME policy records.
  8701. Glue NS records often differ from authoritative NS records.
  8702. So they are available
  8703. only when <acronym>BIND</acronym> is built with the
  8704. <userinput>--enable-rpz-nsip</userinput> or
  8705. <userinput>--enable-rpz-nsdname</userinput> options
  8706. on the "configure" command line.
  8707. </para>
  8708. <para>
  8709. RPZ record sets are special CNAME records or one or more
  8710. of any types of DNS record except DNAME or DNSSEC.
  8711. Except when a policy record is a CNAME, there can be more
  8712. more than one record and more than one type
  8713. in a set of policy records.
  8714. Except for three kinds of CNAME records that are illegal except
  8715. in policy zones, the records in a set are used in the response as if
  8716. their owner name were the query name. They are copied to the
  8717. response as dictated by their types.
  8718. <itemizedlist>
  8719. <listitem>A CNAME whose target is the root domain (.)
  8720. specifies the <command>NXDOMAIN</command> policy,
  8721. which generates an NXDOMAIN response.
  8722. </listitem>
  8723. <listitem>A CNAME whose target is the wildcard top-level
  8724. domain (*.) specifies the <command>NODATA</command> policy,
  8725. which rewrites the response to NODATA or ANCOUNT=1.
  8726. </listitem>
  8727. <listitem>A CNAME whose target is a wildcard hostname such
  8728. as *.example.com is used normally after the astrisk (*)
  8729. has been replaced with the query name.
  8730. These records are usually resolved with ordinary CNAMEs
  8731. outside the policy zones. They can be useful for logging.
  8732. </listitem>
  8733. <listitem>The <command>PASSTHRU</command> policy is specified
  8734. by a CNAME whose target is the variable part of its own
  8735. owner name. It causes the response to not be rewritten
  8736. and is most often used to "poke holes" in policies for
  8737. CIDR blocks.
  8738. </listitem>
  8739. </itemizedlist>
  8740. </para>
  8741. <para>
  8742. The policies specified in individual records
  8743. in an RPZ can be overridden with a <command>policy</command> clause
  8744. in the <command>response-policy</command> option.
  8745. An organization using an RPZ provided by another organization might
  8746. use this mechanism to redirect domains to its own walled garden.
  8747. <itemizedlist>
  8748. <listitem><command>GIVEN</command> says "do not override."
  8749. </listitem>
  8750. <listitem><command>DISABLED</command> causes policy records to do
  8751. nothing but log what they might have done.
  8752. The response to the DNS query will be written according to
  8753. any matching policy records that are not disabled.
  8754. Policy zones overridden with <command>DISABLED</command> should
  8755. appear first, because they will often not be logged
  8756. if a higher precedence policy is found first.
  8757. </listitem>
  8758. <listitem><command>PASSTHRU</command> causes all policy records
  8759. to act as if they were CNAME records with targets the variable
  8760. part of their owner name. They protect the response from
  8761. being changed.
  8762. </listitem>
  8763. <listitem><command>NXDOMAIN</command> causes all RPZ records
  8764. to specify NXDOMAIN policies.
  8765. </listitem>
  8766. <listitem><command>NODATA</command> overrides with the
  8767. NODATA policy
  8768. </listitem>
  8769. <listitem><command>CNAME domain</command> causes all RPZ
  8770. policy records to act as if they were "cname domain" records.
  8771. </listitem>
  8772. </itemizedlist>
  8773. </para>
  8774. <para>
  8775. For example, you might use this option statement
  8776. </para>
  8777. <programlisting> response-policy { zone "badlist"; };</programlisting>
  8778. <para>
  8779. and this zone statement
  8780. </para>
  8781. <programlisting> zone "badlist" {type master; file "master/badlist"; allow-query {none;}; };</programlisting>
  8782. <para>
  8783. with this zone file
  8784. </para>
  8785. <programlisting>$TTL 1H
  8786. @ SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
  8787. NS LOCALHOST.
  8788. ; QNAME policy records. There are no periods (.) after the owner names.
  8789. nxdomain.domain.com CNAME . ; NXDOMAIN policy
  8790. nodata.domain.com CNAME *. ; NODATA policy
  8791. bad.domain.com A 10.0.0.1 ; redirect to a walled garden
  8792. AAAA 2001:2::1
  8793. ; do not rewrite (PASSTHRU) OK.DOMAIN.COM
  8794. ok.domain.com CNAME ok.domain.com.
  8795. bzone.domain.com CNAME garden.example.com.
  8796. ; redirect x.bzone.domain.com to x.bzone.domain.com.garden.example.com
  8797. *.bzone.domain.com CNAME *.garden.example.com.
  8798. ; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
  8799. 8.0.0.0.127.rpz-ip CNAME .
  8800. 32.1.0.0.127.rpz-ip CNAME 32.1.0.0.127. ; PASSTHRU for 127.0.0.1
  8801. ; NSDNAME and NSIP policy records
  8802. ns.domain.com.rpz-nsdname CNAME .
  8803. 48.zz.2.2001.rpz-nsip CNAME .
  8804. </programlisting>
  8805. </sect3>
  8806. </sect2>
  8807. <sect2 id="server_statement_grammar">
  8808. <title><command>server</command> Statement Grammar</title>
  8809. <programlisting><command>server</command> <replaceable>ip_addr[/prefixlen]</replaceable> {
  8810. <optional> bogus <replaceable>yes_or_no</replaceable> ; </optional>
  8811. <optional> provide-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
  8812. <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
  8813. <optional> edns <replaceable>yes_or_no</replaceable> ; </optional>
  8814. <optional> edns-udp-size <replaceable>number</replaceable> ; </optional>
  8815. <optional> max-udp-size <replaceable>number</replaceable> ; </optional>
  8816. <optional> transfers <replaceable>number</replaceable> ; </optional>
  8817. <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable> ; ]</optional>
  8818. <optional> keys <replaceable>{ string ; <optional> string ; <optional>...</optional></optional> }</replaceable> ; </optional>
  8819. <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  8820. <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  8821. <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  8822. <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  8823. <optional> query-source <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
  8824. <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
  8825. <optional> query-source-v6 <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
  8826. <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
  8827. <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
  8828. <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
  8829. <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
  8830. };
  8831. </programlisting>
  8832. </sect2>
  8833. <sect2 id="server_statement_definition_and_usage">
  8834. <title><command>server</command> Statement Definition and
  8835. Usage</title>
  8836. <para>
  8837. The <command>server</command> statement defines
  8838. characteristics
  8839. to be associated with a remote name server. If a prefix length is
  8840. specified, then a range of servers is covered. Only the most
  8841. specific
  8842. server clause applies regardless of the order in
  8843. <filename>named.conf</filename>.
  8844. </para>
  8845. <para>
  8846. The <command>server</command> statement can occur at
  8847. the top level of the
  8848. configuration file or inside a <command>view</command>
  8849. statement.
  8850. If a <command>view</command> statement contains
  8851. one or more <command>server</command> statements, only
  8852. those
  8853. apply to the view and any top-level ones are ignored.
  8854. If a view contains no <command>server</command>
  8855. statements,
  8856. any top-level <command>server</command> statements are
  8857. used as
  8858. defaults.
  8859. </para>
  8860. <para>
  8861. If you discover that a remote server is giving out bad data,
  8862. marking it as bogus will prevent further queries to it. The
  8863. default
  8864. value of <command>bogus</command> is <command>no</command>.
  8865. </para>
  8866. <para>
  8867. The <command>provide-ixfr</command> clause determines
  8868. whether
  8869. the local server, acting as master, will respond with an
  8870. incremental
  8871. zone transfer when the given remote server, a slave, requests it.
  8872. If set to <command>yes</command>, incremental transfer
  8873. will be provided
  8874. whenever possible. If set to <command>no</command>,
  8875. all transfers
  8876. to the remote server will be non-incremental. If not set, the
  8877. value
  8878. of the <command>provide-ixfr</command> option in the
  8879. view or
  8880. global options block is used as a default.
  8881. </para>
  8882. <para>
  8883. The <command>request-ixfr</command> clause determines
  8884. whether
  8885. the local server, acting as a slave, will request incremental zone
  8886. transfers from the given remote server, a master. If not set, the
  8887. value of the <command>request-ixfr</command> option in
  8888. the view or
  8889. global options block is used as a default.
  8890. </para>
  8891. <para>
  8892. IXFR requests to servers that do not support IXFR will
  8893. automatically
  8894. fall back to AXFR. Therefore, there is no need to manually list
  8895. which servers support IXFR and which ones do not; the global
  8896. default
  8897. of <command>yes</command> should always work.
  8898. The purpose of the <command>provide-ixfr</command> and
  8899. <command>request-ixfr</command> clauses is
  8900. to make it possible to disable the use of IXFR even when both
  8901. master
  8902. and slave claim to support it, for example if one of the servers
  8903. is buggy and crashes or corrupts data when IXFR is used.
  8904. </para>
  8905. <para>
  8906. The <command>edns</command> clause determines whether
  8907. the local server will attempt to use EDNS when communicating
  8908. with the remote server. The default is <command>yes</command>.
  8909. </para>
  8910. <para>
  8911. The <command>edns-udp-size</command> option sets the EDNS UDP size
  8912. that is advertised by <command>named</command> when querying the remote server.
  8913. Valid values are 512 to 4096 bytes (values outside this range will be
  8914. silently adjusted). This option is useful when you wish to
  8915. advertises a different value to this server than the value you
  8916. advertise globally, for example, when there is a firewall at the
  8917. remote site that is blocking large replies.
  8918. </para>
  8919. <para>
  8920. The <command>max-udp-size</command> option sets the
  8921. maximum EDNS UDP message size <command>named</command> will send. Valid
  8922. values are 512 to 4096 bytes (values outside this range will
  8923. be silently adjusted). This option is useful when you
  8924. know that there is a firewall that is blocking large
  8925. replies from <command>named</command>.
  8926. </para>
  8927. <para>
  8928. The server supports two zone transfer methods. The first, <command>one-answer</command>,
  8929. uses one DNS message per resource record transferred. <command>many-answers</command> packs
  8930. as many resource records as possible into a message. <command>many-answers</command> is
  8931. more efficient, but is only known to be understood by <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
  8932. 8.x, and patched versions of <acronym>BIND</acronym>
  8933. 4.9.5. You can specify which method
  8934. to use for a server with the <command>transfer-format</command> option.
  8935. If <command>transfer-format</command> is not
  8936. specified, the <command>transfer-format</command>
  8937. specified
  8938. by the <command>options</command> statement will be
  8939. used.
  8940. </para>
  8941. <para><command>transfers</command>
  8942. is used to limit the number of concurrent inbound zone
  8943. transfers from the specified server. If no
  8944. <command>transfers</command> clause is specified, the
  8945. limit is set according to the
  8946. <command>transfers-per-ns</command> option.
  8947. </para>
  8948. <para>
  8949. The <command>keys</command> clause identifies a
  8950. <command>key_id</command> defined by the <command>key</command> statement,
  8951. to be used for transaction security (TSIG, <xref linkend="tsig"/>)
  8952. when talking to the remote server.
  8953. When a request is sent to the remote server, a request signature
  8954. will be generated using the key specified here and appended to the
  8955. message. A request originating from the remote server is not
  8956. required
  8957. to be signed by this key.
  8958. </para>
  8959. <para>
  8960. Although the grammar of the <command>keys</command>
  8961. clause
  8962. allows for multiple keys, only a single key per server is
  8963. currently
  8964. supported.
  8965. </para>
  8966. <para>
  8967. The <command>transfer-source</command> and
  8968. <command>transfer-source-v6</command> clauses specify
  8969. the IPv4 and IPv6 source
  8970. address to be used for zone transfer with the remote server,
  8971. respectively.
  8972. For an IPv4 remote server, only <command>transfer-source</command> can
  8973. be specified.
  8974. Similarly, for an IPv6 remote server, only
  8975. <command>transfer-source-v6</command> can be
  8976. specified.
  8977. For more details, see the description of
  8978. <command>transfer-source</command> and
  8979. <command>transfer-source-v6</command> in
  8980. <xref linkend="zone_transfers"/>.
  8981. </para>
  8982. <para>
  8983. The <command>notify-source</command> and
  8984. <command>notify-source-v6</command> clauses specify the
  8985. IPv4 and IPv6 source address to be used for notify
  8986. messages sent to remote servers, respectively. For an
  8987. IPv4 remote server, only <command>notify-source</command>
  8988. can be specified. Similarly, for an IPv6 remote server,
  8989. only <command>notify-source-v6</command> can be specified.
  8990. </para>
  8991. <para>
  8992. The <command>query-source</command> and
  8993. <command>query-source-v6</command> clauses specify the
  8994. IPv4 and IPv6 source address to be used for queries
  8995. sent to remote servers, respectively. For an IPv4
  8996. remote server, only <command>query-source</command> can
  8997. be specified. Similarly, for an IPv6 remote server,
  8998. only <command>query-source-v6</command> can be specified.
  8999. </para>
  9000. </sect2>
  9001. <sect2 id="statschannels">
  9002. <title><command>statistics-channels</command> Statement Grammar</title>
  9003. <programlisting><command>statistics-channels</command> {
  9004. [ inet ( ip_addr | * ) [ port ip_port ]
  9005. [ allow { <replaceable> address_match_list </replaceable> } ]; ]
  9006. [ inet ...; ]
  9007. };
  9008. </programlisting>
  9009. </sect2>
  9010. <sect2>
  9011. <title><command>statistics-channels</command> Statement Definition and
  9012. Usage</title>
  9013. <para>
  9014. The <command>statistics-channels</command> statement
  9015. declares communication channels to be used by system
  9016. administrators to get access to statistics information of
  9017. the name server.
  9018. </para>
  9019. <para>
  9020. This statement intends to be flexible to support multiple
  9021. communication protocols in the future, but currently only
  9022. HTTP access is supported.
  9023. It requires that BIND 9 be compiled with libxml2;
  9024. the <command>statistics-channels</command> statement is
  9025. still accepted even if it is built without the library,
  9026. but any HTTP access will fail with an error.
  9027. </para>
  9028. <para>
  9029. An <command>inet</command> control channel is a TCP socket
  9030. listening at the specified <command>ip_port</command> on the
  9031. specified <command>ip_addr</command>, which can be an IPv4 or IPv6
  9032. address. An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
  9033. interpreted as the IPv4 wildcard address; connections will be
  9034. accepted on any of the system's IPv4 addresses.
  9035. To listen on the IPv6 wildcard address,
  9036. use an <command>ip_addr</command> of <literal>::</literal>.
  9037. </para>
  9038. <para>
  9039. If no port is specified, port 80 is used for HTTP channels.
  9040. The asterisk "<literal>*</literal>" cannot be used for
  9041. <command>ip_port</command>.
  9042. </para>
  9043. <para>
  9044. The attempt of opening a statistics channel is
  9045. restricted by the optional <command>allow</command> clause.
  9046. Connections to the statistics channel are permitted based on the
  9047. <command>address_match_list</command>.
  9048. If no <command>allow</command> clause is present,
  9049. <command>named</command> accepts connection
  9050. attempts from any address; since the statistics may
  9051. contain sensitive internal information, it is highly
  9052. recommended to restrict the source of connection requests
  9053. appropriately.
  9054. </para>
  9055. <para>
  9056. If no <command>statistics-channels</command> statement is present,
  9057. <command>named</command> will not open any communication channels.
  9058. </para>
  9059. </sect2>
  9060. <sect2 id="trusted-keys">
  9061. <title><command>trusted-keys</command> Statement Grammar</title>
  9062. <programlisting><command>trusted-keys</command> {
  9063. <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
  9064. <optional> <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
  9065. };
  9066. </programlisting>
  9067. </sect2>
  9068. <sect2>
  9069. <title><command>trusted-keys</command> Statement Definition
  9070. and Usage</title>
  9071. <para>
  9072. The <command>trusted-keys</command> statement defines
  9073. DNSSEC security roots. DNSSEC is described in <xref
  9074. linkend="DNSSEC"/>. A security root is defined when the
  9075. public key for a non-authoritative zone is known, but
  9076. cannot be securely obtained through DNS, either because
  9077. it is the DNS root zone or because its parent zone is
  9078. unsigned. Once a key has been configured as a trusted
  9079. key, it is treated as if it had been validated and
  9080. proven secure. The resolver attempts DNSSEC validation
  9081. on all DNS data in subdomains of a security root.
  9082. </para>
  9083. <para>
  9084. All keys (and corresponding zones) listed in
  9085. <command>trusted-keys</command> are deemed to exist regardless
  9086. of what parent zones say. Similarly for all keys listed in
  9087. <command>trusted-keys</command> only those keys are
  9088. used to validate the DNSKEY RRset. The parent's DS RRset
  9089. will not be used.
  9090. </para>
  9091. <para>
  9092. The <command>trusted-keys</command> statement can contain
  9093. multiple key entries, each consisting of the key's
  9094. domain name, flags, protocol, algorithm, and the Base-64
  9095. representation of the key data.
  9096. Spaces, tabs, newlines and carriage returns are ignored
  9097. in the key data, so the configuration may be split up into
  9098. multiple lines.
  9099. </para>
  9100. <para>
  9101. <command>trusted-keys</command> may be set at the top level
  9102. of <filename>named.conf</filename> or within a view. If it is
  9103. set in both places, they are additive: keys defined at the top
  9104. level are inherited by all views, but keys defined in a view
  9105. are only used within that view.
  9106. </para>
  9107. </sect2>
  9108. <sect2>
  9109. <title><command>managed-keys</command> Statement Grammar</title>
  9110. <programlisting><command>managed-keys</command> {
  9111. <replaceable>string</replaceable> initial-key <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
  9112. <optional> <replaceable>string</replaceable> initial-key <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
  9113. };
  9114. </programlisting>
  9115. </sect2>
  9116. <sect2 id="managed-keys">
  9117. <title><command>managed-keys</command> Statement Definition
  9118. and Usage</title>
  9119. <para>
  9120. The <command>managed-keys</command> statement, like
  9121. <command>trusted-keys</command>, defines DNSSEC
  9122. security roots. The difference is that
  9123. <command>managed-keys</command> can be kept up to date
  9124. automatically, without intervention from the resolver
  9125. operator.
  9126. </para>
  9127. <para>
  9128. Suppose, for example, that a zone's key-signing
  9129. key was compromised, and the zone owner had to revoke and
  9130. replace the key. A resolver which had the old key in a
  9131. <command>trusted-keys</command> statement would be
  9132. unable to validate this zone any longer; it would
  9133. reply with a SERVFAIL response code. This would
  9134. continue until the resolver operator had updated the
  9135. <command>trusted-keys</command> statement with the new key.
  9136. </para>
  9137. <para>
  9138. If, however, the zone were listed in a
  9139. <command>managed-keys</command> statement instead, then the
  9140. zone owner could add a "stand-by" key to the zone in advance.
  9141. <command>named</command> would store the stand-by key, and
  9142. when the original key was revoked, <command>named</command>
  9143. would be able to transition smoothly to the new key. It would
  9144. also recognize that the old key had been revoked, and cease
  9145. using that key to validate answers, minimizing the damage that
  9146. the compromised key could do.
  9147. </para>
  9148. <para>
  9149. A <command>managed-keys</command> statement contains a list of
  9150. the keys to be managed, along with information about how the
  9151. keys are to be initialized for the first time. The only
  9152. initialization method currently supported (as of
  9153. <acronym>BIND</acronym> 9.7.0) is <literal>initial-key</literal>.
  9154. This means the <command>managed-keys</command> statement must
  9155. contain a copy of the initializing key. (Future releases may
  9156. allow keys to be initialized by other methods, eliminating this
  9157. requirement.)
  9158. </para>
  9159. <para>
  9160. Consequently, a <command>managed-keys</command> statement
  9161. appears similar to a <command>trusted-keys</command>, differing
  9162. in the presence of the second field, containing the keyword
  9163. <literal>initial-key</literal>. The difference is, whereas the
  9164. keys listed in a <command>trusted-keys</command> continue to be
  9165. trusted until they are removed from
  9166. <filename>named.conf</filename>, an initializing key listed
  9167. in a <command>managed-keys</command> statement is only trusted
  9168. <emphasis>once</emphasis>: for as long as it takes to load the
  9169. managed key database and start the RFC 5011 key maintenance
  9170. process.
  9171. </para>
  9172. <para>
  9173. The first time <command>named</command> runs with a managed key
  9174. configured in <filename>named.conf</filename>, it fetches the
  9175. DNSKEY RRset directly from the zone apex, and validates it
  9176. using the key specified in the <command>managed-keys</command>
  9177. statement. If the DNSKEY RRset is validly signed, then it is
  9178. used as the basis for a new managed keys database.
  9179. </para>
  9180. <para>
  9181. From that point on, whenever <command>named</command> runs, it
  9182. sees the <command>managed-keys</command> statement, checks to
  9183. make sure RFC 5011 key maintenance has already been initialized
  9184. for the specified domain, and if so, it simply moves on. The
  9185. key specified in the <command>managed-keys</command> is not
  9186. used to validate answers; it has been superseded by the key or
  9187. keys stored in the managed keys database.
  9188. </para>
  9189. <para>
  9190. The next time <command>named</command> runs after a name
  9191. has been <emphasis>removed</emphasis> from the
  9192. <command>managed-keys</command> statement, the corresponding
  9193. zone will be removed from the managed keys database,
  9194. and RFC 5011 key maintenance will no longer be used for that
  9195. domain.
  9196. </para>
  9197. <para>
  9198. <command>named</command> only maintains a single managed keys
  9199. database; consequently, unlike <command>trusted-keys</command>,
  9200. <command>managed-keys</command> may only be set at the top
  9201. level of <filename>named.conf</filename>, not within a view.
  9202. </para>
  9203. <para>
  9204. In the current implementation, the managed keys database is
  9205. stored as a master-format zone file called
  9206. <filename>managed-keys.bind</filename>. When the key database
  9207. is changed, the zone is updated. As with any other dynamic
  9208. zone, changes will be written into a journal file,
  9209. <filename>managed-keys.bind.jnl</filename>. They are committed
  9210. to the master file as soon as possible afterward; in the case
  9211. of the managed key database, this will usually occur within 30
  9212. seconds. So, whenever <command>named</command> is using
  9213. automatic key maintenance, those two files can be expected to
  9214. exist in the working directory. (For this reason among others,
  9215. the working directory should be always be writable by
  9216. <command>named</command>.)
  9217. </para>
  9218. <para>
  9219. If the <command>dnssec-lookaside</command> option is
  9220. set to <userinput>auto</userinput>, <command>named</command>
  9221. will automatically initialize a managed key for the
  9222. zone <literal>dlv.isc.org</literal>. The key that is
  9223. used to initialize the key maintenance process is built
  9224. into <command>named</command>, and can be overridden
  9225. from <command>bindkeys-file</command>.
  9226. </para>
  9227. </sect2>
  9228. <sect2 id="view_statement_grammar">
  9229. <title><command>view</command> Statement Grammar</title>
  9230. <programlisting><command>view</command> <replaceable>view_name</replaceable>
  9231. <optional><replaceable>class</replaceable></optional> {
  9232. match-clients { <replaceable>address_match_list</replaceable> };
  9233. match-destinations { <replaceable>address_match_list</replaceable> };
  9234. match-recursive-only <replaceable>yes_or_no</replaceable> ;
  9235. <optional> <replaceable>view_option</replaceable>; ...</optional>
  9236. <optional> <replaceable>zone_statement</replaceable>; ...</optional>
  9237. };
  9238. </programlisting>
  9239. </sect2>
  9240. <sect2>
  9241. <title><command>view</command> Statement Definition and Usage</title>
  9242. <para>
  9243. The <command>view</command> statement is a powerful
  9244. feature
  9245. of <acronym>BIND</acronym> 9 that lets a name server
  9246. answer a DNS query differently
  9247. depending on who is asking. It is particularly useful for
  9248. implementing
  9249. split DNS setups without having to run multiple servers.
  9250. </para>
  9251. <para>
  9252. Each <command>view</command> statement defines a view
  9253. of the
  9254. DNS namespace that will be seen by a subset of clients. A client
  9255. matches
  9256. a view if its source IP address matches the
  9257. <varname>address_match_list</varname> of the view's
  9258. <command>match-clients</command> clause and its
  9259. destination IP address matches
  9260. the <varname>address_match_list</varname> of the
  9261. view's
  9262. <command>match-destinations</command> clause. If not
  9263. specified, both
  9264. <command>match-clients</command> and <command>match-destinations</command>
  9265. default to matching all addresses. In addition to checking IP
  9266. addresses
  9267. <command>match-clients</command> and <command>match-destinations</command>
  9268. can also take <command>keys</command> which provide an
  9269. mechanism for the
  9270. client to select the view. A view can also be specified
  9271. as <command>match-recursive-only</command>, which
  9272. means that only recursive
  9273. requests from matching clients will match that view.
  9274. The order of the <command>view</command> statements is
  9275. significant &mdash;
  9276. a client request will be resolved in the context of the first
  9277. <command>view</command> that it matches.
  9278. </para>
  9279. <para>
  9280. Zones defined within a <command>view</command>
  9281. statement will
  9282. only be accessible to clients that match the <command>view</command>.
  9283. By defining a zone of the same name in multiple views, different
  9284. zone data can be given to different clients, for example,
  9285. "internal"
  9286. and "external" clients in a split DNS setup.
  9287. </para>
  9288. <para>
  9289. Many of the options given in the <command>options</command> statement
  9290. can also be used within a <command>view</command>
  9291. statement, and then
  9292. apply only when resolving queries with that view. When no
  9293. view-specific
  9294. value is given, the value in the <command>options</command> statement
  9295. is used as a default. Also, zone options can have default values
  9296. specified
  9297. in the <command>view</command> statement; these
  9298. view-specific defaults
  9299. take precedence over those in the <command>options</command> statement.
  9300. </para>
  9301. <para>
  9302. Views are class specific. If no class is given, class IN
  9303. is assumed. Note that all non-IN views must contain a hint zone,
  9304. since only the IN class has compiled-in default hints.
  9305. </para>
  9306. <para>
  9307. If there are no <command>view</command> statements in
  9308. the config
  9309. file, a default view that matches any client is automatically
  9310. created
  9311. in class IN. Any <command>zone</command> statements
  9312. specified on
  9313. the top level of the configuration file are considered to be part
  9314. of
  9315. this default view, and the <command>options</command>
  9316. statement will
  9317. apply to the default view. If any explicit <command>view</command>
  9318. statements are present, all <command>zone</command>
  9319. statements must
  9320. occur inside <command>view</command> statements.
  9321. </para>
  9322. <para>
  9323. Here is an example of a typical split DNS setup implemented
  9324. using <command>view</command> statements:
  9325. </para>
  9326. <programlisting>view "internal" {
  9327. // This should match our internal networks.
  9328. match-clients { 10.0.0.0/8; };
  9329. // Provide recursive service to internal
  9330. // clients only.
  9331. recursion yes;
  9332. // Provide a complete view of the example.com
  9333. // zone including addresses of internal hosts.
  9334. zone "example.com" {
  9335. type master;
  9336. file "example-internal.db";
  9337. };
  9338. };
  9339. view "external" {
  9340. // Match all clients not matched by the
  9341. // previous view.
  9342. match-clients { any; };
  9343. // Refuse recursive service to external clients.
  9344. recursion no;
  9345. // Provide a restricted view of the example.com
  9346. // zone containing only publicly accessible hosts.
  9347. zone "example.com" {
  9348. type master;
  9349. file "example-external.db";
  9350. };
  9351. };
  9352. </programlisting>
  9353. </sect2>
  9354. <sect2 id="zone_statement_grammar">
  9355. <title><command>zone</command>
  9356. Statement Grammar</title>
  9357. <programlisting><command>zone</command> <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9358. type master;
  9359. <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
  9360. <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
  9361. <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
  9362. <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
  9363. <optional> update-policy <replaceable>local</replaceable> | { <replaceable>update_policy_rule</replaceable> <optional>...</optional> }; </optional>
  9364. <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
  9365. <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  9366. <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
  9367. <optional> check-mx (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
  9368. <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
  9369. <optional> check-integrity <replaceable>yes_or_no</replaceable> ; </optional>
  9370. <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
  9371. <optional> file <replaceable>string</replaceable> ; </optional>
  9372. <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
  9373. <optional> journal <replaceable>string</replaceable> ; </optional>
  9374. <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
  9375. <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
  9376. <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  9377. <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
  9378. <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
  9379. <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
  9380. <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
  9381. <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
  9382. <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
  9383. <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
  9384. <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
  9385. <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
  9386. <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
  9387. <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
  9388. <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9389. <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9390. <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
  9391. <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
  9392. <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
  9393. <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
  9394. <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
  9395. <optional> database <replaceable>string</replaceable> ; </optional>
  9396. <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
  9397. <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
  9398. <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
  9399. <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
  9400. <optional> key-directory <replaceable>path_name</replaceable>; </optional>
  9401. <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; </optional>
  9402. <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
  9403. };
  9404. zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9405. type slave;
  9406. <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
  9407. <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
  9408. <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
  9409. <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
  9410. <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
  9411. <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
  9412. <optional> dnssec-update-mode ( <replaceable>maintain</replaceable> | <replaceable>no-resign</replaceable> ); </optional>
  9413. <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
  9414. <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ; </optional>
  9415. <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
  9416. <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
  9417. <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  9418. <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
  9419. <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
  9420. <optional> file <replaceable>string</replaceable> ; </optional>
  9421. <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
  9422. <optional> journal <replaceable>string</replaceable> ; </optional>
  9423. <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
  9424. <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
  9425. <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  9426. <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
  9427. <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
  9428. <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
  9429. <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
  9430. <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
  9431. <optional>port <replaceable>ip_port</replaceable></optional>
  9432. <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
  9433. <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
  9434. <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
  9435. <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
  9436. <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
  9437. <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
  9438. <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
  9439. <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
  9440. <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
  9441. <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
  9442. <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9443. <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9444. <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9445. <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
  9446. <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9447. <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
  9448. <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9449. <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9450. <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
  9451. <optional> database <replaceable>string</replaceable> ; </optional>
  9452. <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
  9453. <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
  9454. <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
  9455. <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
  9456. <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
  9457. <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
  9458. };
  9459. zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9460. type hint;
  9461. file <replaceable>string</replaceable> ;
  9462. <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
  9463. <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional> // Not Implemented.
  9464. };
  9465. zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9466. type stub;
  9467. <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
  9468. <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
  9469. <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
  9470. <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
  9471. <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
  9472. <optional> file <replaceable>string</replaceable> ; </optional>
  9473. <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
  9474. <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
  9475. <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  9476. <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
  9477. <optional>port <replaceable>ip_port</replaceable></optional>
  9478. <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
  9479. <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
  9480. <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
  9481. <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
  9482. <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9483. <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
  9484. <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9485. <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9486. <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
  9487. <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
  9488. <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
  9489. <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
  9490. <optional> database <replaceable>string</replaceable> ; </optional>
  9491. <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
  9492. <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
  9493. <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
  9494. <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
  9495. <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
  9496. };
  9497. zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9498. type static-stub;
  9499. <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
  9500. <optional> server-addresses { <optional> <replaceable>ip_addr</replaceable> ; ... </optional> }; </optional>
  9501. <optional> server-names { <optional> <replaceable>namelist</replaceable> </optional> }; </optional>
  9502. <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
  9503. };
  9504. zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9505. type forward;
  9506. <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
  9507. <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
  9508. <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
  9509. };
  9510. zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
  9511. type delegation-only;
  9512. };
  9513. </programlisting>
  9514. </sect2>
  9515. <sect2>
  9516. <title><command>zone</command> Statement Definition and Usage</title>
  9517. <sect3>
  9518. <title>Zone Types</title>
  9519. <informaltable colsep="0" rowsep="0">
  9520. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
  9521. <!--colspec colname="1" colnum="1" colsep="0" colwidth="1.108in"/-->
  9522. <!--colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/-->
  9523. <colspec colname="1" colnum="1" colsep="0"/>
  9524. <colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/>
  9525. <tbody>
  9526. <row rowsep="0">
  9527. <entry colname="1">
  9528. <para>
  9529. <varname>master</varname>
  9530. </para>
  9531. </entry>
  9532. <entry colname="2">
  9533. <para>
  9534. The server has a master copy of the data
  9535. for the zone and will be able to provide authoritative
  9536. answers for
  9537. it.
  9538. </para>
  9539. </entry>
  9540. </row>
  9541. <row rowsep="0">
  9542. <entry colname="1">
  9543. <para>
  9544. <varname>slave</varname>
  9545. </para>
  9546. </entry>
  9547. <entry colname="2">
  9548. <para>
  9549. A slave zone is a replica of a master
  9550. zone. The <command>masters</command> list
  9551. specifies one or more IP addresses
  9552. of master servers that the slave contacts to update
  9553. its copy of the zone.
  9554. Masters list elements can also be names of other
  9555. masters lists.
  9556. By default, transfers are made from port 53 on the
  9557. servers; this can
  9558. be changed for all servers by specifying a port number
  9559. before the
  9560. list of IP addresses, or on a per-server basis after
  9561. the IP address.
  9562. Authentication to the master can also be done with
  9563. per-server TSIG keys.
  9564. If a file is specified, then the
  9565. replica will be written to this file whenever the zone
  9566. is changed,
  9567. and reloaded from this file on a server restart. Use
  9568. of a file is
  9569. recommended, since it often speeds server startup and
  9570. eliminates
  9571. a needless waste of bandwidth. Note that for large
  9572. numbers (in the
  9573. tens or hundreds of thousands) of zones per server, it
  9574. is best to
  9575. use a two-level naming scheme for zone filenames. For
  9576. example,
  9577. a slave server for the zone <literal>example.com</literal> might place
  9578. the zone contents into a file called
  9579. <filename>ex/example.com</filename> where <filename>ex/</filename> is
  9580. just the first two letters of the zone name. (Most
  9581. operating systems
  9582. behave very slowly if you put 100000 files into
  9583. a single directory.)
  9584. </para>
  9585. </entry>
  9586. </row>
  9587. <row rowsep="0">
  9588. <entry colname="1">
  9589. <para>
  9590. <varname>stub</varname>
  9591. </para>
  9592. </entry>
  9593. <entry colname="2">
  9594. <para>
  9595. A stub zone is similar to a slave zone,
  9596. except that it replicates only the NS records of a
  9597. master zone instead
  9598. of the entire zone. Stub zones are not a standard part
  9599. of the DNS;
  9600. they are a feature specific to the <acronym>BIND</acronym> implementation.
  9601. </para>
  9602. <para>
  9603. Stub zones can be used to eliminate the need for glue
  9604. NS record
  9605. in a parent zone at the expense of maintaining a stub
  9606. zone entry and
  9607. a set of name server addresses in <filename>named.conf</filename>.
  9608. This usage is not recommended for new configurations,
  9609. and BIND 9
  9610. supports it only in a limited way.
  9611. In <acronym>BIND</acronym> 4/8, zone
  9612. transfers of a parent zone
  9613. included the NS records from stub children of that
  9614. zone. This meant
  9615. that, in some cases, users could get away with
  9616. configuring child stubs
  9617. only in the master server for the parent zone. <acronym>BIND</acronym>
  9618. 9 never mixes together zone data from different zones
  9619. in this
  9620. way. Therefore, if a <acronym>BIND</acronym> 9 master serving a parent
  9621. zone has child stub zones configured, all the slave
  9622. servers for the
  9623. parent zone also need to have the same child stub
  9624. zones
  9625. configured.
  9626. </para>
  9627. <para>
  9628. Stub zones can also be used as a way of forcing the
  9629. resolution
  9630. of a given domain to use a particular set of
  9631. authoritative servers.
  9632. For example, the caching name servers on a private
  9633. network using
  9634. RFC1918 addressing may be configured with stub zones
  9635. for
  9636. <literal>10.in-addr.arpa</literal>
  9637. to use a set of internal name servers as the
  9638. authoritative
  9639. servers for that domain.
  9640. </para>
  9641. </entry>
  9642. </row>
  9643. <row rowsep="0">
  9644. <entry colname="1">
  9645. <para>
  9646. <varname>static-stub</varname>
  9647. </para>
  9648. </entry>
  9649. <entry colname="2">
  9650. <para>
  9651. A static-stub zone is similar to a stub zone
  9652. with the following exceptions:
  9653. the zone data is statically configured, rather
  9654. than transferred from a master server;
  9655. when recursion is necessary for a query that
  9656. matches a static-stub zone, the locally
  9657. configured data (nameserver names and glue addresses)
  9658. is always used even if different authoritative
  9659. information is cached.
  9660. </para>
  9661. <para>
  9662. Zone data is configured via the
  9663. <command>server-addresses</command> and
  9664. <command>server-names</command> zone options.
  9665. </para>
  9666. <para>
  9667. The zone data is maintained in the form of NS
  9668. and (if necessary) glue A or AAAA RRs
  9669. internally, which can be seen by dumping zone
  9670. databases by <command>rndc dumpdb -all</command>.
  9671. The configured RRs are considered local configuration
  9672. parameters rather than public data.
  9673. Non recursive queries (i.e., those with the RD
  9674. bit off) to a static-stub zone are therefore
  9675. prohibited and will be responded with REFUSED.
  9676. </para>
  9677. <para>
  9678. Since the data is statically configured, no
  9679. zone maintenance action takes place for a static-stub
  9680. zone.
  9681. For example, there is no periodic refresh
  9682. attempt, and an incoming notify message
  9683. will be rejected with an rcode of NOTAUTH.
  9684. </para>
  9685. <para>
  9686. Each static-stub zone is configured with
  9687. internally generated NS and (if necessary)
  9688. glue A or AAAA RRs
  9689. </para>
  9690. </entry>
  9691. </row>
  9692. <row rowsep="0">
  9693. <entry colname="1">
  9694. <para>
  9695. <varname>forward</varname>
  9696. </para>
  9697. </entry>
  9698. <entry colname="2">
  9699. <para>
  9700. A "forward zone" is a way to configure
  9701. forwarding on a per-domain basis. A <command>zone</command> statement
  9702. of type <command>forward</command> can
  9703. contain a <command>forward</command>
  9704. and/or <command>forwarders</command>
  9705. statement,
  9706. which will apply to queries within the domain given by
  9707. the zone
  9708. name. If no <command>forwarders</command>
  9709. statement is present or
  9710. an empty list for <command>forwarders</command> is given, then no
  9711. forwarding will be done for the domain, canceling the
  9712. effects of
  9713. any forwarders in the <command>options</command> statement. Thus
  9714. if you want to use this type of zone to change the
  9715. behavior of the
  9716. global <command>forward</command> option
  9717. (that is, "forward first"
  9718. to, then "forward only", or vice versa, but want to
  9719. use the same
  9720. servers as set globally) you need to re-specify the
  9721. global forwarders.
  9722. </para>
  9723. </entry>
  9724. </row>
  9725. <row rowsep="0">
  9726. <entry colname="1">
  9727. <para>
  9728. <varname>hint</varname>
  9729. </para>
  9730. </entry>
  9731. <entry colname="2">
  9732. <para>
  9733. The initial set of root name servers is
  9734. specified using a "hint zone". When the server starts
  9735. up, it uses
  9736. the root hints to find a root name server and get the
  9737. most recent
  9738. list of root name servers. If no hint zone is
  9739. specified for class
  9740. IN, the server uses a compiled-in default set of root
  9741. servers hints.
  9742. Classes other than IN have no built-in defaults hints.
  9743. </para>
  9744. </entry>
  9745. </row>
  9746. <row rowsep="0">
  9747. <entry colname="1">
  9748. <para>
  9749. <varname>delegation-only</varname>
  9750. </para>
  9751. </entry>
  9752. <entry colname="2">
  9753. <para>
  9754. This is used to enforce the delegation-only
  9755. status of infrastructure zones (e.g. COM,
  9756. NET, ORG). Any answer that is received
  9757. without an explicit or implicit delegation
  9758. in the authority section will be treated
  9759. as NXDOMAIN. This does not apply to the
  9760. zone apex. This should not be applied to
  9761. leaf zones.
  9762. </para>
  9763. <para>
  9764. <varname>delegation-only</varname> has no
  9765. effect on answers received from forwarders.
  9766. </para>
  9767. <para>
  9768. See caveats in <xref linkend="root_delegation_only"/>.
  9769. </para>
  9770. </entry>
  9771. </row>
  9772. </tbody>
  9773. </tgroup>
  9774. </informaltable>
  9775. </sect3>
  9776. <sect3>
  9777. <title>Class</title>
  9778. <para>
  9779. The zone's name may optionally be followed by a class. If
  9780. a class is not specified, class <literal>IN</literal> (for <varname>Internet</varname>),
  9781. is assumed. This is correct for the vast majority of cases.
  9782. </para>
  9783. <para>
  9784. The <literal>hesiod</literal> class is
  9785. named for an information service from MIT's Project Athena. It
  9786. is
  9787. used to share information about various systems databases, such
  9788. as users, groups, printers and so on. The keyword
  9789. <literal>HS</literal> is
  9790. a synonym for hesiod.
  9791. </para>
  9792. <para>
  9793. Another MIT development is Chaosnet, a LAN protocol created
  9794. in the mid-1970s. Zone data for it can be specified with the <literal>CHAOS</literal> class.
  9795. </para>
  9796. </sect3>
  9797. <sect3>
  9798. <title>Zone Options</title>
  9799. <variablelist>
  9800. <varlistentry>
  9801. <term><command>allow-notify</command></term>
  9802. <listitem>
  9803. <para>
  9804. See the description of
  9805. <command>allow-notify</command> in <xref linkend="access_control"/>.
  9806. </para>
  9807. </listitem>
  9808. </varlistentry>
  9809. <varlistentry>
  9810. <term><command>allow-query</command></term>
  9811. <listitem>
  9812. <para>
  9813. See the description of
  9814. <command>allow-query</command> in <xref linkend="access_control"/>.
  9815. </para>
  9816. </listitem>
  9817. </varlistentry>
  9818. <varlistentry>
  9819. <term><command>allow-query-on</command></term>
  9820. <listitem>
  9821. <para>
  9822. See the description of
  9823. <command>allow-query-on</command> in <xref linkend="access_control"/>.
  9824. </para>
  9825. </listitem>
  9826. </varlistentry>
  9827. <varlistentry>
  9828. <term><command>allow-transfer</command></term>
  9829. <listitem>
  9830. <para>
  9831. See the description of <command>allow-transfer</command>
  9832. in <xref linkend="access_control"/>.
  9833. </para>
  9834. </listitem>
  9835. </varlistentry>
  9836. <varlistentry>
  9837. <term><command>allow-update</command></term>
  9838. <listitem>
  9839. <para>
  9840. See the description of <command>allow-update</command>
  9841. in <xref linkend="access_control"/>.
  9842. </para>
  9843. </listitem>
  9844. </varlistentry>
  9845. <varlistentry>
  9846. <term><command>update-policy</command></term>
  9847. <listitem>
  9848. <para>
  9849. Specifies a "Simple Secure Update" policy. See
  9850. <xref linkend="dynamic_update_policies"/>.
  9851. </para>
  9852. </listitem>
  9853. </varlistentry>
  9854. <varlistentry>
  9855. <term><command>allow-update-forwarding</command></term>
  9856. <listitem>
  9857. <para>
  9858. See the description of <command>allow-update-forwarding</command>
  9859. in <xref linkend="access_control"/>.
  9860. </para>
  9861. </listitem>
  9862. </varlistentry>
  9863. <varlistentry>
  9864. <term><command>also-notify</command></term>
  9865. <listitem>
  9866. <para>
  9867. Only meaningful if <command>notify</command>
  9868. is
  9869. active for this zone. The set of machines that will
  9870. receive a
  9871. <literal>DNS NOTIFY</literal> message
  9872. for this zone is made up of all the listed name servers
  9873. (other than
  9874. the primary master) for the zone plus any IP addresses
  9875. specified
  9876. with <command>also-notify</command>. A port
  9877. may be specified
  9878. with each <command>also-notify</command>
  9879. address to send the notify
  9880. messages to a port other than the default of 53.
  9881. <command>also-notify</command> is not
  9882. meaningful for stub zones.
  9883. The default is the empty list.
  9884. </para>
  9885. </listitem>
  9886. </varlistentry>
  9887. <varlistentry>
  9888. <term><command>check-names</command></term>
  9889. <listitem>
  9890. <para>
  9891. This option is used to restrict the character set and
  9892. syntax of
  9893. certain domain names in master files and/or DNS responses
  9894. received from the
  9895. network. The default varies according to zone type. For <command>master</command> zones the default is <command>fail</command>. For <command>slave</command>
  9896. zones the default is <command>warn</command>.
  9897. It is not implemented for <command>hint</command> zones.
  9898. </para>
  9899. </listitem>
  9900. </varlistentry>
  9901. <varlistentry>
  9902. <term><command>check-mx</command></term>
  9903. <listitem>
  9904. <para>
  9905. See the description of
  9906. <command>check-mx</command> in <xref linkend="boolean_options"/>.
  9907. </para>
  9908. </listitem>
  9909. </varlistentry>
  9910. <varlistentry>
  9911. <term><command>check-wildcard</command></term>
  9912. <listitem>
  9913. <para>
  9914. See the description of
  9915. <command>check-wildcard</command> in <xref linkend="boolean_options"/>.
  9916. </para>
  9917. </listitem>
  9918. </varlistentry>
  9919. <varlistentry>
  9920. <term><command>check-integrity</command></term>
  9921. <listitem>
  9922. <para>
  9923. See the description of
  9924. <command>check-integrity</command> in <xref linkend="boolean_options"/>.
  9925. </para>
  9926. </listitem>
  9927. </varlistentry>
  9928. <varlistentry>
  9929. <term><command>check-sibling</command></term>
  9930. <listitem>
  9931. <para>
  9932. See the description of
  9933. <command>check-sibling</command> in <xref linkend="boolean_options"/>.
  9934. </para>
  9935. </listitem>
  9936. </varlistentry>
  9937. <varlistentry>
  9938. <term><command>zero-no-soa-ttl</command></term>
  9939. <listitem>
  9940. <para>
  9941. See the description of
  9942. <command>zero-no-soa-ttl</command> in <xref linkend="boolean_options"/>.
  9943. </para>
  9944. </listitem>
  9945. </varlistentry>
  9946. <varlistentry>
  9947. <term><command>update-check-ksk</command></term>
  9948. <listitem>
  9949. <para>
  9950. See the description of
  9951. <command>update-check-ksk</command> in <xref linkend="boolean_options"/>.
  9952. </para>
  9953. </listitem>
  9954. </varlistentry>
  9955. <varlistentry>
  9956. <term><command>dnssec-dnskey-kskonly</command></term>
  9957. <listitem>
  9958. <para>
  9959. See the description of
  9960. <command>dnssec-dnskey-kskonly</command> in <xref linkend="boolean_options"/>.
  9961. </para>
  9962. </listitem>
  9963. </varlistentry>
  9964. <varlistentry>
  9965. <term><command>try-tcp-refresh</command></term>
  9966. <listitem>
  9967. <para>
  9968. See the description of
  9969. <command>try-tcp-refresh</command> in <xref linkend="boolean_options"/>.
  9970. </para>
  9971. </listitem>
  9972. </varlistentry>
  9973. <varlistentry>
  9974. <term><command>database</command></term>
  9975. <listitem>
  9976. <para>
  9977. Specify the type of database to be used for storing the
  9978. zone data. The string following the <command>database</command> keyword
  9979. is interpreted as a list of whitespace-delimited words.
  9980. The first word
  9981. identifies the database type, and any subsequent words are
  9982. passed
  9983. as arguments to the database to be interpreted in a way
  9984. specific
  9985. to the database type.
  9986. </para>
  9987. <para>
  9988. The default is <userinput>"rbt"</userinput>, BIND 9's
  9989. native in-memory
  9990. red-black-tree database. This database does not take
  9991. arguments.
  9992. </para>
  9993. <para>
  9994. Other values are possible if additional database drivers
  9995. have been linked into the server. Some sample drivers are
  9996. included
  9997. with the distribution but none are linked in by default.
  9998. </para>
  9999. </listitem>
  10000. </varlistentry>
  10001. <varlistentry>
  10002. <term><command>dialup</command></term>
  10003. <listitem>
  10004. <para>
  10005. See the description of
  10006. <command>dialup</command> in <xref linkend="boolean_options"/>.
  10007. </para>
  10008. </listitem>
  10009. </varlistentry>
  10010. <varlistentry>
  10011. <term><command>delegation-only</command></term>
  10012. <listitem>
  10013. <para>
  10014. The flag only applies to hint and stub zones. If set
  10015. to <userinput>yes</userinput>, then the zone will also be
  10016. treated as if it is also a delegation-only type zone.
  10017. </para>
  10018. <para>
  10019. See caveats in <xref linkend="root_delegation_only"/>.
  10020. </para>
  10021. </listitem>
  10022. </varlistentry>
  10023. <varlistentry>
  10024. <term><command>forward</command></term>
  10025. <listitem>
  10026. <para>
  10027. Only meaningful if the zone has a forwarders
  10028. list. The <command>only</command> value causes
  10029. the lookup to fail
  10030. after trying the forwarders and getting no answer, while <command>first</command> would
  10031. allow a normal lookup to be tried.
  10032. </para>
  10033. </listitem>
  10034. </varlistentry>
  10035. <varlistentry>
  10036. <term><command>forwarders</command></term>
  10037. <listitem>
  10038. <para>
  10039. Used to override the list of global forwarders.
  10040. If it is not specified in a zone of type <command>forward</command>,
  10041. no forwarding is done for the zone and the global options are
  10042. not used.
  10043. </para>
  10044. </listitem>
  10045. </varlistentry>
  10046. <varlistentry>
  10047. <term><command>ixfr-base</command></term>
  10048. <listitem>
  10049. <para>
  10050. Was used in <acronym>BIND</acronym> 8 to
  10051. specify the name
  10052. of the transaction log (journal) file for dynamic update
  10053. and IXFR.
  10054. <acronym>BIND</acronym> 9 ignores the option
  10055. and constructs the name of the journal
  10056. file by appending "<filename>.jnl</filename>"
  10057. to the name of the
  10058. zone file.
  10059. </para>
  10060. </listitem>
  10061. </varlistentry>
  10062. <varlistentry>
  10063. <term><command>ixfr-tmp-file</command></term>
  10064. <listitem>
  10065. <para>
  10066. Was an undocumented option in <acronym>BIND</acronym> 8.
  10067. Ignored in <acronym>BIND</acronym> 9.
  10068. </para>
  10069. </listitem>
  10070. </varlistentry>
  10071. <varlistentry>
  10072. <term><command>journal</command></term>
  10073. <listitem>
  10074. <para>
  10075. Allow the default journal's filename to be overridden.
  10076. The default is the zone's filename with "<filename>.jnl</filename>" appended.
  10077. This is applicable to <command>master</command> and <command>slave</command> zones.
  10078. </para>
  10079. </listitem>
  10080. </varlistentry>
  10081. <varlistentry>
  10082. <term><command>max-journal-size</command></term>
  10083. <listitem>
  10084. <para>
  10085. See the description of
  10086. <command>max-journal-size</command> in <xref linkend="server_resource_limits"/>.
  10087. </para>
  10088. </listitem>
  10089. </varlistentry>
  10090. <varlistentry>
  10091. <term><command>max-transfer-time-in</command></term>
  10092. <listitem>
  10093. <para>
  10094. See the description of
  10095. <command>max-transfer-time-in</command> in <xref linkend="zone_transfers"/>.
  10096. </para>
  10097. </listitem>
  10098. </varlistentry>
  10099. <varlistentry>
  10100. <term><command>max-transfer-idle-in</command></term>
  10101. <listitem>
  10102. <para>
  10103. See the description of
  10104. <command>max-transfer-idle-in</command> in <xref linkend="zone_transfers"/>.
  10105. </para>
  10106. </listitem>
  10107. </varlistentry>
  10108. <varlistentry>
  10109. <term><command>max-transfer-time-out</command></term>
  10110. <listitem>
  10111. <para>
  10112. See the description of
  10113. <command>max-transfer-time-out</command> in <xref linkend="zone_transfers"/>.
  10114. </para>
  10115. </listitem>
  10116. </varlistentry>
  10117. <varlistentry>
  10118. <term><command>max-transfer-idle-out</command></term>
  10119. <listitem>
  10120. <para>
  10121. See the description of
  10122. <command>max-transfer-idle-out</command> in <xref linkend="zone_transfers"/>.
  10123. </para>
  10124. </listitem>
  10125. </varlistentry>
  10126. <varlistentry>
  10127. <term><command>notify</command></term>
  10128. <listitem>
  10129. <para>
  10130. See the description of
  10131. <command>notify</command> in <xref linkend="boolean_options"/>.
  10132. </para>
  10133. </listitem>
  10134. </varlistentry>
  10135. <varlistentry>
  10136. <term><command>notify-delay</command></term>
  10137. <listitem>
  10138. <para>
  10139. See the description of
  10140. <command>notify-delay</command> in <xref linkend="tuning"/>.
  10141. </para>
  10142. </listitem>
  10143. </varlistentry>
  10144. <varlistentry>
  10145. <term><command>notify-to-soa</command></term>
  10146. <listitem>
  10147. <para>
  10148. See the description of
  10149. <command>notify-to-soa</command> in
  10150. <xref linkend="boolean_options"/>.
  10151. </para>
  10152. </listitem>
  10153. </varlistentry>
  10154. <varlistentry>
  10155. <term><command>pubkey</command></term>
  10156. <listitem>
  10157. <para>
  10158. In <acronym>BIND</acronym> 8, this option was
  10159. intended for specifying
  10160. a public zone key for verification of signatures in DNSSEC
  10161. signed
  10162. zones when they are loaded from disk. <acronym>BIND</acronym> 9 does not verify signatures
  10163. on load and ignores the option.
  10164. </para>
  10165. </listitem>
  10166. </varlistentry>
  10167. <varlistentry>
  10168. <term><command>zone-statistics</command></term>
  10169. <listitem>
  10170. <para>
  10171. If <userinput>yes</userinput>, the server will keep
  10172. statistical
  10173. information for this zone, which can be dumped to the
  10174. <command>statistics-file</command> defined in
  10175. the server options.
  10176. </para>
  10177. </listitem>
  10178. </varlistentry>
  10179. <varlistentry>
  10180. <term><command>server-addresses</command></term>
  10181. <listitem>
  10182. <para>
  10183. Only meaningful for static-stub zones.
  10184. This is a list of IP addresses to which queries
  10185. should be sent in recursive resolution for the
  10186. zone.
  10187. A non empty list for this option will internally
  10188. configure the apex NS RR with associated glue A or
  10189. AAAA RRs.
  10190. </para>
  10191. <para>
  10192. For example, if "example.com" is configured as a
  10193. static-stub zone with 192.0.2.1 and 2001:db8::1234
  10194. in a <command>server-addresses</command> option,
  10195. the following RRs will be internally configured.
  10196. </para>
  10197. <programlisting>example.com. NS example.com.
  10198. example.com. A 192.0.2.1
  10199. example.com. AAAA 2001:db8::1234</programlisting>
  10200. <para>
  10201. These records are internally used to resolve
  10202. names under the static-stub zone.
  10203. For instance, if the server receives a query for
  10204. "www.example.com" with the RD bit on, the server
  10205. will initiate recursive resolution and send
  10206. queries to 192.0.2.1 and/or 2001:db8::1234.
  10207. </para>
  10208. </listitem>
  10209. </varlistentry>
  10210. <varlistentry>
  10211. <term><command>server-names</command></term>
  10212. <listitem>
  10213. <para>
  10214. Only meaningful for static-stub zones.
  10215. This is a list of domain names of nameservers that
  10216. act as authoritative servers of the static-stub
  10217. zone.
  10218. These names will be resolved to IP addresses when
  10219. <command>named</command> needs to send queries to
  10220. these servers.
  10221. To make this supplemental resolution successful,
  10222. these names must not be a subdomain of the origin
  10223. name of static-stub zone.
  10224. That is, when "example.net" is the origin of a
  10225. static-stub zone, "ns.example" and
  10226. "master.example.com" can be specified in the
  10227. <command>server-names</command> option, but
  10228. "ns.example.net" cannot, and will be rejected by
  10229. the configuration parser.
  10230. </para>
  10231. <para>
  10232. A non empty list for this option will internally
  10233. configure the apex NS RR with the specified names.
  10234. For example, if "example.com" is configured as a
  10235. static-stub zone with "ns1.example.net" and
  10236. "ns2.example.net"
  10237. in a <command>server-names</command> option,
  10238. the following RRs will be internally configured.
  10239. </para>
  10240. <programlisting>example.com. NS ns1.example.net.
  10241. example.com. NS ns2.example.net.
  10242. </programlisting>
  10243. <para>
  10244. These records are internally used to resolve
  10245. names under the static-stub zone.
  10246. For instance, if the server receives a query for
  10247. "www.example.com" with the RD bit on, the server
  10248. initiate recursive resolution,
  10249. resolve "ns1.example.net" and/or
  10250. "ns2.example.net" to IP addresses, and then send
  10251. queries to (one or more of) these addresses.
  10252. </para>
  10253. </listitem>
  10254. </varlistentry>
  10255. <varlistentry>
  10256. <term><command>sig-validity-interval</command></term>
  10257. <listitem>
  10258. <para>
  10259. See the description of
  10260. <command>sig-validity-interval</command> in <xref linkend="tuning"/>.
  10261. </para>
  10262. </listitem>
  10263. </varlistentry>
  10264. <varlistentry>
  10265. <term><command>sig-signing-nodes</command></term>
  10266. <listitem>
  10267. <para>
  10268. See the description of
  10269. <command>sig-signing-nodes</command> in <xref linkend="tuning"/>.
  10270. </para>
  10271. </listitem>
  10272. </varlistentry>
  10273. <varlistentry>
  10274. <term><command>sig-signing-signatures</command></term>
  10275. <listitem>
  10276. <para>
  10277. See the description of
  10278. <command>sig-signing-signatures</command> in <xref linkend="tuning"/>.
  10279. </para>
  10280. </listitem>
  10281. </varlistentry>
  10282. <varlistentry>
  10283. <term><command>sig-signing-type</command></term>
  10284. <listitem>
  10285. <para>
  10286. See the description of
  10287. <command>sig-signing-type</command> in <xref linkend="tuning"/>.
  10288. </para>
  10289. </listitem>
  10290. </varlistentry>
  10291. <varlistentry>
  10292. <term><command>transfer-source</command></term>
  10293. <listitem>
  10294. <para>
  10295. See the description of
  10296. <command>transfer-source</command> in <xref linkend="zone_transfers"/>.
  10297. </para>
  10298. </listitem>
  10299. </varlistentry>
  10300. <varlistentry>
  10301. <term><command>transfer-source-v6</command></term>
  10302. <listitem>
  10303. <para>
  10304. See the description of
  10305. <command>transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
  10306. </para>
  10307. </listitem>
  10308. </varlistentry>
  10309. <varlistentry>
  10310. <term><command>alt-transfer-source</command></term>
  10311. <listitem>
  10312. <para>
  10313. See the description of
  10314. <command>alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
  10315. </para>
  10316. </listitem>
  10317. </varlistentry>
  10318. <varlistentry>
  10319. <term><command>alt-transfer-source-v6</command></term>
  10320. <listitem>
  10321. <para>
  10322. See the description of
  10323. <command>alt-transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
  10324. </para>
  10325. </listitem>
  10326. </varlistentry>
  10327. <varlistentry>
  10328. <term><command>use-alt-transfer-source</command></term>
  10329. <listitem>
  10330. <para>
  10331. See the description of
  10332. <command>use-alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
  10333. </para>
  10334. </listitem>
  10335. </varlistentry>
  10336. <varlistentry>
  10337. <term><command>notify-source</command></term>
  10338. <listitem>
  10339. <para>
  10340. See the description of
  10341. <command>notify-source</command> in <xref linkend="zone_transfers"/>.
  10342. </para>
  10343. </listitem>
  10344. </varlistentry>
  10345. <varlistentry>
  10346. <term><command>notify-source-v6</command></term>
  10347. <listitem>
  10348. <para>
  10349. See the description of
  10350. <command>notify-source-v6</command> in <xref linkend="zone_transfers"/>.
  10351. </para>
  10352. </listitem>
  10353. </varlistentry>
  10354. <varlistentry>
  10355. <term><command>min-refresh-time</command></term>
  10356. <term><command>max-refresh-time</command></term>
  10357. <term><command>min-retry-time</command></term>
  10358. <term><command>max-retry-time</command></term>
  10359. <listitem>
  10360. <para>
  10361. See the description in <xref linkend="tuning"/>.
  10362. </para>
  10363. </listitem>
  10364. </varlistentry>
  10365. <varlistentry>
  10366. <term><command>ixfr-from-differences</command></term>
  10367. <listitem>
  10368. <para>
  10369. See the description of
  10370. <command>ixfr-from-differences</command> in <xref linkend="boolean_options"/>.
  10371. (Note that the <command>ixfr-from-differences</command>
  10372. <userinput>master</userinput> and
  10373. <userinput>slave</userinput> choices are not
  10374. available at the zone level.)
  10375. </para>
  10376. </listitem>
  10377. </varlistentry>
  10378. <varlistentry>
  10379. <term><command>key-directory</command></term>
  10380. <listitem>
  10381. <para>
  10382. See the description of
  10383. <command>key-directory</command> in <xref linkend="options"/>.
  10384. </para>
  10385. </listitem>
  10386. </varlistentry>
  10387. <varlistentry>
  10388. <term><command>auto-dnssec</command></term>
  10389. <listitem>
  10390. <para>
  10391. Zones configured for dynamic DNS may also use this
  10392. option to allow varying levels of automatic DNSSEC key
  10393. management. There are three possible settings:
  10394. </para>
  10395. <para>
  10396. <command>auto-dnssec allow;</command> permits
  10397. keys to be updated and the zone fully re-signed
  10398. whenever the user issues the command <command>rndc sign
  10399. <replaceable>zonename</replaceable></command>.
  10400. </para>
  10401. <para>
  10402. <command>auto-dnssec maintain;</command> includes the
  10403. above, but also automatically adjusts the zone's DNSSEC
  10404. keys on schedule, according to the keys' timing metadata
  10405. (see <xref linkend="man.dnssec-keygen"/> and
  10406. <xref linkend="man.dnssec-settime"/>). The command
  10407. <command>rndc sign
  10408. <replaceable>zonename</replaceable></command> causes
  10409. <command>named</command> to load keys from the key
  10410. repository and sign the zone with all keys that are
  10411. active.
  10412. <command>rndc loadkeys
  10413. <replaceable>zonename</replaceable></command> causes
  10414. <command>named</command> to load keys from the key
  10415. repository and schedule key maintenance events to occur
  10416. in the future, but it does not sign the full zone
  10417. immediately. Note: once keys have been loaded for a
  10418. zone the first time, the repository will be searched
  10419. for changes periodically, regardless of whether
  10420. <command>rndc loadkeys</command> is used. The recheck
  10421. interval is hard-coded to
  10422. one hour.
  10423. </para>
  10424. <para>
  10425. <command>auto-dnssec create;</command> includes the
  10426. above, but also allows <command>named</command>
  10427. to create new keys in the key repository when needed.
  10428. (NOTE: This option is not yet implemented; the syntax is
  10429. being reserved for future use.)
  10430. </para>
  10431. <para>
  10432. The default setting is <command>auto-dnssec off</command>.
  10433. </para>
  10434. </listitem>
  10435. </varlistentry>
  10436. <varlistentry>
  10437. <term><command>multi-master</command></term>
  10438. <listitem>
  10439. <para>
  10440. See the description of <command>multi-master</command> in
  10441. <xref linkend="boolean_options"/>.
  10442. </para>
  10443. </listitem>
  10444. </varlistentry>
  10445. <varlistentry>
  10446. <term><command>masterfile-format</command></term>
  10447. <listitem>
  10448. <para>
  10449. See the description of <command>masterfile-format</command>
  10450. in <xref linkend="tuning"/>.
  10451. </para>
  10452. </listitem>
  10453. </varlistentry>
  10454. <varlistentry>
  10455. <term><command>dnssec-secure-to-insecure</command></term>
  10456. <listitem>
  10457. <para>
  10458. See the description of
  10459. <command>dnssec-secure-to-insecure</command> in <xref linkend="boolean_options"/>.
  10460. </para>
  10461. </listitem>
  10462. </varlistentry>
  10463. </variablelist>
  10464. </sect3>
  10465. <sect3 id="dynamic_update_policies">
  10466. <title>Dynamic Update Policies</title>
  10467. <para><acronym>BIND</acronym> 9 supports two alternative
  10468. methods of granting clients the right to perform
  10469. dynamic updates to a zone, configured by the
  10470. <command>allow-update</command> and
  10471. <command>update-policy</command> option, respectively.
  10472. </para>
  10473. <para>
  10474. The <command>allow-update</command> clause works the
  10475. same way as in previous versions of <acronym>BIND</acronym>.
  10476. It grants given clients the permission to update any
  10477. record of any name in the zone.
  10478. </para>
  10479. <para>
  10480. The <command>update-policy</command> clause
  10481. allows more fine-grained control over what updates are
  10482. allowed. A set of rules is specified, where each rule
  10483. either grants or denies permissions for one or more
  10484. names to be updated by one or more identities. If
  10485. the dynamic update request message is signed (that is,
  10486. it includes either a TSIG or SIG(0) record), the
  10487. identity of the signer can be determined.
  10488. </para>
  10489. <para>
  10490. Rules are specified in the <command>update-policy</command>
  10491. zone option, and are only meaningful for master zones.
  10492. When the <command>update-policy</command> statement
  10493. is present, it is a configuration error for the
  10494. <command>allow-update</command> statement to be
  10495. present. The <command>update-policy</command> statement
  10496. only examines the signer of a message; the source
  10497. address is not relevant.
  10498. </para>
  10499. <para>
  10500. There is a pre-defined <command>update-policy</command>
  10501. rule which can be switched on with the command
  10502. <command>update-policy local;</command>.
  10503. Switching on this rule in a zone causes
  10504. <command>named</command> to generate a TSIG session
  10505. key and place it in a file, and to allow that key
  10506. to update the zone. (By default, the file is
  10507. <filename>/var/run/named/session.key</filename>, the key
  10508. name is "local-ddns" and the key algorithm is HMAC-SHA256,
  10509. but these values are configurable with the
  10510. <command>session-keyfile</command>,
  10511. <command>session-keyname</command> and
  10512. <command>session-keyalg</command> options, respectively).
  10513. </para>
  10514. <para>
  10515. A client running on the local system, and with appropriate
  10516. permissions, may read that file and use the key to sign update
  10517. requests. The zone's update policy will be set to allow that
  10518. key to change any record within the zone. Assuming the
  10519. key name is "local-ddns", this policy is equivalent to:
  10520. </para>
  10521. <programlisting>update-policy { grant local-ddns zonesub any; };
  10522. </programlisting>
  10523. <para>
  10524. The command <command>nsupdate -l</command> sends update
  10525. requests to localhost, and signs them using the session key.
  10526. </para>
  10527. <para>
  10528. Other rule definitions look like this:
  10529. </para>
  10530. <programlisting>
  10531. ( <command>grant</command> | <command>deny</command> ) <replaceable>identity</replaceable> <replaceable>nametype</replaceable> <optional> <replaceable>name</replaceable> </optional> <optional> <replaceable>types</replaceable> </optional>
  10532. </programlisting>
  10533. <para>
  10534. Each rule grants or denies privileges. Once a message has
  10535. successfully matched a rule, the operation is immediately
  10536. granted or denied and no further rules are examined. A rule
  10537. is matched when the signer matches the identity field, the
  10538. name matches the name field in accordance with the nametype
  10539. field, and the type matches the types specified in the type
  10540. field.
  10541. </para>
  10542. <para>
  10543. No signer is required for <replaceable>tcp-self</replaceable>
  10544. or <replaceable>6to4-self</replaceable> however the standard
  10545. reverse mapping / prefix conversion must match the identity
  10546. field.
  10547. </para>
  10548. <para>
  10549. The identity field specifies a name or a wildcard
  10550. name. Normally, this is the name of the TSIG or
  10551. SIG(0) key used to sign the update request. When a
  10552. TKEY exchange has been used to create a shared secret,
  10553. the identity of the shared secret is the same as the
  10554. identity of the key used to authenticate the TKEY
  10555. exchange. TKEY is also the negotiation method used
  10556. by GSS-TSIG, which establishes an identity that is
  10557. the Kerberos principal of the client, such as
  10558. <userinput>"user@host.domain"</userinput>. When the
  10559. <replaceable>identity</replaceable> field specifies
  10560. a wildcard name, it is subject to DNS wildcard
  10561. expansion, so the rule will apply to multiple identities.
  10562. The <replaceable>identity</replaceable> field must
  10563. contain a fully-qualified domain name.
  10564. </para>
  10565. <para>
  10566. For nametypes <varname>krb5-self</varname>,
  10567. <varname>ms-self</varname>, <varname>krb5-subdomain</varname>,
  10568. and <varname>ms-subdomain</varname> the
  10569. <replaceable>identity</replaceable> field specifies
  10570. the Windows or Kerberos realm of the machine belongs to.
  10571. </para>
  10572. <para>
  10573. The <replaceable>nametype</replaceable> field has 13
  10574. values:
  10575. <varname>name</varname>, <varname>subdomain</varname>,
  10576. <varname>wildcard</varname>, <varname>self</varname>,
  10577. <varname>selfsub</varname>, <varname>selfwild</varname>,
  10578. <varname>krb5-self</varname>, <varname>ms-self</varname>,
  10579. <varname>krb5-subdomain</varname>,
  10580. <varname>ms-subdomain</varname>,
  10581. <varname>tcp-self</varname>, <varname>6to4-self</varname>,
  10582. <varname>zonesub</varname>, and <varname>external</varname>.
  10583. </para>
  10584. <informaltable>
  10585. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  10586. <colspec colname="1" colnum="1" colsep="0" colwidth="0.819in"/>
  10587. <colspec colname="2" colnum="2" colsep="0" colwidth="3.681in"/>
  10588. <tbody>
  10589. <row rowsep="0">
  10590. <entry colname="1">
  10591. <para>
  10592. <varname>name</varname>
  10593. </para>
  10594. </entry> <entry colname="2">
  10595. <para>
  10596. Exact-match semantics. This rule matches
  10597. when the name being updated is identical
  10598. to the contents of the
  10599. <replaceable>name</replaceable> field.
  10600. </para>
  10601. </entry>
  10602. </row>
  10603. <row rowsep="0">
  10604. <entry colname="1">
  10605. <para>
  10606. <varname>subdomain</varname>
  10607. </para>
  10608. </entry> <entry colname="2">
  10609. <para>
  10610. This rule matches when the name being updated
  10611. is a subdomain of, or identical to, the
  10612. contents of the <replaceable>name</replaceable>
  10613. field.
  10614. </para>
  10615. </entry>
  10616. </row>
  10617. <row rowsep="0">
  10618. <entry colname="1">
  10619. <para>
  10620. <varname>zonesub</varname>
  10621. </para>
  10622. </entry> <entry colname="2">
  10623. <para>
  10624. This rule is similar to subdomain, except that
  10625. it matches when the name being updated is a
  10626. subdomain of the zone in which the
  10627. <command>update-policy</command> statement
  10628. appears. This obviates the need to type the zone
  10629. name twice, and enables the use of a standard
  10630. <command>update-policy</command> statement in
  10631. multiple zones without modification.
  10632. </para>
  10633. <para>
  10634. When this rule is used, the
  10635. <replaceable>name</replaceable> field is omitted.
  10636. </para>
  10637. </entry>
  10638. </row>
  10639. <row rowsep="0">
  10640. <entry colname="1">
  10641. <para>
  10642. <varname>wildcard</varname>
  10643. </para>
  10644. </entry> <entry colname="2">
  10645. <para>
  10646. The <replaceable>name</replaceable> field
  10647. is subject to DNS wildcard expansion, and
  10648. this rule matches when the name being updated
  10649. name is a valid expansion of the wildcard.
  10650. </para>
  10651. </entry>
  10652. </row>
  10653. <row rowsep="0">
  10654. <entry colname="1">
  10655. <para>
  10656. <varname>self</varname>
  10657. </para>
  10658. </entry>
  10659. <entry colname="2">
  10660. <para>
  10661. This rule matches when the name being updated
  10662. matches the contents of the
  10663. <replaceable>identity</replaceable> field.
  10664. The <replaceable>name</replaceable> field
  10665. is ignored, but should be the same as the
  10666. <replaceable>identity</replaceable> field.
  10667. The <varname>self</varname> nametype is
  10668. most useful when allowing using one key per
  10669. name to update, where the key has the same
  10670. name as the name to be updated. The
  10671. <replaceable>identity</replaceable> would
  10672. be specified as <constant>*</constant> (an asterisk) in
  10673. this case.
  10674. </para>
  10675. </entry>
  10676. </row>
  10677. <row rowsep="0">
  10678. <entry colname="1">
  10679. <para>
  10680. <varname>selfsub</varname>
  10681. </para>
  10682. </entry> <entry colname="2">
  10683. <para>
  10684. This rule is similar to <varname>self</varname>
  10685. except that subdomains of <varname>self</varname>
  10686. can also be updated.
  10687. </para>
  10688. </entry>
  10689. </row>
  10690. <row rowsep="0">
  10691. <entry colname="1">
  10692. <para>
  10693. <varname>selfwild</varname>
  10694. </para>
  10695. </entry> <entry colname="2">
  10696. <para>
  10697. This rule is similar to <varname>self</varname>
  10698. except that only subdomains of
  10699. <varname>self</varname> can be updated.
  10700. </para>
  10701. </entry>
  10702. </row>
  10703. <row rowsep="0">
  10704. <entry colname="1">
  10705. <para>
  10706. <varname>ms-self</varname>
  10707. </para>
  10708. </entry> <entry colname="2">
  10709. <para>
  10710. This rule takes a Windows machine principal
  10711. (machine$@REALM) for machine in REALM and
  10712. and converts it machine.realm allowing the machine
  10713. to update machine.realm. The REALM to be matched
  10714. is specified in the <replacable>identity</replacable>
  10715. field.
  10716. </para>
  10717. </entry>
  10718. </row>
  10719. <row rowsep="0">
  10720. <entry colname="1">
  10721. <para>
  10722. <varname>ms-subdomain</varname>
  10723. </para>
  10724. </entry> <entry colname="2">
  10725. <para>
  10726. This rule takes a Windows machine principal
  10727. (machine$@REALM) for machine in REALM and
  10728. converts it to machine.realm allowing the machine
  10729. to update subdomains of machine.realm. The REALM
  10730. to be matched is specified in the
  10731. <replacable>identity</replacable> field.
  10732. </para>
  10733. </entry>
  10734. </row>
  10735. <row rowsep="0">
  10736. <entry colname="1">
  10737. <para>
  10738. <varname>krb5-self</varname>
  10739. </para>
  10740. </entry> <entry colname="2">
  10741. <para>
  10742. This rule takes a Kerberos machine principal
  10743. (host/machine@REALM) for machine in REALM and
  10744. and converts it machine.realm allowing the machine
  10745. to update machine.realm. The REALM to be matched
  10746. is specified in the <replacable>identity</replacable>
  10747. field.
  10748. </para>
  10749. </entry>
  10750. </row>
  10751. <row rowsep="0">
  10752. <entry colname="1">
  10753. <para>
  10754. <varname>krb5-subdomain</varname>
  10755. </para>
  10756. </entry> <entry colname="2">
  10757. <para>
  10758. This rule takes a Kerberos machine principal
  10759. (host/machine@REALM) for machine in REALM and
  10760. converts it to machine.realm allowing the machine
  10761. to update subdomains of machine.realm. The REALM
  10762. to be matched is specified in the
  10763. <replacable>identity</replacable> field.
  10764. </para>
  10765. </entry>
  10766. </row>
  10767. <row rowsep="0">
  10768. <entry colname="1">
  10769. <para>
  10770. <varname>tcp-self</varname>
  10771. </para>
  10772. </entry> <entry colname="2">
  10773. <para>
  10774. Allow updates that have been sent via TCP and
  10775. for which the standard mapping from the initiating
  10776. IP address into the IN-ADDR.ARPA and IP6.ARPA
  10777. namespaces match the name to be updated.
  10778. </para>
  10779. <note>
  10780. It is theoretically possible to spoof these TCP
  10781. sessions.
  10782. </note>
  10783. </entry>
  10784. </row>
  10785. <row rowsep="0">
  10786. <entry colname="1">
  10787. <para>
  10788. <varname>6to4-self</varname>
  10789. </para>
  10790. </entry> <entry colname="2">
  10791. <para>
  10792. Allow the 6to4 prefix to be update by any TCP
  10793. connection from the 6to4 network or from the
  10794. corresponding IPv4 address. This is intended
  10795. to allow NS or DNAME RRsets to be added to the
  10796. reverse tree.
  10797. </para>
  10798. <note>
  10799. It is theoretically possible to spoof these TCP
  10800. sessions.
  10801. </note>
  10802. </entry>
  10803. </row>
  10804. <row rowsep="0">
  10805. <entry colname="1">
  10806. <para>
  10807. <varname>external</varname>
  10808. </para>
  10809. </entry> <entry colname="2">
  10810. <para>
  10811. This rule allows <command>named</command>
  10812. to defer the decision of whether to allow a
  10813. given update to an external daemon.
  10814. </para>
  10815. <para>
  10816. The method of communicating with the daemon is
  10817. specified in the <replaceable>identity</replaceable>
  10818. field, the format of which is
  10819. "<constant>local:</constant><replaceable>path</replaceable>",
  10820. where <replaceable>path</replaceable> is the location
  10821. of a UNIX-domain socket. (Currently, "local" is the
  10822. only supported mechanism.)
  10823. </para>
  10824. <para>
  10825. Requests to the external daemon are sent over the
  10826. UNIX-domain socket as datagrams with the following
  10827. format:
  10828. </para>
  10829. <programlisting>
  10830. Protocol version number (4 bytes, network byte order, currently 1)
  10831. Request length (4 bytes, network byte order)
  10832. Signer (null-terminated string)
  10833. Name (null-terminated string)
  10834. TCP source address (null-terminated string)
  10835. Rdata type (null-terminated string)
  10836. Key (null-terminated string)
  10837. TKEY token length (4 bytes, network byte order)
  10838. TKEY token (remainder of packet)</programlisting>
  10839. <para>
  10840. The daemon replies with a four-byte value in
  10841. network byte order, containing either 0 or 1; 0
  10842. indicates that the specified update is not
  10843. permitted, and 1 indicates that it is.
  10844. </para>
  10845. </entry>
  10846. </row>
  10847. </tbody>
  10848. </tgroup>
  10849. </informaltable>
  10850. <para>
  10851. In all cases, the <replaceable>name</replaceable>
  10852. field must specify a fully-qualified domain name.
  10853. </para>
  10854. <para>
  10855. If no types are explicitly specified, this rule matches
  10856. all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
  10857. may be specified by name, including "ANY" (ANY matches
  10858. all types except NSEC and NSEC3, which can never be
  10859. updated). Note that when an attempt is made to delete
  10860. all records associated with a name, the rules are
  10861. checked for each existing record type.
  10862. </para>
  10863. </sect3>
  10864. </sect2>
  10865. </sect1>
  10866. <sect1>
  10867. <title>Zone File</title>
  10868. <sect2 id="types_of_resource_records_and_when_to_use_them">
  10869. <title>Types of Resource Records and When to Use Them</title>
  10870. <para>
  10871. This section, largely borrowed from RFC 1034, describes the
  10872. concept of a Resource Record (RR) and explains when each is used.
  10873. Since the publication of RFC 1034, several new RRs have been
  10874. identified
  10875. and implemented in the DNS. These are also included.
  10876. </para>
  10877. <sect3>
  10878. <title>Resource Records</title>
  10879. <para>
  10880. A domain name identifies a node. Each node has a set of
  10881. resource information, which may be empty. The set of resource
  10882. information associated with a particular name is composed of
  10883. separate RRs. The order of RRs in a set is not significant and
  10884. need not be preserved by name servers, resolvers, or other
  10885. parts of the DNS. However, sorting of multiple RRs is
  10886. permitted for optimization purposes, for example, to specify
  10887. that a particular nearby server be tried first. See <xref linkend="the_sortlist_statement"/> and <xref linkend="rrset_ordering"/>.
  10888. </para>
  10889. <para>
  10890. The components of a Resource Record are:
  10891. </para>
  10892. <informaltable colsep="0" rowsep="0">
  10893. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  10894. <colspec colname="1" colnum="1" colsep="0" colwidth="1.000in"/>
  10895. <colspec colname="2" colnum="2" colsep="0" colwidth="3.500in"/>
  10896. <tbody>
  10897. <row rowsep="0">
  10898. <entry colname="1">
  10899. <para>
  10900. owner name
  10901. </para>
  10902. </entry>
  10903. <entry colname="2">
  10904. <para>
  10905. The domain name where the RR is found.
  10906. </para>
  10907. </entry>
  10908. </row>
  10909. <row rowsep="0">
  10910. <entry colname="1">
  10911. <para>
  10912. type
  10913. </para>
  10914. </entry>
  10915. <entry colname="2">
  10916. <para>
  10917. An encoded 16-bit value that specifies
  10918. the type of the resource record.
  10919. </para>
  10920. </entry>
  10921. </row>
  10922. <row rowsep="0">
  10923. <entry colname="1">
  10924. <para>
  10925. TTL
  10926. </para>
  10927. </entry>
  10928. <entry colname="2">
  10929. <para>
  10930. The time-to-live of the RR. This field
  10931. is a 32-bit integer in units of seconds, and is
  10932. primarily used by
  10933. resolvers when they cache RRs. The TTL describes how
  10934. long a RR can
  10935. be cached before it should be discarded.
  10936. </para>
  10937. </entry>
  10938. </row>
  10939. <row rowsep="0">
  10940. <entry colname="1">
  10941. <para>
  10942. class
  10943. </para>
  10944. </entry>
  10945. <entry colname="2">
  10946. <para>
  10947. An encoded 16-bit value that identifies
  10948. a protocol family or instance of a protocol.
  10949. </para>
  10950. </entry>
  10951. </row>
  10952. <row rowsep="0">
  10953. <entry colname="1">
  10954. <para>
  10955. RDATA
  10956. </para>
  10957. </entry>
  10958. <entry colname="2">
  10959. <para>
  10960. The resource data. The format of the
  10961. data is type (and sometimes class) specific.
  10962. </para>
  10963. </entry>
  10964. </row>
  10965. </tbody>
  10966. </tgroup>
  10967. </informaltable>
  10968. <para>
  10969. The following are <emphasis>types</emphasis> of valid RRs:
  10970. </para>
  10971. <informaltable colsep="0" rowsep="0">
  10972. <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
  10973. <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
  10974. <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
  10975. <tbody>
  10976. <row rowsep="0">
  10977. <entry colname="1">
  10978. <para>
  10979. A
  10980. </para>
  10981. </entry>
  10982. <entry colname="2">
  10983. <para>
  10984. A host address. In the IN class, this is a
  10985. 32-bit IP address. Described in RFC 1035.
  10986. </para>
  10987. </entry>
  10988. </row>
  10989. <row rowsep="0">
  10990. <entry colname="1">
  10991. <para>
  10992. AAAA
  10993. </para>
  10994. </entry>
  10995. <entry colname="2">
  10996. <para>
  10997. IPv6 address. Described in RFC 1886.
  10998. </para>
  10999. </entry>
  11000. </row>
  11001. <row rowsep="0">
  11002. <entry colname="1">
  11003. <para>
  11004. A6
  11005. </para>
  11006. </entry>
  11007. <entry colname="2">
  11008. <para>
  11009. IPv6 address. This can be a partial
  11010. address (a suffix) and an indirection to the name
  11011. where the rest of the
  11012. address (the prefix) can be found. Experimental.
  11013. Described in RFC 2874.
  11014. </para>
  11015. </entry>
  11016. </row>
  11017. <row rowsep="0">
  11018. <entry colname="1">
  11019. <para>
  11020. AFSDB
  11021. </para>
  11022. </entry>
  11023. <entry colname="2">
  11024. <para>
  11025. Location of AFS database servers.
  11026. Experimental. Described in RFC 1183.
  11027. </para>
  11028. </entry>
  11029. </row>
  11030. <row rowsep="0">
  11031. <entry colname="1">
  11032. <para>
  11033. APL
  11034. </para>
  11035. </entry>
  11036. <entry colname="2">
  11037. <para>
  11038. Address prefix list. Experimental.
  11039. Described in RFC 3123.
  11040. </para>
  11041. </entry>
  11042. </row>
  11043. <row rowsep="0">
  11044. <entry colname="1">
  11045. <para>
  11046. CERT
  11047. </para>
  11048. </entry>
  11049. <entry colname="2">
  11050. <para>
  11051. Holds a digital certificate.
  11052. Described in RFC 2538.
  11053. </para>
  11054. </entry>
  11055. </row>
  11056. <row rowsep="0">
  11057. <entry colname="1">
  11058. <para>
  11059. CNAME
  11060. </para>
  11061. </entry>
  11062. <entry colname="2">
  11063. <para>
  11064. Identifies the canonical name of an alias.
  11065. Described in RFC 1035.
  11066. </para>
  11067. </entry>
  11068. </row>
  11069. <row rowsep="0">
  11070. <entry colname="1">
  11071. <para>
  11072. DHCID
  11073. </para>
  11074. </entry>
  11075. <entry colname="2">
  11076. <para>
  11077. Is used for identifying which DHCP client is
  11078. associated with this name. Described in RFC 4701.
  11079. </para>
  11080. </entry>
  11081. </row>
  11082. <row rowsep="0">
  11083. <entry colname="1">
  11084. <para>
  11085. DNAME
  11086. </para>
  11087. </entry>
  11088. <entry colname="2">
  11089. <para>
  11090. Replaces the domain name specified with
  11091. another name to be looked up, effectively aliasing an
  11092. entire
  11093. subtree of the domain name space rather than a single
  11094. record
  11095. as in the case of the CNAME RR.
  11096. Described in RFC 2672.
  11097. </para>
  11098. </entry>
  11099. </row>
  11100. <row rowsep="0">
  11101. <entry colname="1">
  11102. <para>
  11103. DNSKEY
  11104. </para>
  11105. </entry>
  11106. <entry colname="2">
  11107. <para>
  11108. Stores a public key associated with a signed
  11109. DNS zone. Described in RFC 4034.
  11110. </para>
  11111. </entry>
  11112. </row>
  11113. <row rowsep="0">
  11114. <entry colname="1">
  11115. <para>
  11116. DS
  11117. </para>
  11118. </entry>
  11119. <entry colname="2">
  11120. <para>
  11121. Stores the hash of a public key associated with a
  11122. signed DNS zone. Described in RFC 4034.
  11123. </para>
  11124. </entry>
  11125. </row>
  11126. <row rowsep="0">
  11127. <entry colname="1">
  11128. <para>
  11129. GPOS
  11130. </para>
  11131. </entry>
  11132. <entry colname="2">
  11133. <para>
  11134. Specifies the global position. Superseded by LOC.
  11135. </para>
  11136. </entry>
  11137. </row>
  11138. <row rowsep="0">
  11139. <entry colname="1">
  11140. <para>
  11141. HINFO
  11142. </para>
  11143. </entry>
  11144. <entry colname="2">
  11145. <para>
  11146. Identifies the CPU and OS used by a host.
  11147. Described in RFC 1035.
  11148. </para>
  11149. </entry>
  11150. </row>
  11151. <row rowsep="0">
  11152. <entry colname="1">
  11153. <para>
  11154. IPSECKEY
  11155. </para>
  11156. </entry>
  11157. <entry colname="2">
  11158. <para>
  11159. Provides a method for storing IPsec keying material in
  11160. DNS. Described in RFC 4025.
  11161. </para>
  11162. </entry>
  11163. </row>
  11164. <row rowsep="0">
  11165. <entry colname="1">
  11166. <para>
  11167. ISDN
  11168. </para>
  11169. </entry>
  11170. <entry colname="2">
  11171. <para>
  11172. Representation of ISDN addresses.
  11173. Experimental. Described in RFC 1183.
  11174. </para>
  11175. </entry>
  11176. </row>
  11177. <row rowsep="0">
  11178. <entry colname="1">
  11179. <para>
  11180. KEY
  11181. </para>
  11182. </entry>
  11183. <entry colname="2">
  11184. <para>
  11185. Stores a public key associated with a
  11186. DNS name. Used in original DNSSEC; replaced
  11187. by DNSKEY in DNSSECbis, but still used with
  11188. SIG(0). Described in RFCs 2535 and 2931.
  11189. </para>
  11190. </entry>
  11191. </row>
  11192. <row rowsep="0">
  11193. <entry colname="1">
  11194. <para>
  11195. KX
  11196. </para>
  11197. </entry>
  11198. <entry colname="2">
  11199. <para>
  11200. Identifies a key exchanger for this
  11201. DNS name. Described in RFC 2230.
  11202. </para>
  11203. </entry>
  11204. </row>
  11205. <row rowsep="0">
  11206. <entry colname="1">
  11207. <para>
  11208. LOC