]> CyberLeo.Net >> Repos - FreeBSD/releng/9.3.git/blob - contrib/bind9/doc/arm/Bv9ARM.ch04.html
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
[FreeBSD/releng/9.3.git] / contrib / bind9 / doc / arm / Bv9ARM.ch04.html
1 <!--
2  - Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and/or distribute this software for any
6  - purpose with or without fee is hereby granted, provided that the above
7  - copyright notice and this permission notice appear in all copies.
8  - 
9  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  - PERFORMANCE OF THIS SOFTWARE.
16 -->
17 <!-- $Id$ -->
18 <html>
19 <head>
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>Chapter 4. Advanced DNS Features</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23 <link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
24 <link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
25 <link rel="prev" href="Bv9ARM.ch03.html" title="Chapter 3. Name Server Configuration">
26 <link rel="next" href="Bv9ARM.ch05.html" title="Chapter 5. The BIND 9 Lightweight Resolver">
27 </head>
28 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29 <div class="navheader">
30 <table width="100%" summary="Navigation header">
31 <tr><th colspan="3" align="center">Chapter 4. Advanced DNS Features</th></tr>
32 <tr>
33 <td width="20%" align="left">
34 <a accesskey="p" href="Bv9ARM.ch03.html">Prev</a> </td>
35 <th width="60%" align="center"> </th>
36 <td width="20%" align="right"> <a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
37 </td>
38 </tr>
39 </table>
40 <hr>
41 </div>
42 <div class="chapter" lang="en">
43 <div class="titlepage"><div><div><h2 class="title">
44 <a name="Bv9ARM.ch04"></a>Chapter 4. Advanced DNS Features</h2></div></div></div>
45 <div class="toc">
46 <p><b>Table of Contents</b></p>
47 <dl>
48 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#notify">Notify</a></span></dt>
49 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#dynamic_update">Dynamic Update</a></span></dt>
50 <dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#journal">The journal file</a></span></dt></dl></dd>
51 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#incremental_zone_transfers">Incremental Zone Transfers (IXFR)</a></span></dt>
52 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2563997">Split DNS</a></span></dt>
53 <dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2564016">Example split DNS setup</a></span></dt></dl></dd>
54 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#tsig">TSIG</a></span></dt>
55 <dd><dl>
56 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570661">Generate Shared Keys for Each Pair of Hosts</a></span></dt>
57 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570734">Copying the Shared Secret to Both Machines</a></span></dt>
58 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570745">Informing the Servers of the Key's Existence</a></span></dt>
59 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570781">Instructing the Server to Use the Key</a></span></dt>
60 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570839">TSIG Key Based Access Control</a></span></dt>
61 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570888">Errors</a></span></dt>
62 </dl></dd>
63 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2570902">TKEY</a></span></dt>
64 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2570951">SIG(0)</a></span></dt>
65 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#DNSSEC">DNSSEC</a></span></dt>
66 <dd><dl>
67 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571156">Generating Keys</a></span></dt>
68 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571235">Signing the Zone</a></span></dt>
69 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571384">Configuring Servers</a></span></dt>
70 </dl></dd>
71 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#dnssec.dynamic.zones">DNSSEC, Dynamic Zones, and Automatic Signing</a></span></dt>
72 <dd><dl>
73 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2609113">Converting from insecure to secure</a></span></dt>
74 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2609150">Dynamic DNS update method</a></span></dt>
75 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563516">Fully automatic zone signing</a></span></dt>
76 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563756">Private-type records</a></span></dt>
77 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563794">DNSKEY rollovers</a></span></dt>
78 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563806">Dynamic DNS update method</a></span></dt>
79 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569779">Automatic key rollovers</a></span></dt>
80 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569805">NSEC3PARAM rollovers via UPDATE</a></span></dt>
81 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569815">Converting from NSEC to NSEC3</a></span></dt>
82 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569825">Converting from NSEC3 to NSEC</a></span></dt>
83 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569837">Converting from secure to insecure</a></span></dt>
84 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569875">Periodic re-signing</a></span></dt>
85 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2569884">NSEC3 and OPTOUT</a></span></dt>
86 </dl></dd>
87 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#rfc5011.support">Dynamic Trust Anchor Management</a></span></dt>
88 <dd><dl>
89 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608556">Validating Resolver</a></span></dt>
90 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608579">Authoritative Server</a></span></dt>
91 </dl></dd>
92 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#pkcs11">PKCS #11 (Cryptoki) support</a></span></dt>
93 <dd><dl>
94 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2609024">Prerequisites</a></span></dt>
95 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2636218">Building BIND 9 with PKCS#11</a></span></dt>
96 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2636343">PKCS #11 Tools</a></span></dt>
97 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2636374">Using the HSM</a></span></dt>
98 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2636572">Specifying the engine on the command line</a></span></dt>
99 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2636686">Running named with automatic zone re-signing</a></span></dt>
100 </dl></dd>
101 <dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571672">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
102 <dd><dl>
103 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571802">Address Lookups Using AAAA Records</a></span></dt>
104 <dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571892">Address to Name Lookups Using Nibble Format</a></span></dt>
105 </dl></dd>
106 </dl>
107 </div>
108 <div class="sect1" lang="en">
109 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
110 <a name="notify"></a>Notify</h2></div></div></div>
111 <p>
112         <acronym class="acronym">DNS</acronym> NOTIFY is a mechanism that allows master
113         servers to notify their slave servers of changes to a zone's data. In
114         response to a <span><strong class="command">NOTIFY</strong></span> from a master server, the
115         slave will check to see that its version of the zone is the
116         current version and, if not, initiate a zone transfer.
117       </p>
118 <p>
119         For more information about <acronym class="acronym">DNS</acronym>
120         <span><strong class="command">NOTIFY</strong></span>, see the description of the
121         <span><strong class="command">notify</strong></span> option in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a> and
122         the description of the zone option <span><strong class="command">also-notify</strong></span> in
123         <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.  The <span><strong class="command">NOTIFY</strong></span>
124         protocol is specified in RFC 1996.
125       </p>
126 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
127 <h3 class="title">Note</h3>
128         As a slave zone can also be a master to other slaves, <span><strong class="command">named</strong></span>,
129         by default, sends <span><strong class="command">NOTIFY</strong></span> messages for every zone
130         it loads.  Specifying <span><strong class="command">notify master-only;</strong></span> will
131         cause <span><strong class="command">named</strong></span> to only send <span><strong class="command">NOTIFY</strong></span> for master
132         zones that it loads.
133       </div>
134 </div>
135 <div class="sect1" lang="en">
136 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
137 <a name="dynamic_update"></a>Dynamic Update</h2></div></div></div>
138 <p>
139         Dynamic Update is a method for adding, replacing or deleting
140         records in a master server by sending it a special form of DNS
141         messages.  The format and meaning of these messages is specified
142         in RFC 2136.
143       </p>
144 <p>
145         Dynamic update is enabled by including an
146         <span><strong class="command">allow-update</strong></span> or an <span><strong class="command">update-policy</strong></span>
147         clause in the <span><strong class="command">zone</strong></span> statement.
148       </p>
149 <p>
150         If the zone's <span><strong class="command">update-policy</strong></span> is set to
151         <strong class="userinput"><code>local</code></strong>, updates to the zone
152         will be permitted for the key <code class="varname">local-ddns</code>,
153         which will be generated by <span><strong class="command">named</strong></span> at startup.
154         See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a> for more details.
155       </p>
156 <p>
157         Dynamic updates using Kerberos signed requests can be made
158         using the TKEY/GSS protocol by setting either the
159         <span><strong class="command">tkey-gssapi-keytab</strong></span> option, or alternatively
160         by setting both the <span><strong class="command">tkey-gssapi-credential</strong></span>
161         and <span><strong class="command">tkey-domain</strong></span> options. Once enabled,
162         Kerberos signed requests will be matched against the update
163         policies for the zone, using the Kerberos principal as the
164         signer for the request.
165       </p>
166 <p>
167         Updating of secure zones (zones using DNSSEC) follows RFC
168         3007: RRSIG, NSEC and NSEC3 records affected by updates are
169         automatically regenerated by the server using an online
170         zone key.  Update authorization is based on transaction
171         signatures and an explicit server policy.
172       </p>
173 <div class="sect2" lang="en">
174 <div class="titlepage"><div><div><h3 class="title">
175 <a name="journal"></a>The journal file</h3></div></div></div>
176 <p>
177           All changes made to a zone using dynamic update are stored
178           in the zone's journal file.  This file is automatically created
179           by the server when the first dynamic update takes place.
180           The name of the journal file is formed by appending the extension
181           <code class="filename">.jnl</code> to the name of the
182           corresponding zone
183           file unless specifically overridden.  The journal file is in a
184           binary format and should not be edited manually.
185         </p>
186 <p>
187           The server will also occasionally write ("dump")
188           the complete contents of the updated zone to its zone file.
189           This is not done immediately after
190           each dynamic update, because that would be too slow when a large
191           zone is updated frequently.  Instead, the dump is delayed by
192           up to 15 minutes, allowing additional updates to take place.
193           During the dump process, transient files will be created
194           with the extensions <code class="filename">.jnw</code> and
195           <code class="filename">.jbk</code>; under ordinary circumstances, these
196           will be removed when the dump is complete, and can be safely
197           ignored.
198         </p>
199 <p>
200           When a server is restarted after a shutdown or crash, it will replay
201               the journal file to incorporate into the zone any updates that
202           took
203           place after the last zone dump.
204         </p>
205 <p>
206           Changes that result from incoming incremental zone transfers are
207           also
208           journalled in a similar way.
209         </p>
210 <p>
211           The zone files of dynamic zones cannot normally be edited by
212           hand because they are not guaranteed to contain the most recent
213           dynamic changes &#8212; those are only in the journal file.
214           The only way to ensure that the zone file of a dynamic zone
215           is up to date is to run <span><strong class="command">rndc stop</strong></span>.
216         </p>
217 <p>
218           If you have to make changes to a dynamic zone
219           manually, the following procedure will work: Disable dynamic updates
220               to the zone using
221           <span><strong class="command">rndc freeze <em class="replaceable"><code>zone</code></em></strong></span>.
222           This will also remove the zone's <code class="filename">.jnl</code> file
223           and update the master file.  Edit the zone file.  Run
224           <span><strong class="command">rndc thaw <em class="replaceable"><code>zone</code></em></strong></span>
225           to reload the changed zone and re-enable dynamic updates.
226         </p>
227 </div>
228 </div>
229 <div class="sect1" lang="en">
230 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
231 <a name="incremental_zone_transfers"></a>Incremental Zone Transfers (IXFR)</h2></div></div></div>
232 <p>
233         The incremental zone transfer (IXFR) protocol is a way for
234         slave servers to transfer only changed data, instead of having to
235         transfer the entire zone. The IXFR protocol is specified in RFC
236         1995. See <a href="Bv9ARM.ch09.html#proposed_standards">Proposed Standards</a>.
237       </p>
238 <p>
239         When acting as a master, <acronym class="acronym">BIND</acronym> 9
240         supports IXFR for those zones
241         where the necessary change history information is available. These
242         include master zones maintained by dynamic update and slave zones
243         whose data was obtained by IXFR.  For manually maintained master
244         zones, and for slave zones obtained by performing a full zone
245         transfer (AXFR), IXFR is supported only if the option
246         <span><strong class="command">ixfr-from-differences</strong></span> is set
247         to <strong class="userinput"><code>yes</code></strong>.
248       </p>
249 <p>
250         When acting as a slave, <acronym class="acronym">BIND</acronym> 9 will
251         attempt to use IXFR unless
252         it is explicitly disabled. For more information about disabling
253         IXFR, see the description of the <span><strong class="command">request-ixfr</strong></span> clause
254         of the <span><strong class="command">server</strong></span> statement.
255       </p>
256 </div>
257 <div class="sect1" lang="en">
258 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
259 <a name="id2563997"></a>Split DNS</h2></div></div></div>
260 <p>
261         Setting up different views, or visibility, of the DNS space to
262         internal and external resolvers is usually referred to as a
263         <span class="emphasis"><em>Split DNS</em></span> setup. There are several
264         reasons an organization would want to set up its DNS this way.
265       </p>
266 <p>
267         One common reason for setting up a DNS system this way is
268         to hide "internal" DNS information from "external" clients on the
269         Internet. There is some debate as to whether or not this is actually
270         useful.
271         Internal DNS information leaks out in many ways (via email headers,
272         for example) and most savvy "attackers" can find the information
273         they need using other means.
274         However, since listing addresses of internal servers that
275         external clients cannot possibly reach can result in
276         connection delays and other annoyances, an organization may
277         choose to use a Split DNS to present a consistent view of itself
278         to the outside world.
279       </p>
280 <p>
281         Another common reason for setting up a Split DNS system is
282         to allow internal networks that are behind filters or in RFC 1918
283         space (reserved IP space, as documented in RFC 1918) to resolve DNS
284         on the Internet. Split DNS can also be used to allow mail from outside
285         back in to the internal network.
286       </p>
287 <div class="sect2" lang="en">
288 <div class="titlepage"><div><div><h3 class="title">
289 <a name="id2564016"></a>Example split DNS setup</h3></div></div></div>
290 <p>
291         Let's say a company named <span class="emphasis"><em>Example, Inc.</em></span>
292         (<code class="literal">example.com</code>)
293         has several corporate sites that have an internal network with
294         reserved
295         Internet Protocol (IP) space and an external demilitarized zone (DMZ),
296         or "outside" section of a network, that is available to the public.
297       </p>
298 <p>
299         <span class="emphasis"><em>Example, Inc.</em></span> wants its internal clients
300         to be able to resolve external hostnames and to exchange mail with
301         people on the outside. The company also wants its internal resolvers
302         to have access to certain internal-only zones that are not available
303         at all outside of the internal network.
304       </p>
305 <p>
306         In order to accomplish this, the company will set up two sets
307         of name servers. One set will be on the inside network (in the
308         reserved
309         IP space) and the other set will be on bastion hosts, which are
310         "proxy"
311         hosts that can talk to both sides of its network, in the DMZ.
312       </p>
313 <p>
314         The internal servers will be configured to forward all queries,
315         except queries for <code class="filename">site1.internal</code>, <code class="filename">site2.internal</code>, <code class="filename">site1.example.com</code>,
316         and <code class="filename">site2.example.com</code>, to the servers
317         in the
318         DMZ. These internal servers will have complete sets of information
319         for <code class="filename">site1.example.com</code>, <code class="filename">site2.example.com</code>, <code class="filename">site1.internal</code>,
320         and <code class="filename">site2.internal</code>.
321       </p>
322 <p>
323         To protect the <code class="filename">site1.internal</code> and <code class="filename">site2.internal</code> domains,
324         the internal name servers must be configured to disallow all queries
325         to these domains from any external hosts, including the bastion
326         hosts.
327       </p>
328 <p>
329         The external servers, which are on the bastion hosts, will
330         be configured to serve the "public" version of the <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones.
331         This could include things such as the host records for public servers
332         (<code class="filename">www.example.com</code> and <code class="filename">ftp.example.com</code>),
333         and mail exchange (MX)  records (<code class="filename">a.mx.example.com</code> and <code class="filename">b.mx.example.com</code>).
334       </p>
335 <p>
336         In addition, the public <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones
337         should have special MX records that contain wildcard (`*') records
338         pointing to the bastion hosts. This is needed because external mail
339         servers do not have any other way of looking up how to deliver mail
340         to those internal hosts. With the wildcard records, the mail will
341         be delivered to the bastion host, which can then forward it on to
342         internal hosts.
343       </p>
344 <p>
345         Here's an example of a wildcard MX record:
346       </p>
347 <pre class="programlisting">*   IN MX 10 external1.example.com.</pre>
348 <p>
349         Now that they accept mail on behalf of anything in the internal
350         network, the bastion hosts will need to know how to deliver mail
351         to internal hosts. In order for this to work properly, the resolvers
352         on
353         the bastion hosts will need to be configured to point to the internal
354         name servers for DNS resolution.
355       </p>
356 <p>
357         Queries for internal hostnames will be answered by the internal
358         servers, and queries for external hostnames will be forwarded back
359         out to the DNS servers on the bastion hosts.
360       </p>
361 <p>
362         In order for all this to work properly, internal clients will
363         need to be configured to query <span class="emphasis"><em>only</em></span> the internal
364         name servers for DNS queries. This could also be enforced via
365         selective
366         filtering on the network.
367       </p>
368 <p>
369         If everything has been set properly, <span class="emphasis"><em>Example, Inc.</em></span>'s
370         internal clients will now be able to:
371       </p>
372 <div class="itemizedlist"><ul type="disc">
373 <li>
374             Look up any hostnames in the <code class="literal">site1</code>
375             and
376             <code class="literal">site2.example.com</code> zones.
377           </li>
378 <li>
379             Look up any hostnames in the <code class="literal">site1.internal</code> and
380             <code class="literal">site2.internal</code> domains.
381           </li>
382 <li>Look up any hostnames on the Internet.</li>
383 <li>Exchange mail with both internal and external people.</li>
384 </ul></div>
385 <p>
386         Hosts on the Internet will be able to:
387       </p>
388 <div class="itemizedlist"><ul type="disc">
389 <li>
390             Look up any hostnames in the <code class="literal">site1</code>
391             and
392             <code class="literal">site2.example.com</code> zones.
393           </li>
394 <li>
395             Exchange mail with anyone in the <code class="literal">site1</code> and
396             <code class="literal">site2.example.com</code> zones.
397           </li>
398 </ul></div>
399 <p>
400         Here is an example configuration for the setup we just
401         described above. Note that this is only configuration information;
402         for information on how to configure your zone files, see <a href="Bv9ARM.ch03.html#sample_configuration" title="Sample Configurations">the section called &#8220;Sample Configurations&#8221;</a>.
403       </p>
404 <p>
405         Internal DNS server config:
406       </p>
407 <pre class="programlisting">
408
409 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
410
411 acl externals { <code class="varname">bastion-ips-go-here</code>; };
412
413 options {
414     ...
415     ...
416     forward only;
417     // forward to external servers
418     forwarders {
419         <code class="varname">bastion-ips-go-here</code>;
420     };
421     // sample allow-transfer (no one)
422     allow-transfer { none; };
423     // restrict query access
424     allow-query { internals; externals; };
425     // restrict recursion
426     allow-recursion { internals; };
427     ...
428     ...
429 };
430
431 // sample master zone
432 zone "site1.example.com" {
433   type master;
434   file "m/site1.example.com";
435   // do normal iterative resolution (do not forward)
436   forwarders { };
437   allow-query { internals; externals; };
438   allow-transfer { internals; };
439 };
440
441 // sample slave zone
442 zone "site2.example.com" {
443   type slave;
444   file "s/site2.example.com";
445   masters { 172.16.72.3; };
446   forwarders { };
447   allow-query { internals; externals; };
448   allow-transfer { internals; };
449 };
450
451 zone "site1.internal" {
452   type master;
453   file "m/site1.internal";
454   forwarders { };
455   allow-query { internals; };
456   allow-transfer { internals; }
457 };
458
459 zone "site2.internal" {
460   type slave;
461   file "s/site2.internal";
462   masters { 172.16.72.3; };
463   forwarders { };
464   allow-query { internals };
465   allow-transfer { internals; }
466 };
467 </pre>
468 <p>
469         External (bastion host) DNS server config:
470       </p>
471 <pre class="programlisting">
472 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
473
474 acl externals { bastion-ips-go-here; };
475
476 options {
477   ...
478   ...
479   // sample allow-transfer (no one)
480   allow-transfer { none; };
481   // default query access
482   allow-query { any; };
483   // restrict cache access
484   allow-query-cache { internals; externals; };
485   // restrict recursion
486   allow-recursion { internals; externals; };
487   ...
488   ...
489 };
490
491 // sample slave zone
492 zone "site1.example.com" {
493   type master;
494   file "m/site1.foo.com";
495   allow-transfer { internals; externals; };
496 };
497
498 zone "site2.example.com" {
499   type slave;
500   file "s/site2.foo.com";
501   masters { another_bastion_host_maybe; };
502   allow-transfer { internals; externals; }
503 };
504 </pre>
505 <p>
506         In the <code class="filename">resolv.conf</code> (or equivalent) on
507         the bastion host(s):
508       </p>
509 <pre class="programlisting">
510 search ...
511 nameserver 172.16.72.2
512 nameserver 172.16.72.3
513 nameserver 172.16.72.4
514 </pre>
515 </div>
516 </div>
517 <div class="sect1" lang="en">
518 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
519 <a name="tsig"></a>TSIG</h2></div></div></div>
520 <p>
521         This is a short guide to setting up Transaction SIGnatures
522         (TSIG) based transaction security in <acronym class="acronym">BIND</acronym>. It describes changes
523         to the configuration file as well as what changes are required for
524         different features, including the process of creating transaction
525         keys and using transaction signatures with <acronym class="acronym">BIND</acronym>.
526       </p>
527 <p>
528         <acronym class="acronym">BIND</acronym> primarily supports TSIG for server
529         to server communication.
530         This includes zone transfer, notify, and recursive query messages.
531         Resolvers based on newer versions of <acronym class="acronym">BIND</acronym> 8 have limited support
532         for TSIG.
533       </p>
534 <p>
535         TSIG can also be useful for dynamic update. A primary
536         server for a dynamic zone should control access to the dynamic
537         update service, but IP-based access control is insufficient.
538         The cryptographic access control provided by TSIG
539         is far superior. The <span><strong class="command">nsupdate</strong></span>
540         program supports TSIG via the <code class="option">-k</code> and
541         <code class="option">-y</code> command line options or inline by use
542         of the <span><strong class="command">key</strong></span>.
543       </p>
544 <div class="sect2" lang="en">
545 <div class="titlepage"><div><div><h3 class="title">
546 <a name="id2570661"></a>Generate Shared Keys for Each Pair of Hosts</h3></div></div></div>
547 <p>
548           A shared secret is generated to be shared between <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span>.
549           An arbitrary key name is chosen: "host1-host2.". The key name must
550           be the same on both hosts.
551         </p>
552 <div class="sect3" lang="en">
553 <div class="titlepage"><div><div><h4 class="title">
554 <a name="id2570678"></a>Automatic Generation</h4></div></div></div>
555 <p>
556             The following command will generate a 128-bit (16 byte) HMAC-SHA256
557             key as described above. Longer keys are better, but shorter keys
558             are easier to read. Note that the maximum key length is the digest
559             length, here 256 bits.
560           </p>
561 <p>
562             <strong class="userinput"><code>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</code></strong>
563           </p>
564 <p>
565             The key is in the file <code class="filename">Khost1-host2.+163+00000.private</code>.
566             Nothing directly uses this file, but the base-64 encoded string
567             following "<code class="literal">Key:</code>"
568             can be extracted from the file and used as a shared secret:
569           </p>
570 <pre class="programlisting">Key: La/E5CjG9O+os1jq0a2jdA==</pre>
571 <p>
572             The string "<code class="literal">La/E5CjG9O+os1jq0a2jdA==</code>" can
573             be used as the shared secret.
574           </p>
575 </div>
576 <div class="sect3" lang="en">
577 <div class="titlepage"><div><div><h4 class="title">
578 <a name="id2570716"></a>Manual Generation</h4></div></div></div>
579 <p>
580             The shared secret is simply a random sequence of bits, encoded
581             in base-64. Most ASCII strings are valid base-64 strings (assuming
582             the length is a multiple of 4 and only valid characters are used),
583             so the shared secret can be manually generated.
584           </p>
585 <p>
586             Also, a known string can be run through <span><strong class="command">mmencode</strong></span> or
587             a similar program to generate base-64 encoded data.
588           </p>
589 </div>
590 </div>
591 <div class="sect2" lang="en">
592 <div class="titlepage"><div><div><h3 class="title">
593 <a name="id2570734"></a>Copying the Shared Secret to Both Machines</h3></div></div></div>
594 <p>
595           This is beyond the scope of DNS. A secure transport mechanism
596           should be used. This could be secure FTP, ssh, telephone, etc.
597         </p>
598 </div>
599 <div class="sect2" lang="en">
600 <div class="titlepage"><div><div><h3 class="title">
601 <a name="id2570745"></a>Informing the Servers of the Key's Existence</h3></div></div></div>
602 <p>
603           Imagine <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host 2</em></span>
604           are
605           both servers. The following is added to each server's <code class="filename">named.conf</code> file:
606         </p>
607 <pre class="programlisting">
608 key host1-host2. {
609   algorithm hmac-sha256;
610   secret "La/E5CjG9O+os1jq0a2jdA==";
611 };
612 </pre>
613 <p>
614           The secret is the one generated above. Since this is a secret, it
615           is recommended that either <code class="filename">named.conf</code> be
616           non-world readable, or the key directive be added to a non-world
617           readable file that is included by <code class="filename">named.conf</code>.
618         </p>
619 <p>
620           At this point, the key is recognized. This means that if the
621           server receives a message signed by this key, it can verify the
622           signature. If the signature is successfully verified, the
623           response is signed by the same key.
624         </p>
625 </div>
626 <div class="sect2" lang="en">
627 <div class="titlepage"><div><div><h3 class="title">
628 <a name="id2570781"></a>Instructing the Server to Use the Key</h3></div></div></div>
629 <p>
630           Since keys are shared between two hosts only, the server must
631           be told when keys are to be used. The following is added to the <code class="filename">named.conf</code> file
632           for <span class="emphasis"><em>host1</em></span>, if the IP address of <span class="emphasis"><em>host2</em></span> is
633           10.1.2.3:
634         </p>
635 <pre class="programlisting">
636 server 10.1.2.3 {
637   keys { host1-host2. ;};
638 };
639 </pre>
640 <p>
641           Multiple keys may be present, but only the first is used.
642           This directive does not contain any secrets, so it may be in a
643           world-readable
644           file.
645         </p>
646 <p>
647           If <span class="emphasis"><em>host1</em></span> sends a message that is a request
648           to that address, the message will be signed with the specified key. <span class="emphasis"><em>host1</em></span> will
649           expect any responses to signed messages to be signed with the same
650           key.
651         </p>
652 <p>
653           A similar statement must be present in <span class="emphasis"><em>host2</em></span>'s
654           configuration file (with <span class="emphasis"><em>host1</em></span>'s address) for <span class="emphasis"><em>host2</em></span> to
655           sign request messages to <span class="emphasis"><em>host1</em></span>.
656         </p>
657 </div>
658 <div class="sect2" lang="en">
659 <div class="titlepage"><div><div><h3 class="title">
660 <a name="id2570839"></a>TSIG Key Based Access Control</h3></div></div></div>
661 <p>
662           <acronym class="acronym">BIND</acronym> allows IP addresses and ranges
663           to be specified in ACL
664           definitions and
665           <span><strong class="command">allow-{ query | transfer | update }</strong></span>
666           directives.
667           This has been extended to allow TSIG keys also. The above key would
668           be denoted <span><strong class="command">key host1-host2.</strong></span>
669         </p>
670 <p>
671           An example of an <span><strong class="command">allow-update</strong></span> directive would be:
672         </p>
673 <pre class="programlisting">
674 allow-update { key host1-host2. ;};
675 </pre>
676 <p>
677           This allows dynamic updates to succeed only if the request
678           was signed by a key named "<span><strong class="command">host1-host2.</strong></span>".
679         </p>
680 <p>
681           See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a> for a discussion of
682           the more flexible <span><strong class="command">update-policy</strong></span> statement.
683         </p>
684 </div>
685 <div class="sect2" lang="en">
686 <div class="titlepage"><div><div><h3 class="title">
687 <a name="id2570888"></a>Errors</h3></div></div></div>
688 <p>
689           The processing of TSIG signed messages can result in
690           several errors. If a signed message is sent to a non-TSIG aware
691           server, a FORMERR (format error) will be returned, since the server will not
692           understand the record. This is a result of misconfiguration,
693           since the server must be explicitly configured to send a TSIG
694           signed message to a specific server.
695         </p>
696 <p>
697           If a TSIG aware server receives a message signed by an
698           unknown key, the response will be unsigned with the TSIG
699           extended error code set to BADKEY. If a TSIG aware server
700           receives a message with a signature that does not validate, the
701           response will be unsigned with the TSIG extended error code set
702           to BADSIG. If a TSIG aware server receives a message with a time
703           outside of the allowed range, the response will be signed with
704           the TSIG extended error code set to BADTIME, and the time values
705           will be adjusted so that the response can be successfully
706           verified. In any of these cases, the message's rcode (response code) is set to
707           NOTAUTH (not authenticated).
708         </p>
709 </div>
710 </div>
711 <div class="sect1" lang="en">
712 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
713 <a name="id2570902"></a>TKEY</h2></div></div></div>
714 <p><span><strong class="command">TKEY</strong></span>
715         is a mechanism for automatically generating a shared secret
716         between two hosts.  There are several "modes" of
717         <span><strong class="command">TKEY</strong></span> that specify how the key is generated
718         or assigned.  <acronym class="acronym">BIND</acronym> 9 implements only one of
719         these modes, the Diffie-Hellman key exchange.  Both hosts are
720         required to have a Diffie-Hellman KEY record (although this
721         record is not required to be present in a zone).  The
722         <span><strong class="command">TKEY</strong></span> process must use signed messages,
723         signed either by TSIG or SIG(0).  The result of
724         <span><strong class="command">TKEY</strong></span> is a shared secret that can be used to
725         sign messages with TSIG.  <span><strong class="command">TKEY</strong></span> can also be
726         used to delete shared secrets that it had previously
727         generated.
728       </p>
729 <p>
730         The <span><strong class="command">TKEY</strong></span> process is initiated by a
731         client
732         or server by sending a signed <span><strong class="command">TKEY</strong></span>
733         query
734         (including any appropriate KEYs) to a TKEY-aware server.  The
735         server response, if it indicates success, will contain a
736         <span><strong class="command">TKEY</strong></span> record and any appropriate keys.
737         After
738         this exchange, both participants have enough information to
739         determine the shared secret; the exact process depends on the
740         <span><strong class="command">TKEY</strong></span> mode.  When using the
741         Diffie-Hellman
742         <span><strong class="command">TKEY</strong></span> mode, Diffie-Hellman keys are
743         exchanged,
744         and the shared secret is derived by both participants.
745       </p>
746 </div>
747 <div class="sect1" lang="en">
748 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
749 <a name="id2570951"></a>SIG(0)</h2></div></div></div>
750 <p>
751         <acronym class="acronym">BIND</acronym> 9 partially supports DNSSEC SIG(0)
752             transaction signatures as specified in RFC 2535 and RFC 2931.
753         SIG(0)
754         uses public/private keys to authenticate messages.  Access control
755         is performed in the same manner as TSIG keys; privileges can be
756         granted or denied based on the key name.
757       </p>
758 <p>
759         When a SIG(0) signed message is received, it will only be
760         verified if the key is known and trusted by the server; the server
761         will not attempt to locate and/or validate the key.
762       </p>
763 <p>
764         SIG(0) signing of multiple-message TCP streams is not
765         supported.
766       </p>
767 <p>
768         The only tool shipped with <acronym class="acronym">BIND</acronym> 9 that
769         generates SIG(0) signed messages is <span><strong class="command">nsupdate</strong></span>.
770       </p>
771 </div>
772 <div class="sect1" lang="en">
773 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
774 <a name="DNSSEC"></a>DNSSEC</h2></div></div></div>
775 <p>
776         Cryptographic authentication of DNS information is possible
777         through the DNS Security (<span class="emphasis"><em>DNSSEC-bis</em></span>) extensions,
778         defined in RFC 4033, RFC 4034, and RFC 4035.
779         This section describes the creation and use of DNSSEC signed zones.
780       </p>
781 <p>
782         In order to set up a DNSSEC secure zone, there are a series
783         of steps which must be followed.  <acronym class="acronym">BIND</acronym>
784         9 ships
785         with several tools
786         that are used in this process, which are explained in more detail
787         below.  In all cases, the <code class="option">-h</code> option prints a
788         full list of parameters.  Note that the DNSSEC tools require the
789         keyset files to be in the working directory or the
790         directory specified by the <code class="option">-d</code> option, and
791         that the tools shipped with BIND 9.2.x and earlier are not compatible
792         with the current ones.
793       </p>
794 <p>
795         There must also be communication with the administrators of
796         the parent and/or child zone to transmit keys.  A zone's security
797         status must be indicated by the parent zone for a DNSSEC capable
798         resolver to trust its data.  This is done through the presence
799         or absence of a <code class="literal">DS</code> record at the
800         delegation
801         point.
802       </p>
803 <p>
804         For other servers to trust data in this zone, they must
805         either be statically configured with this zone's zone key or the
806         zone key of another zone above this one in the DNS tree.
807       </p>
808 <div class="sect2" lang="en">
809 <div class="titlepage"><div><div><h3 class="title">
810 <a name="id2571156"></a>Generating Keys</h3></div></div></div>
811 <p>
812           The <span><strong class="command">dnssec-keygen</strong></span> program is used to
813           generate keys.
814         </p>
815 <p>
816           A secure zone must contain one or more zone keys.  The
817           zone keys will sign all other records in the zone, as well as
818           the zone keys of any secure delegated zones.  Zone keys must
819           have the same name as the zone, a name type of
820           <span><strong class="command">ZONE</strong></span>, and must be usable for
821           authentication.
822           It is recommended that zone keys use a cryptographic algorithm
823           designated as "mandatory to implement" by the IETF; currently
824           the only one is RSASHA1.
825         </p>
826 <p>
827           The following command will generate a 768-bit RSASHA1 key for
828           the <code class="filename">child.example</code> zone:
829         </p>
830 <p>
831           <strong class="userinput"><code>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</code></strong>
832         </p>
833 <p>
834           Two output files will be produced:
835           <code class="filename">Kchild.example.+005+12345.key</code> and
836           <code class="filename">Kchild.example.+005+12345.private</code>
837           (where
838           12345 is an example of a key tag).  The key filenames contain
839           the key name (<code class="filename">child.example.</code>),
840           algorithm (3
841           is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
842           this case).
843           The private key (in the <code class="filename">.private</code>
844           file) is
845           used to generate signatures, and the public key (in the
846           <code class="filename">.key</code> file) is used for signature
847           verification.
848         </p>
849 <p>
850           To generate another key with the same properties (but with
851           a different key tag), repeat the above command.
852         </p>
853 <p>
854           The <span><strong class="command">dnssec-keyfromlabel</strong></span> program is used
855           to get a key pair from a crypto hardware and build the key
856           files. Its usage is similar to <span><strong class="command">dnssec-keygen</strong></span>.
857         </p>
858 <p>
859           The public keys should be inserted into the zone file by
860           including the <code class="filename">.key</code> files using
861           <span><strong class="command">$INCLUDE</strong></span> statements.
862         </p>
863 </div>
864 <div class="sect2" lang="en">
865 <div class="titlepage"><div><div><h3 class="title">
866 <a name="id2571235"></a>Signing the Zone</h3></div></div></div>
867 <p>
868           The <span><strong class="command">dnssec-signzone</strong></span> program is used
869           to sign a zone.
870         </p>
871 <p>
872           Any <code class="filename">keyset</code> files corresponding to
873           secure subzones should be present.  The zone signer will
874           generate <code class="literal">NSEC</code>, <code class="literal">NSEC3</code>
875           and <code class="literal">RRSIG</code> records for the zone, as
876           well as <code class="literal">DS</code> for the child zones if
877           <code class="literal">'-g'</code> is specified.  If <code class="literal">'-g'</code>
878           is not specified, then DS RRsets for the secure child
879           zones need to be added manually.
880         </p>
881 <p>
882           The following command signs the zone, assuming it is in a
883           file called <code class="filename">zone.child.example</code>.  By
884                 default, all zone keys which have an available private key are
885                 used to generate signatures.
886         </p>
887 <p>
888           <strong class="userinput"><code>dnssec-signzone -o child.example zone.child.example</code></strong>
889         </p>
890 <p>
891           One output file is produced:
892           <code class="filename">zone.child.example.signed</code>.  This
893           file
894           should be referenced by <code class="filename">named.conf</code>
895           as the
896           input file for the zone.
897         </p>
898 <p><span><strong class="command">dnssec-signzone</strong></span>
899           will also produce a keyset and dsset files and optionally a
900           dlvset file.  These are used to provide the parent zone
901           administrators with the <code class="literal">DNSKEYs</code> (or their
902           corresponding <code class="literal">DS</code> records) that are the
903           secure entry point to the zone.
904         </p>
905 </div>
906 <div class="sect2" lang="en">
907 <div class="titlepage"><div><div><h3 class="title">
908 <a name="id2571384"></a>Configuring Servers</h3></div></div></div>
909 <p>
910           To enable <span><strong class="command">named</strong></span> to respond appropriately
911           to DNS requests from DNSSEC aware clients,
912           <span><strong class="command">dnssec-enable</strong></span> must be set to yes.
913           (This is the default setting.)
914         </p>
915 <p>
916           To enable <span><strong class="command">named</strong></span> to validate answers from
917           other servers, the <span><strong class="command">dnssec-enable</strong></span> option
918           must be set to <strong class="userinput"><code>yes</code></strong>, and the
919           <span><strong class="command">dnssec-validation</strong></span> options must be set to 
920           <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>auto</code></strong>.
921         </p>
922 <p>
923           If <span><strong class="command">dnssec-validation</strong></span> is set to
924           <strong class="userinput"><code>auto</code></strong>, then a default
925           trust anchor for the DNS root zone will be used.
926           If it is set to <strong class="userinput"><code>yes</code></strong>, however,
927           then at least one trust anchor must be configured
928           with a <span><strong class="command">trusted-keys</strong></span> or
929           <span><strong class="command">managed-keys</strong></span> statement in
930           <code class="filename">named.conf</code>, or DNSSEC validation
931           will not occur.  The default setting is
932           <strong class="userinput"><code>yes</code></strong>.
933         </p>
934 <p>
935           <span><strong class="command">trusted-keys</strong></span> are copies of DNSKEY RRs
936           for zones that are used to form the first link in the
937           cryptographic chain of trust.  All keys listed in
938           <span><strong class="command">trusted-keys</strong></span> (and corresponding zones)
939           are deemed to exist and only the listed keys will be used
940           to validated the DNSKEY RRset that they are from.
941         </p>
942 <p>
943           <span><strong class="command">managed-keys</strong></span> are trusted keys which are
944           automatically kept up to date via RFC 5011 trust anchor
945           maintenance.
946         </p>
947 <p>
948           <span><strong class="command">trusted-keys</strong></span> and
949           <span><strong class="command">managed-keys</strong></span> are described in more detail
950           later in this document.
951         </p>
952 <p>
953           Unlike <acronym class="acronym">BIND</acronym> 8, <acronym class="acronym">BIND</acronym>
954           9 does not verify signatures on load, so zone keys for
955           authoritative zones do not need to be specified in the
956           configuration file.
957         </p>
958 <p>
959           After DNSSEC gets established, a typical DNSSEC configuration
960           will look something like the following.  It has one or
961           more public keys for the root.  This allows answers from
962           outside the organization to be validated.  It will also
963           have several keys for parts of the namespace the organization
964           controls.  These are here to ensure that <span><strong class="command">named</strong></span>
965           is immune to compromises in the DNSSEC components of the security
966           of parent zones.
967         </p>
968 <pre class="programlisting">
969 managed-keys {
970         /* Root Key */
971         "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
972                                  JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
973                                  aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
974                                  4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
975                                  hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
976                                  5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
977                                  g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
978                                  66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
979                                  97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
980                                  dgxbcDTClU0CRBdiieyLMNzXG3";
981 };
982
983 trusted-keys {
984         /* Key for our organization's forward zone */
985         example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
986                               5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
987                               GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
988                               4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
989                               kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
990                               g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
991                               TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
992                               FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
993                               F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
994                               /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
995                               1OTQ09A0=";
996
997         /* Key for our reverse zone. */
998         2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
999                                        xOdNax071L18QqZnQQQAVVr+i
1000                                        LhGTnNGp3HoWQLUIzKrJVZ3zg
1001                                        gy3WwNT6kZo6c0tszYqbtvchm
1002                                        gQC8CzKojM/W16i6MG/eafGU3
1003                                        siaOdS0yOI6BgPsw+YZdzlYMa
1004                                        IJGf4M4dyoKIhzdZyQ2bYQrjy
1005                                        Q4LB0lC7aOnsMyYKHHYeRvPxj
1006                                        IQXmdqgOJGq+vsevG06zW+1xg
1007                                        YJh9rCIfnm1GX/KMgxLPG2vXT
1008                                        D/RnLX+D3T3UL7HJYHJhAZD5L
1009                                        59VvjSPsZJHeDCUyWYrvPZesZ
1010                                        DIRvhDD52SKvbheeTJUm6Ehkz
1011                                        ytNN2SN96QRk8j/iI8ib";
1012 };
1013
1014 options {
1015         ...
1016         dnssec-enable yes;
1017         dnssec-validation yes;
1018 };
1019 </pre>
1020 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1021 <h3 class="title">Note</h3>
1022           None of the keys listed in this example are valid.  In particular,
1023           the root key is not valid.
1024         </div>
1025 <p>
1026           When DNSSEC validation is enabled and properly configured,
1027           the resolver will reject any answers from signed, secure zones
1028           which fail to validate, and will return SERVFAIL to the client.
1029         </p>
1030 <p>
1031           Responses may fail to validate for any of several reasons,
1032           including missing, expired, or invalid signatures, a key which
1033           does not match the DS RRset in the parent zone, or an insecure
1034           response from a zone which, according to its parent, should have
1035           been secure.  
1036         </p>
1037 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1038 <h3 class="title">Note</h3>
1039 <p>
1040             When the validator receives a response from an unsigned zone
1041             that has a signed parent, it must confirm with the parent
1042             that the zone was intentionally left unsigned.  It does
1043             this by verifying, via signed and validated NSEC/NSEC3 records,
1044             that the parent zone contains no DS records for the child.
1045           </p>
1046 <p>
1047             If the validator <span class="emphasis"><em>can</em></span> prove that the zone
1048             is insecure, then the response is accepted.  However, if it
1049             cannot, then it must assume an insecure response to be a
1050             forgery; it rejects the response and logs an error.
1051           </p>
1052 <p>
1053             The logged error reads "insecurity proof failed" and
1054             "got insecure response; parent indicates it should be secure".
1055             (Prior to BIND 9.7, the logged error was "not insecure".
1056             This referred to the zone, not the response.)
1057           </p>
1058 </div>
1059 </div>
1060 </div>
1061 <div class="sect1" lang="en">
1062 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1063 <a name="dnssec.dynamic.zones"></a>DNSSEC, Dynamic Zones, and Automatic Signing</h2></div></div></div>
1064 <p>As of BIND 9.7.0 it is possible to change a dynamic zone
1065   from insecure to signed and back again. A secure zone can use
1066   either NSEC or NSEC3 chains.</p>
1067 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1068 <a name="id2609113"></a>Converting from insecure to secure</h3></div></div></div></div>
1069 <p>Changing a zone from insecure to secure can be done in two
1070   ways: using a dynamic DNS update, or the 
1071   <span><strong class="command">auto-dnssec</strong></span> zone option.</p>
1072 <p>For either method, you need to configure 
1073   <span><strong class="command">named</strong></span> so that it can see the 
1074   <code class="filename">K*</code> files which contain the public and private
1075   parts of the keys that will be used to sign the zone. These files
1076   will have been generated by 
1077   <span><strong class="command">dnssec-keygen</strong></span>. You can do this by placing them
1078   in the key-directory, as specified in 
1079   <code class="filename">named.conf</code>:</p>
1080 <pre class="programlisting">
1081         zone example.net {
1082                 type master;
1083                 update-policy local;
1084                 file "dynamic/example.net/example.net";
1085                 key-directory "dynamic/example.net";
1086         };
1087 </pre>
1088 <p>If one KSK and one ZSK DNSKEY key have been generated, this
1089   configuration will cause all records in the zone to be signed
1090   with the ZSK, and the DNSKEY RRset to be signed with the KSK as
1091   well. An NSEC chain will be generated as part of the initial
1092   signing process.</p>
1093 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1094 <a name="id2609150"></a>Dynamic DNS update method</h3></div></div></div></div>
1095 <p>To insert the keys via dynamic update:</p>
1096 <pre class="screen">
1097         % nsupdate
1098         &gt; ttl 3600
1099         &gt; update add example.net DNSKEY 256 3 7 AwEAAZn17pUF0KpbPA2c7Gz76Vb18v0teKT3EyAGfBfL8eQ8al35zz3Y I1m/SAQBxIqMfLtIwqWPdgthsu36azGQAX8=
1100         &gt; update add example.net DNSKEY 257 3 7 AwEAAd/7odU/64o2LGsifbLtQmtO8dFDtTAZXSX2+X3e/UNlq9IHq3Y0 XtC0Iuawl/qkaKVxXe2lo8Ct+dM6UehyCqk=
1101         &gt; send
1102 </pre>
1103 <p>While the update request will complete almost immediately,
1104   the zone will not be completely signed until 
1105   <span><strong class="command">named</strong></span> has had time to walk the zone and
1106   generate the NSEC and RRSIG records. The NSEC record at the apex
1107   will be added last, to signal that there is a complete NSEC
1108   chain.</p>
1109 <p>If you wish to sign using NSEC3 instead of NSEC, you should
1110   add an NSEC3PARAM record to the initial update request. If you
1111   wish the NSEC3 chain to have the OPTOUT bit set, set it in the
1112   flags field of the NSEC3PARAM record.</p>
1113 <pre class="screen">
1114         % nsupdate
1115         &gt; ttl 3600
1116         &gt; update add example.net DNSKEY 256 3 7 AwEAAZn17pUF0KpbPA2c7Gz76Vb18v0teKT3EyAGfBfL8eQ8al35zz3Y I1m/SAQBxIqMfLtIwqWPdgthsu36azGQAX8=
1117         &gt; update add example.net DNSKEY 257 3 7 AwEAAd/7odU/64o2LGsifbLtQmtO8dFDtTAZXSX2+X3e/UNlq9IHq3Y0 XtC0Iuawl/qkaKVxXe2lo8Ct+dM6UehyCqk=
1118         &gt; update add example.net NSEC3PARAM 1 1 100 1234567890
1119         &gt; send
1120 </pre>
1121 <p>Again, this update request will complete almost
1122   immediately; however, the record won't show up until 
1123   <span><strong class="command">named</strong></span> has had a chance to build/remove the
1124   relevant chain. A private type record will be created to record
1125   the state of the operation (see below for more details), and will
1126   be removed once the operation completes.</p>
1127 <p>While the initial signing and NSEC/NSEC3 chain generation
1128   is happening, other updates are possible as well.</p>
1129 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1130 <a name="id2563516"></a>Fully automatic zone signing</h3></div></div></div></div>
1131 <p>To enable automatic signing, add the 
1132   <span><strong class="command">auto-dnssec</strong></span> option to the zone statement in 
1133   <code class="filename">named.conf</code>. 
1134   <span><strong class="command">auto-dnssec</strong></span> has two possible arguments: 
1135   <code class="constant">allow</code> or 
1136   <code class="constant">maintain</code>.</p>
1137 <p>With 
1138   <span><strong class="command">auto-dnssec allow</strong></span>, 
1139   <span><strong class="command">named</strong></span> can search the key directory for keys
1140   matching the zone, insert them into the zone, and use them to
1141   sign the zone. It will do so only when it receives an 
1142   <span><strong class="command">rndc sign &lt;zonename&gt;</strong></span>.</p>
1143 <p>
1144   
1145   <span><strong class="command">auto-dnssec maintain</strong></span> includes the above
1146   functionality, but will also automatically adjust the zone's
1147   DNSKEY records on schedule according to the keys' timing metadata.
1148   (See <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
1149   <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a> for more information.) 
1150   </p>
1151 <p>
1152   <span><strong class="command">named</strong></span> will periodically search the key directory
1153   for keys matching the zone, and if the keys' metadata indicates
1154   that any change should be made the zone, such as adding, removing,
1155   or revoking a key, then that action will be carried out.  By default,
1156   the key directory is checked for changes every 60 minutes; this period
1157   can be adjusted with the <code class="option">dnssec-loadkeys-interval</code>, up
1158   to a maximum of 24 hours.  The <span><strong class="command">rndc loadkeys</strong></span> forces
1159   <span><strong class="command">named</strong></span> to check for key updates immediately.
1160   </p>
1161 <p>
1162   If keys are present in the key directory the first time the zone
1163   is loaded, the zone will be signed immediately, without waiting for an 
1164   <span><strong class="command">rndc sign</strong></span> or <span><strong class="command">rndc loadkeys</strong></span>
1165   command. (Those commands can still be used when there are unscheduled
1166   key changes, however.)
1167   </p>
1168 <p>
1169   If you wish the zone to be signed using NSEC3 instead of NSEC,
1170   submit an NSEC3PARAM record via dynamic update prior to the
1171   scheduled publication and activation of the keys.  If you wish the
1172   NSEC3 chain to have the OPTOUT bit set, set it in the flags field
1173   of the NSEC3PARAM record.  The NSEC3PARAM record will not appear in
1174   the zone immediately, but it will be stored for later reference.  When
1175   the zone is signed and the NSEC3 chain is completed, the NSEC3PARAM
1176   record will appear in the zone.
1177   </p>
1178 <p>Using the 
1179   <span><strong class="command">auto-dnssec</strong></span> option requires the zone to be
1180   configured to allow dynamic updates, by adding an 
1181   <span><strong class="command">allow-update</strong></span> or 
1182   <span><strong class="command">update-policy</strong></span> statement to the zone
1183   configuration. If this has not been done, the configuration will
1184   fail.</p>
1185 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1186 <a name="id2563756"></a>Private-type records</h3></div></div></div></div>
1187 <p>The state of the signing process is signaled by
1188   private-type records (with a default type value of 65534). When
1189   signing is complete, these records will have a nonzero value for
1190   the final octet (for those records which have a nonzero initial
1191   octet).</p>
1192 <p>The private type record format: If the first octet is
1193   non-zero then the record indicates that the zone needs to be
1194   signed with the key matching the record, or that all signatures
1195   that match the record should be removed.</p>
1196 <p>
1197     </p>
1198 <div class="literallayout"><p><br>
1199 <br>
1200   algorithm (octet 1)<br>
1201   key id in network order (octet 2 and 3)<br>
1202   removal flag (octet 4)<br>
1203   complete flag (octet 5)<br>
1204 </p></div>
1205 <p>
1206   </p>
1207 <p>Only records flagged as "complete" can be removed via
1208   dynamic update. Attempts to remove other private type records
1209   will be silently ignored.</p>
1210 <p>If the first octet is zero (this is a reserved algorithm
1211   number that should never appear in a DNSKEY record) then the
1212   record indicates changes to the NSEC3 chains are in progress. The
1213   rest of the record contains an NSEC3PARAM record. The flag field
1214   tells what operation to perform based on the flag bits.</p>
1215 <p>
1216     </p>
1217 <div class="literallayout"><p><br>
1218 <br>
1219   0x01 OPTOUT<br>
1220   0x80 CREATE<br>
1221   0x40 REMOVE<br>
1222   0x20 NONSEC<br>
1223 </p></div>
1224 <p>
1225   </p>
1226 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1227 <a name="id2563794"></a>DNSKEY rollovers</h3></div></div></div></div>
1228 <p>As with insecure-to-secure conversions, rolling DNSSEC
1229   keys can be done in two ways: using a dynamic DNS update, or the 
1230   <span><strong class="command">auto-dnssec</strong></span> zone option.</p>
1231 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1232 <a name="id2563806"></a>Dynamic DNS update method</h3></div></div></div></div>
1233 <p> To perform key rollovers via dynamic update, you need to add
1234   the <code class="filename">K*</code> files for the new keys so that 
1235   <span><strong class="command">named</strong></span> can find them. You can then add the new
1236   DNSKEY RRs via dynamic update. 
1237   <span><strong class="command">named</strong></span> will then cause the zone to be signed
1238   with the new keys. When the signing is complete the private type
1239   records will be updated so that the last octet is non
1240   zero.</p>
1241 <p>If this is for a KSK you need to inform the parent and any
1242   trust anchor repositories of the new KSK.</p>
1243 <p>You should then wait for the maximum TTL in the zone before
1244   removing the old DNSKEY. If it is a KSK that is being updated,
1245   you also need to wait for the DS RRset in the parent to be
1246   updated and its TTL to expire. This ensures that all clients will
1247   be able to verify at least one signature when you remove the old
1248   DNSKEY.</p>
1249 <p>The old DNSKEY can be removed via UPDATE. Take care to
1250   specify the correct key. 
1251   <span><strong class="command">named</strong></span> will clean out any signatures generated
1252   by the old key after the update completes.</p>
1253 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1254 <a name="id2569779"></a>Automatic key rollovers</h3></div></div></div></div>
1255 <p>When a new key reaches its activation date (as set by
1256   <span><strong class="command">dnssec-keygen</strong></span> or <span><strong class="command">dnssec-settime</strong></span>),
1257   if the <span><strong class="command">auto-dnssec</strong></span> zone option is set to 
1258   <code class="constant">maintain</code>, <span><strong class="command">named</strong></span> will
1259   automatically carry out the key rollover.  If the key's algorithm
1260   has not previously been used to sign the zone, then the zone will
1261   be fully signed as quickly as possible.  However, if the new key
1262   is replacing an existing key of the same algorithm, then the
1263   zone will be re-signed incrementally, with signatures from the
1264   old key being replaced with signatures from the new key as their
1265   signature validity periods expire.  By default, this rollover
1266   completes in 30 days, after which it will be safe to remove the
1267   old key from the DNSKEY RRset.</p>
1268 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1269 <a name="id2569805"></a>NSEC3PARAM rollovers via UPDATE</h3></div></div></div></div>
1270 <p>Add the new NSEC3PARAM record via dynamic update. When the
1271   new NSEC3 chain has been generated, the NSEC3PARAM flag field
1272   will be zero. At this point you can remove the old NSEC3PARAM
1273   record. The old chain will be removed after the update request
1274   completes.</p>
1275 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1276 <a name="id2569815"></a>Converting from NSEC to NSEC3</h3></div></div></div></div>
1277 <p>To do this, you just need to add an NSEC3PARAM record. When
1278   the conversion is complete, the NSEC chain will have been removed
1279   and the NSEC3PARAM record will have a zero flag field. The NSEC3
1280   chain will be generated before the NSEC chain is
1281   destroyed.</p>
1282 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1283 <a name="id2569825"></a>Converting from NSEC3 to NSEC</h3></div></div></div></div>
1284 <p>To do this, use <span><strong class="command">nsupdate</strong></span> to
1285   remove all NSEC3PARAM records with a zero flag
1286   field. The NSEC chain will be generated before the NSEC3 chain is
1287   removed.</p>
1288 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1289 <a name="id2569837"></a>Converting from secure to insecure</h3></div></div></div></div>
1290 <p>To convert a signed zone to unsigned using dynamic DNS,
1291   delete all the DNSKEY records from the zone apex using
1292   <span><strong class="command">nsupdate</strong></span>. All signatures, NSEC or NSEC3 chains,
1293   and associated NSEC3PARAM records will be removed automatically.
1294   This will take place after the update request completes.</p>
1295 <p> This requires the 
1296   <span><strong class="command">dnssec-secure-to-insecure</strong></span> option to be set to 
1297   <strong class="userinput"><code>yes</code></strong> in 
1298   <code class="filename">named.conf</code>.</p>
1299 <p>In addition, if the <span><strong class="command">auto-dnssec maintain</strong></span>
1300   zone statement is used, it should be removed or changed to
1301   <span><strong class="command">allow</strong></span> instead (or it will re-sign).
1302   </p>
1303 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1304 <a name="id2569875"></a>Periodic re-signing</h3></div></div></div></div>
1305 <p>In any secure zone which supports dynamic updates, named
1306   will periodically re-sign RRsets which have not been re-signed as
1307   a result of some update action. The signature lifetimes will be
1308   adjusted so as to spread the re-sign load over time rather than
1309   all at once.</p>
1310 <div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
1311 <a name="id2569884"></a>NSEC3 and OPTOUT</h3></div></div></div></div>
1312 <p>
1313   <span><strong class="command">named</strong></span> only supports creating new NSEC3 chains
1314   where all the NSEC3 records in the zone have the same OPTOUT
1315   state. 
1316   <span><strong class="command">named</strong></span> supports UPDATES to zones where the NSEC3
1317   records in the chain have mixed OPTOUT state. 
1318   <span><strong class="command">named</strong></span> does not support changing the OPTOUT
1319   state of an individual NSEC3 record, the entire chain needs to be
1320   changed if the OPTOUT state of an individual NSEC3 needs to be
1321   changed.</p>
1322 </div>
1323 <div class="sect1" lang="en">
1324 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1325 <a name="rfc5011.support"></a>Dynamic Trust Anchor Management</h2></div></div></div>
1326 <p>BIND 9.7.0 introduces support for RFC 5011, dynamic trust
1327   anchor management. Using this feature allows 
1328   <span><strong class="command">named</strong></span> to keep track of changes to critical
1329   DNSSEC keys without any need for the operator to make changes to
1330   configuration files.</p>
1331 <div class="sect2" lang="en">
1332 <div class="titlepage"><div><div><h3 class="title">
1333 <a name="id2608556"></a>Validating Resolver</h3></div></div></div>
1334 <p>To configure a validating resolver to use RFC 5011 to
1335     maintain a trust anchor, configure the trust anchor using a 
1336     <span><strong class="command">managed-keys</strong></span> statement. Information about
1337     this can be found in 
1338     <a href="Bv9ARM.ch06.html#managed-keys" title="managed-keys Statement Definition
1339             and Usage">the section called &#8220;<span><strong class="command">managed-keys</strong></span> Statement Definition
1340             and Usage&#8221;</a>.</p>
1341 </div>
1342 <div class="sect2" lang="en">
1343 <div class="titlepage"><div><div><h3 class="title">
1344 <a name="id2608579"></a>Authoritative Server</h3></div></div></div>
1345 <p>To set up an authoritative zone for RFC 5011 trust anchor
1346     maintenance, generate two (or more) key signing keys (KSKs) for
1347     the zone. Sign the zone with one of them; this is the "active"
1348     KSK. All KSK's which do not sign the zone are "stand-by"
1349     keys.</p>
1350 <p>Any validating resolver which is configured to use the
1351     active KSK as an RFC 5011-managed trust anchor will take note
1352     of the stand-by KSKs in the zone's DNSKEY RRset, and store them
1353     for future reference. The resolver will recheck the zone
1354     periodically, and after 30 days, if the new key is still there,
1355     then the key will be accepted by the resolver as a valid trust
1356     anchor for the zone. Any time after this 30-day acceptance
1357     timer has completed, the active KSK can be revoked, and the
1358     zone can be "rolled over" to the newly accepted key.</p>
1359 <p>The easiest way to place a stand-by key in a zone is to
1360     use the "smart signing" features of 
1361     <span><strong class="command">dnssec-keygen</strong></span> and 
1362     <span><strong class="command">dnssec-signzone</strong></span>. If a key with a publication
1363     date in the past, but an activation date which is unset or in
1364     the future, " 
1365     <span><strong class="command">dnssec-signzone -S</strong></span>" will include the DNSKEY
1366     record in the zone, but will not sign with it:</p>
1367 <pre class="screen">
1368 $ <strong class="userinput"><code>dnssec-keygen -K keys -f KSK -P now -A now+2y example.net</code></strong>
1369 $ <strong class="userinput"><code>dnssec-signzone -S -K keys example.net</code></strong>
1370 </pre>
1371 <p>To revoke a key, the new command 
1372     <span><strong class="command">dnssec-revoke</strong></span> has been added. This adds the
1373     REVOKED bit to the key flags and re-generates the 
1374     <code class="filename">K*.key</code> and 
1375     <code class="filename">K*.private</code> files.</p>
1376 <p>After revoking the active key, the zone must be signed
1377     with both the revoked KSK and the new active KSK. (Smart
1378     signing takes care of this automatically.)</p>
1379 <p>Once a key has been revoked and used to sign the DNSKEY
1380     RRset in which it appears, that key will never again be
1381     accepted as a valid trust anchor by the resolver. However,
1382     validation can proceed using the new active key (which had been
1383     accepted by the resolver when it was a stand-by key).</p>
1384 <p>See RFC 5011 for more details on key rollover
1385     scenarios.</p>
1386 <p>When a key has been revoked, its key ID changes,
1387     increasing by 128, and wrapping around at 65535. So, for
1388     example, the key "<code class="filename">Kexample.com.+005+10000</code>" becomes
1389     "<code class="filename">Kexample.com.+005+10128</code>".</p>
1390 <p>If two keys have ID's exactly 128 apart, and one is
1391     revoked, then the two key ID's will collide, causing several
1392     problems. To prevent this, 
1393     <span><strong class="command">dnssec-keygen</strong></span> will not generate a new key if
1394     another key is present which may collide. This checking will
1395     only occur if the new keys are written to the same directory
1396     which holds all other keys in use for that zone.</p>
1397 <p>Older versions of BIND 9 did not have this precaution.
1398     Exercise caution if using key revocation on keys that were
1399     generated by previous releases, or if using keys stored in
1400     multiple directories or on multiple machines.</p>
1401 <p>It is expected that a future release of BIND 9 will
1402     address this problem in a different way, by storing revoked
1403     keys with their original unrevoked key ID's.</p>
1404 </div>
1405 </div>
1406 <div class="sect1" lang="en">
1407 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1408 <a name="pkcs11"></a>PKCS #11 (Cryptoki) support</h2></div></div></div>
1409 <p>PKCS #11 (Public Key Cryptography Standard #11) defines a
1410   platform- independent API for the control of hardware security
1411   modules (HSMs) and other cryptographic support devices.</p>
1412 <p>BIND 9 is known to work with two HSMs: The Sun SCA 6000
1413   cryptographic acceleration board, tested under Solaris x86, and
1414   the AEP Keyper network-attached key storage device, tested with
1415   Debian Linux, Solaris x86 and Windows Server 2003.</p>
1416 <div class="sect2" lang="en">
1417 <div class="titlepage"><div><div><h3 class="title">
1418 <a name="id2609024"></a>Prerequisites</h3></div></div></div>
1419 <p>See the HSM vendor documentation for information about
1420     installing, initializing, testing and troubleshooting the
1421     HSM.</p>
1422 <p>BIND 9 uses OpenSSL for cryptography, but stock OpenSSL
1423     does not yet fully support PKCS #11. However, a PKCS #11 engine
1424     for OpenSSL is available from the OpenSolaris project. It has
1425     been modified by ISC to work with with BIND 9, and to provide
1426     new features such as PIN management and key by
1427     reference.</p>
1428 <p>The patched OpenSSL depends on a "PKCS #11 provider".
1429     This is a shared library object, providing a low-level PKCS #11
1430     interface to the HSM hardware. It is dynamically loaded by
1431     OpenSSL at runtime. The PKCS #11 provider comes from the HSM
1432     vendor, and is specific to the HSM to be controlled.</p>
1433 <p>There are two "flavors" of PKCS #11 support provided by
1434     the patched OpenSSL, one of which must be chosen at
1435     configuration time. The correct choice depends on the HSM
1436     hardware:</p>
1437 <div class="itemizedlist"><ul type="disc">
1438 <li><p>Use 'crypto-accelerator' with HSMs that have hardware
1439         cryptographic acceleration features, such as the SCA 6000
1440         board. This causes OpenSSL to run all supported
1441         cryptographic operations in the HSM.</p></li>
1442 <li><p>Use 'sign-only' with HSMs that are designed to
1443         function primarily as secure key storage devices, but lack
1444         hardware acceleration. These devices are highly secure, but
1445         are not necessarily any faster at cryptography than the
1446         system CPU &#8212; often, they are slower. It is therefore
1447         most efficient to use them only for those cryptographic
1448         functions that require access to the secured private key,
1449         such as zone signing, and to use the system CPU for all
1450         other computationally-intensive operations. The AEP Keyper
1451         is an example of such a device.</p></li>
1452 </ul></div>
1453 <p>The modified OpenSSL code is included in the BIND 9 release,
1454         in the form of a context diff against the latest verions of
1455         OpenSSL.  OpenSSL 0.9.8, 1.0.0 and 1.0.1 are supported; there are
1456         separate diffs for each version.  In the examples to follow,
1457         we use OpenSSL 0.9.8, but the same methods work with OpenSSL 1.0.0
1458         and 1.0.1.
1459     </p>
1460 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1461 <h3 class="title">Note</h3>
1462       The latest OpenSSL versions at the time of the BIND release
1463       are 0.9.8y, 1.0.0k and 1.0.1e.
1464       ISC will provide an updated patch as new versions of OpenSSL
1465       are released. The version number in the following examples
1466       is expected to change.</div>
1467 <p>
1468     Before building BIND 9 with PKCS #11 support, it will be
1469     necessary to build OpenSSL with this patch in place and inform
1470     it of the path to the HSM-specific PKCS #11 provider
1471     library.</p>
1472 <p>Obtain OpenSSL 0.9.8s:</p>
1473 <pre class="screen">
1474 $ <strong class="userinput"><code>wget <a href="" target="_top">http://www.openssl.org/source/openssl-0.9.8s.tar.gz</a></code></strong>
1475 </pre>
1476 <p>Extract the tarball:</p>
1477 <pre class="screen">
1478 $ <strong class="userinput"><code>tar zxf openssl-0.9.8s.tar.gz</code></strong>
1479 </pre>
1480 <p>Apply the patch from the BIND 9 release:</p>
1481 <pre class="screen">
1482 $ <strong class="userinput"><code>patch -p1 -d openssl-0.9.8s \
1483             &lt; bind9/bin/pkcs11/openssl-0.9.8s-patch</code></strong>
1484 </pre>
1485 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1486 <h3 class="title">Note</h3>(Note that the patch file may not be compatible with the
1487     "patch" utility on all operating systems. You may need to
1488     install GNU patch.)</div>
1489 <p>When building OpenSSL, place it in a non-standard
1490     location so that it does not interfere with OpenSSL libraries
1491     elsewhere on the system. In the following examples, we choose
1492     to install into "/opt/pkcs11/usr". We will use this location
1493     when we configure BIND 9.</p>
1494 <div class="sect3" lang="en">
1495 <div class="titlepage"><div><div><h4 class="title">
1496 <a name="id2609324"></a>Building OpenSSL for the AEP Keyper on Linux</h4></div></div></div>
1497 <p>The AEP Keyper is a highly secure key storage device,
1498       but does not provide hardware cryptographic acceleration. It
1499       can carry out cryptographic operations, but it is probably
1500       slower than your system's CPU. Therefore, we choose the
1501       'sign-only' flavor when building OpenSSL.</p>
1502 <p>The Keyper-specific PKCS #11 provider library is
1503       delivered with the Keyper software. In this example, we place
1504       it /opt/pkcs11/usr/lib:</p>
1505 <pre class="screen">
1506 $ <strong class="userinput"><code>cp pkcs11.GCC4.0.2.so.4.05 /opt/pkcs11/usr/lib/libpkcs11.so</code></strong>
1507 </pre>
1508 <p>This library is only available for Linux as a 32-bit
1509       binary. If we are compiling on a 64-bit Linux system, it is
1510       necessary to force a 32-bit build, by specifying -m32 in the
1511       build options.</p>
1512 <p>Finally, the Keyper library requires threads, so we
1513       must specify -pthread.</p>
1514 <pre class="screen">
1515 $ <strong class="userinput"><code>cd openssl-0.9.8s</code></strong>
1516 $ <strong class="userinput"><code>./Configure linux-generic32 -m32 -pthread \
1517             --pk11-libname=/opt/pkcs11/usr/lib/libpkcs11.so \
1518             --pk11-flavor=sign-only \
1519             --prefix=/opt/pkcs11/usr</code></strong>
1520 </pre>
1521 <p>After configuring, run "<span><strong class="command">make</strong></span>"
1522       and "<span><strong class="command">make test</strong></span>". If "<span><strong class="command">make
1523       test</strong></span>" fails with "pthread_atfork() not found", you forgot to
1524       add the -pthread above.</p>
1525 </div>
1526 <div class="sect3" lang="en">
1527 <div class="titlepage"><div><div><h4 class="title">
1528 <a name="id2609394"></a>Building OpenSSL for the SCA 6000 on Solaris</h4></div></div></div>
1529 <p>The SCA-6000 PKCS #11 provider is installed as a system
1530       library, libpkcs11. It is a true crypto accelerator, up to 4
1531       times faster than any CPU, so the flavor shall be
1532       'crypto-accelerator'.</p>
1533 <p>In this example, we are building on Solaris x86 on an
1534       AMD64 system.</p>
1535 <pre class="screen">
1536 $ <strong class="userinput"><code>cd openssl-0.9.8s</code></strong>
1537 $ <strong class="userinput"><code>./Configure solaris64-x86_64-cc \
1538             --pk11-libname=/usr/lib/64/libpkcs11.so \
1539             --pk11-flavor=crypto-accelerator \
1540             --prefix=/opt/pkcs11/usr</code></strong>
1541 </pre>
1542 <p>(For a 32-bit build, use "solaris-x86-cc" and
1543       /usr/lib/libpkcs11.so.)</p>
1544 <p>After configuring, run 
1545       <span><strong class="command">make</strong></span> and 
1546       <span><strong class="command">make test</strong></span>.</p>
1547 </div>
1548 <div class="sect3" lang="en">
1549 <div class="titlepage"><div><div><h4 class="title">
1550 <a name="id2609443"></a>Building OpenSSL for SoftHSM</h4></div></div></div>
1551 <p>SoftHSM is a software library provided by the OpenDNSSEC
1552       project (http://www.opendnssec.org) which provides a PKCS#11
1553       interface to a virtual HSM, implemented in the form of encrypted
1554       data on the local filesystem.  It uses the Botan library for
1555       encryption and SQLite3 for data storage.  Though less secure
1556       than a true HSM, it can provide more secure key storage than
1557       traditional key files, and can allow you to experiment with
1558       PKCS#11 when an HSM is not available.</p>
1559 <p>The SoftHSM cryptographic store must be installed and
1560       initialized before using it with OpenSSL, and the SOFTHSM_CONF
1561       environment variable must always point to the SoftHSM configuration
1562       file:</p>
1563 <pre class="screen">
1564 $ <strong class="userinput"><code> cd softhsm-1.3.0 </code></strong>
1565 $ <strong class="userinput"><code> configure --prefix=/opt/pkcs11/usr </code></strong>
1566 $ <strong class="userinput"><code> make </code></strong>
1567 $ <strong class="userinput"><code> make install </code></strong>
1568 $ <strong class="userinput"><code> export SOFTHSM_CONF=/opt/pkcs11/softhsm.conf </code></strong>
1569 $ <strong class="userinput"><code> echo "0:/opt/pkcs11/softhsm.db" &gt; $SOFTHSM_CONF </code></strong>
1570 $ <strong class="userinput"><code> /opt/pkcs11/usr/bin/softhsm --init-token 0 --slot 0 --label softhsm </code></strong>
1571 </pre>
1572 <p>SoftHSM can perform all cryptographic operations, but
1573       since it only uses your system CPU, there is no need to use it
1574       for anything but signing.  Therefore, we choose the 'sign-only'
1575       flavor when building OpenSSL.</p>
1576 <pre class="screen">
1577 $ <strong class="userinput"><code>cd openssl-0.9.8s</code></strong>
1578 $ <strong class="userinput"><code>./Configure linux-x86_64 -pthread \
1579             --pk11-libname=/opt/pkcs11/usr/lib/libpkcs11.so \
1580             --pk11-flavor=sign-only \
1581             --prefix=/opt/pkcs11/usr</code></strong>
1582 </pre>
1583 <p>After configuring, run "<span><strong class="command">make</strong></span>"
1584       and "<span><strong class="command">make test</strong></span>".</p>
1585 </div>
1586 <p>Once you have built OpenSSL, run
1587     "<span><strong class="command">apps/openssl engine pkcs11</strong></span>" to confirm
1588     that PKCS #11 support was compiled in correctly. The output
1589     should be one of the following lines, depending on the flavor
1590     selected:</p>
1591 <pre class="screen">
1592         (pkcs11) PKCS #11 engine support (sign only)
1593 </pre>
1594 <p>Or:</p>
1595 <pre class="screen">
1596         (pkcs11) PKCS #11 engine support (crypto accelerator)
1597 </pre>
1598 <p>Next, run
1599     "<span><strong class="command">apps/openssl engine pkcs11 -t</strong></span>". This will
1600     attempt to initialize the PKCS #11 engine. If it is able to
1601     do so successfully, it will report
1602     &#8220;<span class="quote"><code class="literal">[ available ]</code></span>&#8221;.</p>
1603 <p>If the output is correct, run
1604     "<span><strong class="command">make install</strong></span>" which will install the
1605     modified OpenSSL suite to 
1606     <code class="filename">/opt/pkcs11/usr</code>.</p>
1607 </div>
1608 <div class="sect2" lang="en">
1609 <div class="titlepage"><div><div><h3 class="title">
1610 <a name="id2636218"></a>Building BIND 9 with PKCS#11</h3></div></div></div>
1611 <p>When building BIND 9, the location of the custom-built
1612     OpenSSL library must be specified via configure.</p>
1613 <div class="sect3" lang="en">
1614 <div class="titlepage"><div><div><h4 class="title">
1615 <a name="id2636227"></a>Configuring BIND 9 for Linux with the AEP Keyper</h4></div></div></div>
1616 <p>To link with the PKCS #11 provider, threads must be
1617       enabled in the BIND 9 build.</p>
1618 <p>The PKCS #11 library for the AEP Keyper is currently
1619       only available as a 32-bit binary. If we are building on a
1620       64-bit host, we must force a 32-bit build by adding "-m32" to
1621       the CC options on the "configure" command line.</p>
1622 <pre class="screen">
1623 $ <strong class="userinput"><code>cd ../bind9</code></strong>
1624 $ <strong class="userinput"><code>./configure CC="gcc -m32" --enable-threads \
1625            --with-openssl=/opt/pkcs11/usr \
1626            --with-pkcs11=/opt/pkcs11/usr/lib/libpkcs11.so</code></strong>
1627 </pre>
1628 </div>
1629 <div class="sect3" lang="en">
1630 <div class="titlepage"><div><div><h4 class="title">
1631 <a name="id2636259"></a>Configuring BIND 9 for Solaris with the SCA 6000</h4></div></div></div>
1632 <p>To link with the PKCS #11 provider, threads must be
1633       enabled in the BIND 9 build.</p>
1634 <pre class="screen">
1635 $ <strong class="userinput"><code>cd ../bind9</code></strong>
1636 $ <strong class="userinput"><code>./configure CC="cc -xarch=amd64" --enable-threads \
1637             --with-openssl=/opt/pkcs11/usr \
1638             --with-pkcs11=/usr/lib/64/libpkcs11.so</code></strong>
1639 </pre>
1640 <p>(For a 32-bit build, omit CC="cc -xarch=amd64".)</p>
1641 <p>If configure complains about OpenSSL not working, you
1642       may have a 32/64-bit architecture mismatch. Or, you may have
1643       incorrectly specified the path to OpenSSL (it should be the
1644       same as the --prefix argument to the OpenSSL
1645       Configure).</p>
1646 </div>
1647 <div class="sect3" lang="en">
1648 <div class="titlepage"><div><div><h4 class="title">
1649 <a name="id2636295"></a>Configuring BIND 9 for SoftHSM</h4></div></div></div>
1650 <pre class="screen">
1651 $ <strong class="userinput"><code>cd ../bind9</code></strong>
1652 $ <strong class="userinput"><code>./configure --enable-threads \
1653            --with-openssl=/opt/pkcs11/usr \
1654            --with-pkcs11=/opt/pkcs11/usr/lib/libpkcs11.so</code></strong>
1655 </pre>
1656 </div>
1657 <p>After configuring, run
1658     "<span><strong class="command">make</strong></span>",
1659     "<span><strong class="command">make test</strong></span>" and
1660     "<span><strong class="command">make install</strong></span>".</p>
1661 <p>(Note: If "make test" fails in the "pkcs11" system test, you may
1662     have forgotten to set the SOFTHSM_CONF environment variable.)</p>
1663 </div>
1664 <div class="sect2" lang="en">
1665 <div class="titlepage"><div><div><h3 class="title">
1666 <a name="id2636343"></a>PKCS #11 Tools</h3></div></div></div>
1667 <p>BIND 9 includes a minimal set of tools to operate the
1668     HSM, including 
1669     <span><strong class="command">pkcs11-keygen</strong></span> to generate a new key pair
1670     within the HSM, 
1671     <span><strong class="command">pkcs11-list</strong></span> to list objects currently
1672     available, and 
1673     <span><strong class="command">pkcs11-destroy</strong></span> to remove objects.</p>
1674 <p>In UNIX/Linux builds, these tools are built only if BIND
1675     9 is configured with the --with-pkcs11 option. (NOTE: If
1676     --with-pkcs11 is set to "yes", rather than to the path of the
1677     PKCS #11 provider, then the tools will be built but the
1678     provider will be left undefined. Use the -m option or the
1679     PKCS11_PROVIDER environment variable to specify the path to the
1680     provider.)</p>
1681 </div>
1682 <div class="sect2" lang="en">
1683 <div class="titlepage"><div><div><h3 class="title">
1684 <a name="id2636374"></a>Using the HSM</h3></div></div></div>
1685 <p>First, we must set up the runtime environment so the
1686     OpenSSL and PKCS #11 libraries can be loaded:</p>
1687 <pre class="screen">
1688 $ <strong class="userinput"><code>export LD_LIBRARY_PATH=/opt/pkcs11/usr/lib:${LD_LIBRARY_PATH}</code></strong>
1689 </pre>
1690 <p>When operating an AEP Keyper, it is also necessary to
1691     specify the location of the "machine" file, which stores
1692     information about the Keyper for use by PKCS #11 provider
1693     library. If the machine file is in 
1694     <code class="filename">/opt/Keyper/PKCS11Provider/machine</code>,
1695     use:</p>
1696 <pre class="screen">
1697 $ <strong class="userinput"><code>export KEYPER_LIBRARY_PATH=/opt/Keyper/PKCS11Provider</code></strong>
1698 </pre>
1699 <p>These environment variables must be set whenever running
1700     any tool that uses the HSM, including 
1701     <span><strong class="command">pkcs11-keygen</strong></span>, 
1702     <span><strong class="command">pkcs11-list</strong></span>, 
1703     <span><strong class="command">pkcs11-destroy</strong></span>, 
1704     <span><strong class="command">dnssec-keyfromlabel</strong></span>, 
1705     <span><strong class="command">dnssec-signzone</strong></span>, 
1706     <span><strong class="command">dnssec-keygen</strong></span>(which will use the HSM for
1707     random number generation), and 
1708     <span><strong class="command">named</strong></span>.</p>
1709 <p>We can now create and use keys in the HSM. In this case,
1710     we will create a 2048 bit key and give it the label
1711     "sample-ksk":</p>
1712 <pre class="screen">
1713 $ <strong class="userinput"><code>pkcs11-keygen -b 2048 -l sample-ksk</code></strong>
1714 </pre>
1715 <p>To confirm that the key exists:</p>
1716 <pre class="screen">
1717 $ <strong class="userinput"><code>pkcs11-list</code></strong>
1718 Enter PIN:
1719 object[0]: handle 2147483658 class 3 label[8] 'sample-ksk' id[0]
1720 object[1]: handle 2147483657 class 2 label[8] 'sample-ksk' id[0]
1721 </pre>
1722 <p>Before using this key to sign a zone, we must create a
1723     pair of BIND 9 key files. The "dnssec-keyfromlabel" utility
1724     does this. In this case, we will be using the HSM key
1725     "sample-ksk" as the key-signing key for "example.net":</p>
1726 <pre class="screen">
1727 $ <strong class="userinput"><code>dnssec-keyfromlabel -l sample-ksk -f KSK example.net</code></strong>
1728 </pre>
1729 <p>The resulting K*.key and K*.private files can now be used
1730     to sign the zone. Unlike normal K* files, which contain both
1731     public and private key data, these files will contain only the
1732     public key data, plus an identifier for the private key which
1733     remains stored within the HSM. The HSM handles signing with the
1734     private key.</p>
1735 <p>If you wish to generate a second key in the HSM for use
1736     as a zone-signing key, follow the same procedure above, using a
1737     different keylabel, a smaller key size, and omitting "-f KSK"
1738     from the dnssec-keyfromlabel arguments:</p>
1739 <pre class="screen">
1740 $ <strong class="userinput"><code>pkcs11-keygen -b 1024 -l sample-zsk</code></strong>
1741 $ <strong class="userinput"><code>dnssec-keyfromlabel -l sample-zsk example.net</code></strong>
1742 </pre>
1743 <p>Alternatively, you may prefer to generate a conventional
1744     on-disk key, using dnssec-keygen:</p>
1745 <pre class="screen">
1746 $ <strong class="userinput"><code>dnssec-keygen example.net</code></strong>
1747 </pre>
1748 <p>This provides less security than an HSM key, but since
1749     HSMs can be slow or cumbersome to use for security reasons, it
1750     may be more efficient to reserve HSM keys for use in the less
1751     frequent key-signing operation. The zone-signing key can be
1752     rolled more frequently, if you wish, to compensate for a
1753     reduction in key security.</p>
1754 <p>Now you can sign the zone. (Note: If not using the -S
1755     option to 
1756     <span><strong class="command">dnssec-signzone</strong></span>, it will be necessary to add
1757     the contents of both 
1758     <code class="filename">K*.key</code> files to the zone master file before
1759     signing it.)</p>
1760 <pre class="screen">
1761 $ <strong class="userinput"><code>dnssec-signzone -S example.net</code></strong>
1762 Enter PIN:
1763 Verifying the zone using the following algorithms:
1764 NSEC3RSASHA1.
1765 Zone signing complete:
1766 Algorithm: NSEC3RSASHA1: ZSKs: 1, KSKs: 1 active, 0 revoked, 0 stand-by
1767 example.net.signed
1768 </pre>
1769 </div>
1770 <div class="sect2" lang="en">
1771 <div class="titlepage"><div><div><h3 class="title">
1772 <a name="id2636572"></a>Specifying the engine on the command line</h3></div></div></div>
1773 <p>The OpenSSL engine can be specified in 
1774     <span><strong class="command">named</strong></span> and all of the BIND 
1775     <span><strong class="command">dnssec-*</strong></span> tools by using the "-E
1776     &lt;engine&gt;" command line option. If BIND 9 is built with
1777     the --with-pkcs11 option, this option defaults to "pkcs11".
1778     Specifying the engine will generally not be necessary unless
1779     for some reason you wish to use a different OpenSSL
1780     engine.</p>
1781 <p>If you wish to disable use of the "pkcs11" engine &#8212;
1782     for troubleshooting purposes, or because the HSM is unavailable
1783     &#8212; set the engine to the empty string. For example:</p>
1784 <pre class="screen">
1785 $ <strong class="userinput"><code>dnssec-signzone -E '' -S example.net</code></strong>
1786 </pre>
1787 <p>This causes 
1788     <span><strong class="command">dnssec-signzone</strong></span> to run as if it were compiled
1789     without the --with-pkcs11 option.</p>
1790 </div>
1791 <div class="sect2" lang="en">
1792 <div class="titlepage"><div><div><h3 class="title">
1793 <a name="id2636686"></a>Running named with automatic zone re-signing</h3></div></div></div>
1794 <p>If you want 
1795     <span><strong class="command">named</strong></span> to dynamically re-sign zones using HSM
1796     keys, and/or to to sign new records inserted via nsupdate, then
1797     named must have access to the HSM PIN. This can be accomplished
1798     by placing the PIN into the openssl.cnf file (in the above
1799     examples, 
1800     <code class="filename">/opt/pkcs11/usr/ssl/openssl.cnf</code>).</p>
1801 <p>The location of the openssl.cnf file can be overridden by
1802     setting the OPENSSL_CONF environment variable before running
1803     named.</p>
1804 <p>Sample openssl.cnf:</p>
1805 <pre class="programlisting">
1806         openssl_conf = openssl_def
1807         [ openssl_def ]
1808         engines = engine_section
1809         [ engine_section ]
1810         pkcs11 = pkcs11_section
1811         [ pkcs11_section ]
1812         PIN = <em class="replaceable"><code>&lt;PLACE PIN HERE&gt;</code></em>
1813 </pre>
1814 <p>This will also allow the dnssec-* tools to access the HSM
1815     without PIN entry. (The pkcs11-* tools access the HSM directly,
1816     not via OpenSSL, so a PIN will still be required to use
1817     them.)</p>
1818 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1819 <h3 class="title">Warning</h3>
1820 <p>Placing the HSM's PIN in a text file in
1821       this manner may reduce the security advantage of using an
1822       HSM. Be sure this is what you want to do before configuring
1823       OpenSSL in this way.</p>
1824 </div>
1825 </div>
1826 </div>
1827 <div class="sect1" lang="en">
1828 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1829 <a name="id2571672"></a>IPv6 Support in <acronym class="acronym">BIND</acronym> 9</h2></div></div></div>
1830 <p>
1831         <acronym class="acronym">BIND</acronym> 9 fully supports all currently
1832         defined forms of IPv6 name to address and address to name
1833         lookups.  It will also use IPv6 addresses to make queries when
1834         running on an IPv6 capable system.
1835       </p>
1836 <p>
1837         For forward lookups, <acronym class="acronym">BIND</acronym> 9 supports
1838         only AAAA records.  RFC 3363 deprecated the use of A6 records,
1839         and client-side support for A6 records was accordingly removed
1840         from <acronym class="acronym">BIND</acronym> 9.
1841         However, authoritative <acronym class="acronym">BIND</acronym> 9 name servers still
1842         load zone files containing A6 records correctly, answer queries
1843         for A6 records, and accept zone transfer for a zone containing A6
1844         records.
1845       </p>
1846 <p>
1847         For IPv6 reverse lookups, <acronym class="acronym">BIND</acronym> 9 supports
1848         the traditional "nibble" format used in the
1849         <span class="emphasis"><em>ip6.arpa</em></span> domain, as well as the older, deprecated
1850         <span class="emphasis"><em>ip6.int</em></span> domain.
1851         Older versions of <acronym class="acronym">BIND</acronym> 9 
1852         supported the "binary label" (also known as "bitstring") format,
1853         but support of binary labels has been completely removed per
1854         RFC 3363.
1855         Many applications in <acronym class="acronym">BIND</acronym> 9 do not understand
1856         the binary label format at all any more, and will return an
1857         error if given.
1858         In particular, an authoritative <acronym class="acronym">BIND</acronym> 9
1859         name server will not load a zone file containing binary labels.
1860       </p>
1861 <p>
1862         For an overview of the format and structure of IPv6 addresses,
1863         see <a href="Bv9ARM.ch09.html#ipv6addresses" title="IPv6 addresses (AAAA)">the section called &#8220;IPv6 addresses (AAAA)&#8221;</a>.
1864       </p>
1865 <div class="sect2" lang="en">
1866 <div class="titlepage"><div><div><h3 class="title">
1867 <a name="id2571802"></a>Address Lookups Using AAAA Records</h3></div></div></div>
1868 <p>
1869           The IPv6 AAAA record is a parallel to the IPv4 A record,
1870           and, unlike the deprecated A6 record, specifies the entire
1871           IPv6 address in a single record.  For example,
1872         </p>
1873 <pre class="programlisting">
1874 $ORIGIN example.com.
1875 host            3600    IN      AAAA    2001:db8::1
1876 </pre>
1877 <p>
1878           Use of IPv4-in-IPv6 mapped addresses is not recommended.
1879           If a host has an IPv4 address, use an A record, not
1880           a AAAA, with <code class="literal">::ffff:192.168.42.1</code> as
1881           the address.
1882         </p>
1883 </div>
1884 <div class="sect2" lang="en">
1885 <div class="titlepage"><div><div><h3 class="title">
1886 <a name="id2571892"></a>Address to Name Lookups Using Nibble Format</h3></div></div></div>
1887 <p>
1888           When looking up an address in nibble format, the address
1889           components are simply reversed, just as in IPv4, and
1890           <code class="literal">ip6.arpa.</code> is appended to the
1891           resulting name.
1892           For example, the following would provide reverse name lookup for
1893           a host with address
1894           <code class="literal">2001:db8::1</code>.
1895         </p>
1896 <pre class="programlisting">
1897 $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
1898 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0  14400   IN    PTR    (
1899                                     host.example.com. )
1900 </pre>
1901 </div>
1902 </div>
1903 </div>
1904 <div class="navfooter">
1905 <hr>
1906 <table width="100%" summary="Navigation footer">
1907 <tr>
1908 <td width="40%" align="left">
1909 <a accesskey="p" href="Bv9ARM.ch03.html">Prev</a> </td>
1910 <td width="20%" align="center"> </td>
1911 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
1912 </td>
1913 </tr>
1914 <tr>
1915 <td width="40%" align="left" valign="top">Chapter 3. Name Server Configuration </td>
1916 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
1917 <td width="40%" align="right" valign="top"> Chapter 5. The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</td>
1918 </tr>
1919 </table>
1920 </div>
1921 </body>
1922 </html>