Bv9ARM.ch04.html revision fde6bfde6ec1d7a5f9907aeea8618db9dbd02f4c
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<!--
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - Copyright (C) 2000-2003 Internet Software Consortium.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync -
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - Permission to use, copy, modify, and/or distribute this software for any
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - purpose with or without fee is hereby granted, provided that the above
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - copyright notice and this permission notice appear in all copies.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync -
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
a180a41bba1d50822df23fff0099e90b86638b89vboxsync - PERFORMANCE OF THIS SOFTWARE.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync-->
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<!-- $Id: Bv9ARM.ch04.html,v 1.115 2010/08/21 01:13:59 tbox Exp $ -->
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<html>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<head>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<title>Chapter�4.�Advanced DNS Features</title>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<link rel="prev" href="Bv9ARM.ch03.html" title="Chapter�3.�Name Server Configuration">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<link rel="next" href="Bv9ARM.ch05.html" title="Chapter�5.�The BIND 9 Lightweight Resolver">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</head>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="navheader">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<table width="100%" summary="Navigation header">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<tr><th colspan="3" align="center">Chapter�4.�Advanced DNS Features</th></tr>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<tr>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<td width="20%" align="left">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<th width="60%" align="center">�</th>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</td>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</tr>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</table>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<hr>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="chapter" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="Bv9ARM.ch04"></a>Chapter�4.�Advanced DNS Features</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="toc">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p><b>Table of Contents</b></p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#notify">Notify</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dynamic_update">Dynamic Update</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#journal">The journal file</a></span></dt></dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#incremental_zone_transfers">Incremental Zone Transfers (IXFR)</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2570825">Split DNS</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570843">Example split DNS setup</a></span></dt></dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#tsig">TSIG</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571345">Generate Shared Keys for Each Pair of Hosts</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571555">Copying the Shared Secret to Both Machines</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571565">Informing the Servers of the Key's Existence</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571602">Instructing the Server to Use the Key</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571659">TSIG Key Based Access Control</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571708">Errors</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571722">TKEY</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2563989">SIG(0)</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#DNSSEC">DNSSEC</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2564057">Generating Keys</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572192">Signing the Zone</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572273">Configuring Servers</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dnssec.dynamic.zones">DNSSEC, Dynamic Zones, and Automatic Signing</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571833">Converting from insecure to secure</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571870">Dynamic DNS update method</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563442">Fully automatic zone signing</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563729">Private-type records</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563834">DNSKEY rollovers</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563847">Dynamic DNS update method</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563880">Automatic key rollovers</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571894">NSEC3PARAM rollovers via UPDATE</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571904">Converting from NSEC to NSEC3</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571913">Converting from NSEC3 to NSEC</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571926">Converting from secure to insecure</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571963">Periodic re-signing</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571973">NSEC3 and OPTOUT</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#rfc5011.support">Dynamic Trust Anchor Management</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2606433">Validating Resolver</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2606455">Authoritative Server</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#pkcs11">PKCS #11 (Cryptoki) support</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608344">Prerequisites</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2606704">Building BIND 9 with PKCS#11</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2606867">PKCS #11 Tools</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2606898">Using the HSM</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608871">Specifying the engine on the command line</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608917">Running named with automatic zone re-signing</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2572468">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dd><dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572734">Address Lookups Using AAAA Records</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572756">Address to Name Lookups Using Nibble Format</a></span></dt>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl></dd>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</dl>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="notify"></a>Notify</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <acronym class="acronym">DNS</acronym> NOTIFY is a mechanism that allows master
a180a41bba1d50822df23fff0099e90b86638b89vboxsync servers to notify their slave servers of changes to a zone's data. In
a180a41bba1d50822df23fff0099e90b86638b89vboxsync response to a <span><strong class="command">NOTIFY</strong></span> from a master server, the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync slave will check to see that its version of the zone is the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync current version and, if not, initiate a zone transfer.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync For more information about <acronym class="acronym">DNS</acronym>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">NOTIFY</strong></span>, see the description of the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <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
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the description of the zone option <span><strong class="command">also-notify</strong></span> in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <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>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync protocol is specified in RFC 1996.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<h3 class="title">Note</h3>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync As a slave zone can also be a master to other slaves, <span><strong class="command">named</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync by default, sends <span><strong class="command">NOTIFY</strong></span> messages for every zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync it loads. Specifying <span><strong class="command">notify master-only;</strong></span> will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync cause <span><strong class="command">named</strong></span> to only send <span><strong class="command">NOTIFY</strong></span> for master
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zones that it loads.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="dynamic_update"></a>Dynamic Update</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Dynamic Update is a method for adding, replacing or deleting
a180a41bba1d50822df23fff0099e90b86638b89vboxsync records in a master server by sending it a special form of DNS
a180a41bba1d50822df23fff0099e90b86638b89vboxsync messages. The format and meaning of these messages is specified
a180a41bba1d50822df23fff0099e90b86638b89vboxsync in RFC 2136.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Dynamic update is enabled by including an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">allow-update</strong></span> or an <span><strong class="command">update-policy</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync clause in the <span><strong class="command">zone</strong></span> statement.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If the zone's <span><strong class="command">update-policy</strong></span> is set to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <strong class="userinput"><code>local</code></strong>, updates to the zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will be permitted for the key <code class="varname">local-ddns</code>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync which will be generated by <span><strong class="command">named</strong></span> at startup.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 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.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The <span><strong class="command">tkey-gssapi-credential</strong></span> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">tkey-domain</strong></span> clauses in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">options</strong></span> statement enable the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync server to negotiate keys that can be matched against those
a180a41bba1d50822df23fff0099e90b86638b89vboxsync in <span><strong class="command">update-policy</strong></span> or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">allow-update</strong></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Updating of secure zones (zones using DNSSEC) follows RFC
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 3007: RRSIG, NSEC and NSEC3 records affected by updates are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync automatically regenerated by the server using an online
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone key. Update authorization is based on transaction
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signatures and an explicit server policy.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="journal"></a>The journal file</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync All changes made to a zone using dynamic update are stored
a180a41bba1d50822df23fff0099e90b86638b89vboxsync in the zone's journal file. This file is automatically created
a180a41bba1d50822df23fff0099e90b86638b89vboxsync by the server when the first dynamic update takes place.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The name of the journal file is formed by appending the extension
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">.jnl</code> to the name of the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync corresponding zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file unless specifically overridden. The journal file is in a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync binary format and should not be edited manually.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The server will also occasionally write ("dump")
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the complete contents of the updated zone to its zone file.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This is not done immediately after
a180a41bba1d50822df23fff0099e90b86638b89vboxsync each dynamic update, because that would be too slow when a large
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone is updated frequently. Instead, the dump is delayed by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync up to 15 minutes, allowing additional updates to take place.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync During the dump process, transient files will be created
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with the extensions <code class="filename">.jnw</code> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">.jbk</code>; under ordinary circumstances, these
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will be removed when the dump is complete, and can be safely
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ignored.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync When a server is restarted after a shutdown or crash, it will replay
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the journal file to incorporate into the zone any updates that
a180a41bba1d50822df23fff0099e90b86638b89vboxsync took
a180a41bba1d50822df23fff0099e90b86638b89vboxsync place after the last zone dump.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Changes that result from incoming incremental zone transfers are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync also
a180a41bba1d50822df23fff0099e90b86638b89vboxsync journalled in a similar way.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The zone files of dynamic zones cannot normally be edited by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync hand because they are not guaranteed to contain the most recent
a180a41bba1d50822df23fff0099e90b86638b89vboxsync dynamic changes &#8212; those are only in the journal file.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The only way to ensure that the zone file of a dynamic zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is up to date is to run <span><strong class="command">rndc stop</strong></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If you have to make changes to a dynamic zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync manually, the following procedure will work: Disable dynamic updates
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to the zone using
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">rndc freeze <em class="replaceable"><code>zone</code></em></strong></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This will also remove the zone's <code class="filename">.jnl</code> file
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and update the master file. Edit the zone file. Run
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">rndc thaw <em class="replaceable"><code>zone</code></em></strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to reload the changed zone and re-enable dynamic updates.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="incremental_zone_transfers"></a>Incremental Zone Transfers (IXFR)</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The incremental zone transfer (IXFR) protocol is a way for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync slave servers to transfer only changed data, instead of having to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync transfer the entire zone. The IXFR protocol is specified in RFC
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 1995. See <a href="Bv9ARM.ch09.html#proposed_standards">Proposed Standards</a>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync When acting as a master, <acronym class="acronym">BIND</acronym> 9
a180a41bba1d50822df23fff0099e90b86638b89vboxsync supports IXFR for those zones
a180a41bba1d50822df23fff0099e90b86638b89vboxsync where the necessary change history information is available. These
a180a41bba1d50822df23fff0099e90b86638b89vboxsync include master zones maintained by dynamic update and slave zones
a180a41bba1d50822df23fff0099e90b86638b89vboxsync whose data was obtained by IXFR. For manually maintained master
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zones, and for slave zones obtained by performing a full zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync transfer (AXFR), IXFR is supported only if the option
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">ixfr-from-differences</strong></span> is set
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to <strong class="userinput"><code>yes</code></strong>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync When acting as a slave, <acronym class="acronym">BIND</acronym> 9 will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync attempt to use IXFR unless
a180a41bba1d50822df23fff0099e90b86638b89vboxsync it is explicitly disabled. For more information about disabling
a180a41bba1d50822df23fff0099e90b86638b89vboxsync IXFR, see the description of the <span><strong class="command">request-ixfr</strong></span> clause
a180a41bba1d50822df23fff0099e90b86638b89vboxsync of the <span><strong class="command">server</strong></span> statement.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2570825"></a>Split DNS</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Setting up different views, or visibility, of the DNS space to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync internal and external resolvers is usually referred to as a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span class="emphasis"><em>Split DNS</em></span> setup. There are several
a180a41bba1d50822df23fff0099e90b86638b89vboxsync reasons an organization would want to set up its DNS this way.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync One common reason for setting up a DNS system this way is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to hide "internal" DNS information from "external" clients on the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Internet. There is some debate as to whether or not this is actually
a180a41bba1d50822df23fff0099e90b86638b89vboxsync useful.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Internal DNS information leaks out in many ways (via email headers,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for example) and most savvy "attackers" can find the information
a180a41bba1d50822df23fff0099e90b86638b89vboxsync they need using other means.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync However, since listing addresses of internal servers that
a180a41bba1d50822df23fff0099e90b86638b89vboxsync external clients cannot possibly reach can result in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync connection delays and other annoyances, an organization may
a180a41bba1d50822df23fff0099e90b86638b89vboxsync choose to use a Split DNS to present a consistent view of itself
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to the outside world.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Another common reason for setting up a Split DNS system is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to allow internal networks that are behind filters or in RFC 1918
a180a41bba1d50822df23fff0099e90b86638b89vboxsync space (reserved IP space, as documented in RFC 1918) to resolve DNS
a180a41bba1d50822df23fff0099e90b86638b89vboxsync on the Internet. Split DNS can also be used to allow mail from outside
a180a41bba1d50822df23fff0099e90b86638b89vboxsync back in to the internal network.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2570843"></a>Example split DNS setup</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Let's say a company named <span class="emphasis"><em>Example, Inc.</em></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (<code class="literal">example.com</code>)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync has several corporate sites that have an internal network with
a180a41bba1d50822df23fff0099e90b86638b89vboxsync reserved
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Internet Protocol (IP) space and an external demilitarized zone (DMZ),
a180a41bba1d50822df23fff0099e90b86638b89vboxsync or "outside" section of a network, that is available to the public.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span class="emphasis"><em>Example, Inc.</em></span> wants its internal clients
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to be able to resolve external hostnames and to exchange mail with
a180a41bba1d50822df23fff0099e90b86638b89vboxsync people on the outside. The company also wants its internal resolvers
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to have access to certain internal-only zones that are not available
a180a41bba1d50822df23fff0099e90b86638b89vboxsync at all outside of the internal network.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync In order to accomplish this, the company will set up two sets
a180a41bba1d50822df23fff0099e90b86638b89vboxsync of name servers. One set will be on the inside network (in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync reserved
a180a41bba1d50822df23fff0099e90b86638b89vboxsync IP space) and the other set will be on bastion hosts, which are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "proxy"
a180a41bba1d50822df23fff0099e90b86638b89vboxsync hosts that can talk to both sides of its network, in the DMZ.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The internal servers will be configured to forward all queries,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync except queries for <code class="filename">site1.internal</code>, <code class="filename">site2.internal</code>, <code class="filename">site1.example.com</code>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and <code class="filename">site2.example.com</code>, to the servers
a180a41bba1d50822df23fff0099e90b86638b89vboxsync in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync DMZ. These internal servers will have complete sets of information
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for <code class="filename">site1.example.com</code>, <code class="filename">site2.example.com</code>, <code class="filename">site1.internal</code>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and <code class="filename">site2.internal</code>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync To protect the <code class="filename">site1.internal</code> and <code class="filename">site2.internal</code> domains,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the internal name servers must be configured to disallow all queries
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to these domains from any external hosts, including the bastion
a180a41bba1d50822df23fff0099e90b86638b89vboxsync hosts.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The external servers, which are on the bastion hosts, will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be configured to serve the "public" version of the <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This could include things such as the host records for public servers
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (<code class="filename">www.example.com</code> and <code class="filename">ftp.example.com</code>),
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and mail exchange (MX) records (<code class="filename">a.mx.example.com</code> and <code class="filename">b.mx.example.com</code>).
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync In addition, the public <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones
a180a41bba1d50822df23fff0099e90b86638b89vboxsync should have special MX records that contain wildcard (`*') records
a180a41bba1d50822df23fff0099e90b86638b89vboxsync pointing to the bastion hosts. This is needed because external mail
a180a41bba1d50822df23fff0099e90b86638b89vboxsync servers do not have any other way of looking up how to deliver mail
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to those internal hosts. With the wildcard records, the mail will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be delivered to the bastion host, which can then forward it on to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync internal hosts.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Here's an example of a wildcard MX record:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">* IN MX 10 external1.example.com.</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Now that they accept mail on behalf of anything in the internal
a180a41bba1d50822df23fff0099e90b86638b89vboxsync network, the bastion hosts will need to know how to deliver mail
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to internal hosts. In order for this to work properly, the resolvers
a180a41bba1d50822df23fff0099e90b86638b89vboxsync on
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the bastion hosts will need to be configured to point to the internal
a180a41bba1d50822df23fff0099e90b86638b89vboxsync name servers for DNS resolution.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Queries for internal hostnames will be answered by the internal
a180a41bba1d50822df23fff0099e90b86638b89vboxsync servers, and queries for external hostnames will be forwarded back
a180a41bba1d50822df23fff0099e90b86638b89vboxsync out to the DNS servers on the bastion hosts.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync In order for all this to work properly, internal clients will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync need to be configured to query <span class="emphasis"><em>only</em></span> the internal
a180a41bba1d50822df23fff0099e90b86638b89vboxsync name servers for DNS queries. This could also be enforced via
a180a41bba1d50822df23fff0099e90b86638b89vboxsync selective
a180a41bba1d50822df23fff0099e90b86638b89vboxsync filtering on the network.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If everything has been set properly, <span class="emphasis"><em>Example, Inc.</em></span>'s
a180a41bba1d50822df23fff0099e90b86638b89vboxsync internal clients will now be able to:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="itemizedlist"><ul type="disc">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Look up any hostnames in the <code class="literal">site1</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="literal">site2.example.com</code> zones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Look up any hostnames in the <code class="literal">site1.internal</code> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="literal">site2.internal</code> domains.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li>Look up any hostnames on the Internet.</li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li>Exchange mail with both internal and external people.</li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</ul></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Hosts on the Internet will be able to:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="itemizedlist"><ul type="disc">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Look up any hostnames in the <code class="literal">site1</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="literal">site2.example.com</code> zones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Exchange mail with anyone in the <code class="literal">site1</code> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="literal">site2.example.com</code> zones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</ul></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Here is an example configuration for the setup we just
a180a41bba1d50822df23fff0099e90b86638b89vboxsync described above. Note that this is only configuration information;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 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>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Internal DNS server config:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncacl internals { 172.16.72.0/24; 192.168.1.0/24; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncacl externals { <code class="varname">bastion-ips-go-here</code>; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncoptions {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forward only;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // forward to external servers
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forwarders {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="varname">bastion-ips-go-here</code>;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // sample allow-transfer (no one)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { none; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // restrict query access
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query { internals; externals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // restrict recursion
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-recursion { internals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsync// sample master zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsynczone "site1.example.com" {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type master;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "m/site1.example.com";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // do normal iterative resolution (do not forward)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forwarders { };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query { internals; externals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { internals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsync// sample slave zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsynczone "site2.example.com" {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type slave;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "s/site2.example.com";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync masters { 172.16.72.3; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forwarders { };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query { internals; externals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { internals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsynczone "site1.internal" {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type master;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "m/site1.internal";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forwarders { };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query { internals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { internals; }
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsynczone "site2.internal" {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type slave;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "s/site2.internal";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync masters { 172.16.72.3; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forwarders { };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query { internals };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { internals; }
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync External (bastion host) DNS server config:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncacl internals { 172.16.72.0/24; 192.168.1.0/24; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncacl externals { bastion-ips-go-here; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncoptions {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // sample allow-transfer (no one)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { none; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // default query access
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query { any; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // restrict cache access
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-query-cache { internals; externals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync // restrict recursion
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-recursion { internals; externals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsync// sample slave zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsynczone "site1.example.com" {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type master;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "m/site1.foo.com";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { internals; externals; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsynczone "site2.example.com" {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type slave;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "s/site2.foo.com";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync masters { another_bastion_host_maybe; };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync allow-transfer { internals; externals; }
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync In the <code class="filename">resolv.conf</code> (or equivalent) on
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the bastion host(s):
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncsearch ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncnameserver 172.16.72.2
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncnameserver 172.16.72.3
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncnameserver 172.16.72.4
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="tsig"></a>TSIG</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This is a short guide to setting up Transaction SIGnatures
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (TSIG) based transaction security in <acronym class="acronym">BIND</acronym>. It describes changes
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to the configuration file as well as what changes are required for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync different features, including the process of creating transaction
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keys and using transaction signatures with <acronym class="acronym">BIND</acronym>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <acronym class="acronym">BIND</acronym> primarily supports TSIG for server
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to server communication.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This includes zone transfer, notify, and recursive query messages.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Resolvers based on newer versions of <acronym class="acronym">BIND</acronym> 8 have limited support
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for TSIG.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync TSIG can also be useful for dynamic update. A primary
a180a41bba1d50822df23fff0099e90b86638b89vboxsync server for a dynamic zone should control access to the dynamic
a180a41bba1d50822df23fff0099e90b86638b89vboxsync update service, but IP-based access control is insufficient.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The cryptographic access control provided by TSIG
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is far superior. The <span><strong class="command">nsupdate</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync program supports TSIG via the <code class="option">-k</code> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="option">-y</code> command line options or inline by use
a180a41bba1d50822df23fff0099e90b86638b89vboxsync of the <span><strong class="command">key</strong></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571345"></a>Generate Shared Keys for Each Pair of Hosts</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync A shared secret is generated to be shared between <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync An arbitrary key name is chosen: "host1-host2.". The key name must
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be the same on both hosts.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect3" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h4 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571362"></a>Automatic Generation</h4></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The following command will generate a 128-bit (16 byte) HMAC-SHA256
a180a41bba1d50822df23fff0099e90b86638b89vboxsync key as described above. Longer keys are better, but shorter keys
a180a41bba1d50822df23fff0099e90b86638b89vboxsync are easier to read. Note that the maximum key length is the digest
a180a41bba1d50822df23fff0099e90b86638b89vboxsync length, here 256 bits.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <strong class="userinput"><code>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The key is in the file <code class="filename">Khost1-host2.+163+00000.private</code>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Nothing directly uses this file, but the base-64 encoded string
a180a41bba1d50822df23fff0099e90b86638b89vboxsync following "<code class="literal">Key:</code>"
a180a41bba1d50822df23fff0099e90b86638b89vboxsync can be extracted from the file and used as a shared secret:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">Key: La/E5CjG9O+os1jq0a2jdA==</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The string "<code class="literal">La/E5CjG9O+os1jq0a2jdA==</code>" can
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be used as the shared secret.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect3" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h4 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571537"></a>Manual Generation</h4></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The shared secret is simply a random sequence of bits, encoded
a180a41bba1d50822df23fff0099e90b86638b89vboxsync in base-64. Most ASCII strings are valid base-64 strings (assuming
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the length is a multiple of 4 and only valid characters are used),
a180a41bba1d50822df23fff0099e90b86638b89vboxsync so the shared secret can be manually generated.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Also, a known string can be run through <span><strong class="command">mmencode</strong></span> or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync a similar program to generate base-64 encoded data.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571555"></a>Copying the Shared Secret to Both Machines</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This is beyond the scope of DNS. A secure transport mechanism
a180a41bba1d50822df23fff0099e90b86638b89vboxsync should be used. This could be secure FTP, ssh, telephone, etc.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571565"></a>Informing the Servers of the Key's Existence</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Imagine <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host 2</em></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync both servers. The following is added to each server's <code class="filename">named.conf</code> file:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsynckey host1-host2. {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync algorithm hmac-sha256;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync secret "La/E5CjG9O+os1jq0a2jdA==";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The secret is the one generated above. Since this is a secret, it
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is recommended that either <code class="filename">named.conf</code> be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync non-world readable, or the key directive be added to a non-world
a180a41bba1d50822df23fff0099e90b86638b89vboxsync readable file that is included by <code class="filename">named.conf</code>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync At this point, the key is recognized. This means that if the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync server receives a message signed by this key, it can verify the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signature. If the signature is successfully verified, the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync response is signed by the same key.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571602"></a>Instructing the Server to Use the Key</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Since keys are shared between two hosts only, the server must
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be told when keys are to be used. The following is added to the <code class="filename">named.conf</code> file
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for <span class="emphasis"><em>host1</em></span>, if the IP address of <span class="emphasis"><em>host2</em></span> is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 10.1.2.3:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncserver 10.1.2.3 {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keys { host1-host2. ;};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Multiple keys may be present, but only the first is used.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This directive does not contain any secrets, so it may be in a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync world-readable
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If <span class="emphasis"><em>host1</em></span> sends a message that is a request
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to that address, the message will be signed with the specified key. <span class="emphasis"><em>host1</em></span> will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync expect any responses to signed messages to be signed with the same
a180a41bba1d50822df23fff0099e90b86638b89vboxsync key.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync A similar statement must be present in <span class="emphasis"><em>host2</em></span>'s
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configuration file (with <span class="emphasis"><em>host1</em></span>'s address) for <span class="emphasis"><em>host2</em></span> to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync sign request messages to <span class="emphasis"><em>host1</em></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571659"></a>TSIG Key Based Access Control</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <acronym class="acronym">BIND</acronym> allows IP addresses and ranges
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to be specified in ACL
a180a41bba1d50822df23fff0099e90b86638b89vboxsync definitions and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">allow-{ query | transfer | update }</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync directives.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This has been extended to allow TSIG keys also. The above key would
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be denoted <span><strong class="command">key host1-host2.</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync An example of an <span><strong class="command">allow-update</strong></span> directive would be:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncallow-update { key host1-host2. ;};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This allows dynamic updates to succeed only if the request
a180a41bba1d50822df23fff0099e90b86638b89vboxsync was signed by a key named "<span><strong class="command">host1-host2.</strong></span>".
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 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
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the more flexible <span><strong class="command">update-policy</strong></span> statement.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571708"></a>Errors</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The processing of TSIG signed messages can result in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync several errors. If a signed message is sent to a non-TSIG aware
a180a41bba1d50822df23fff0099e90b86638b89vboxsync server, a FORMERR (format error) will be returned, since the server will not
a180a41bba1d50822df23fff0099e90b86638b89vboxsync understand the record. This is a result of misconfiguration,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync since the server must be explicitly configured to send a TSIG
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signed message to a specific server.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If a TSIG aware server receives a message signed by an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync unknown key, the response will be unsigned with the TSIG
a180a41bba1d50822df23fff0099e90b86638b89vboxsync extended error code set to BADKEY. If a TSIG aware server
a180a41bba1d50822df23fff0099e90b86638b89vboxsync receives a message with a signature that does not validate, the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync response will be unsigned with the TSIG extended error code set
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to BADSIG. If a TSIG aware server receives a message with a time
a180a41bba1d50822df23fff0099e90b86638b89vboxsync outside of the allowed range, the response will be signed with
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the TSIG extended error code set to BADTIME, and the time values
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will be adjusted so that the response can be successfully
a180a41bba1d50822df23fff0099e90b86638b89vboxsync verified. In any of these cases, the message's rcode (response code) is set to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync NOTAUTH (not authenticated).
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571722"></a>TKEY</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p><span><strong class="command">TKEY</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is a mechanism for automatically generating a shared secret
a180a41bba1d50822df23fff0099e90b86638b89vboxsync between two hosts. There are several "modes" of
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">TKEY</strong></span> that specify how the key is generated
a180a41bba1d50822df23fff0099e90b86638b89vboxsync or assigned. <acronym class="acronym">BIND</acronym> 9 implements only one of
a180a41bba1d50822df23fff0099e90b86638b89vboxsync these modes, the Diffie-Hellman key exchange. Both hosts are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync required to have a Diffie-Hellman KEY record (although this
a180a41bba1d50822df23fff0099e90b86638b89vboxsync record is not required to be present in a zone). The
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">TKEY</strong></span> process must use signed messages,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signed either by TSIG or SIG(0). The result of
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">TKEY</strong></span> is a shared secret that can be used to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync sign messages with TSIG. <span><strong class="command">TKEY</strong></span> can also be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync used to delete shared secrets that it had previously
a180a41bba1d50822df23fff0099e90b86638b89vboxsync generated.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The <span><strong class="command">TKEY</strong></span> process is initiated by a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync client
a180a41bba1d50822df23fff0099e90b86638b89vboxsync or server by sending a signed <span><strong class="command">TKEY</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync query
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (including any appropriate KEYs) to a TKEY-aware server. The
a180a41bba1d50822df23fff0099e90b86638b89vboxsync server response, if it indicates success, will contain a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">TKEY</strong></span> record and any appropriate keys.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync After
a180a41bba1d50822df23fff0099e90b86638b89vboxsync this exchange, both participants have enough information to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync determine the shared secret; the exact process depends on the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">TKEY</strong></span> mode. When using the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Diffie-Hellman
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">TKEY</strong></span> mode, Diffie-Hellman keys are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync exchanged,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and the shared secret is derived by both participants.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2563989"></a>SIG(0)</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <acronym class="acronym">BIND</acronym> 9 partially supports DNSSEC SIG(0)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync transaction signatures as specified in RFC 2535 and RFC 2931.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync SIG(0)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync uses public/private keys to authenticate messages. Access control
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is performed in the same manner as TSIG keys; privileges can be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync granted or denied based on the key name.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync When a SIG(0) signed message is received, it will only be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync verified if the key is known and trusted by the server; the server
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will not attempt to locate and/or validate the key.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync SIG(0) signing of multiple-message TCP streams is not
a180a41bba1d50822df23fff0099e90b86638b89vboxsync supported.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The only tool shipped with <acronym class="acronym">BIND</acronym> 9 that
a180a41bba1d50822df23fff0099e90b86638b89vboxsync generates SIG(0) signed messages is <span><strong class="command">nsupdate</strong></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="DNSSEC"></a>DNSSEC</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Cryptographic authentication of DNS information is possible
a180a41bba1d50822df23fff0099e90b86638b89vboxsync through the DNS Security (<span class="emphasis"><em>DNSSEC-bis</em></span>) extensions,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync defined in RFC 4033, RFC 4034, and RFC 4035.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This section describes the creation and use of DNSSEC signed zones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync In order to set up a DNSSEC secure zone, there are a series
a180a41bba1d50822df23fff0099e90b86638b89vboxsync of steps which must be followed. <acronym class="acronym">BIND</acronym>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 9 ships
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with several tools
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that are used in this process, which are explained in more detail
a180a41bba1d50822df23fff0099e90b86638b89vboxsync below. In all cases, the <code class="option">-h</code> option prints a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync full list of parameters. Note that the DNSSEC tools require the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keyset files to be in the working directory or the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync directory specified by the <code class="option">-d</code> option, and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that the tools shipped with BIND 9.2.x and earlier are not compatible
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with the current ones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync There must also be communication with the administrators of
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the parent and/or child zone to transmit keys. A zone's security
a180a41bba1d50822df23fff0099e90b86638b89vboxsync status must be indicated by the parent zone for a DNSSEC capable
a180a41bba1d50822df23fff0099e90b86638b89vboxsync resolver to trust its data. This is done through the presence
a180a41bba1d50822df23fff0099e90b86638b89vboxsync or absence of a <code class="literal">DS</code> record at the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync delegation
a180a41bba1d50822df23fff0099e90b86638b89vboxsync point.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync For other servers to trust data in this zone, they must
a180a41bba1d50822df23fff0099e90b86638b89vboxsync either be statically configured with this zone's zone key or the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone key of another zone above this one in the DNS tree.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2564057"></a>Generating Keys</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The <span><strong class="command">dnssec-keygen</strong></span> program is used to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync generate keys.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync A secure zone must contain one or more zone keys. The
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone keys will sign all other records in the zone, as well as
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the zone keys of any secure delegated zones. Zone keys must
a180a41bba1d50822df23fff0099e90b86638b89vboxsync have the same name as the zone, a name type of
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">ZONE</strong></span>, and must be usable for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync authentication.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync It is recommended that zone keys use a cryptographic algorithm
a180a41bba1d50822df23fff0099e90b86638b89vboxsync designated as "mandatory to implement" by the IETF; currently
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the only one is RSASHA1.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The following command will generate a 768-bit RSASHA1 key for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the <code class="filename">child.example</code> zone:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <strong class="userinput"><code>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Two output files will be produced:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">Kchild.example.+005+12345.key</code> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">Kchild.example.+005+12345.private</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (where
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 12345 is an example of a key tag). The key filenames contain
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the key name (<code class="filename">child.example.</code>),
a180a41bba1d50822df23fff0099e90b86638b89vboxsync algorithm (3
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync this case).
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The private key (in the <code class="filename">.private</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file) is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync used to generate signatures, and the public key (in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">.key</code> file) is used for signature
a180a41bba1d50822df23fff0099e90b86638b89vboxsync verification.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync To generate another key with the same properties (but with
a180a41bba1d50822df23fff0099e90b86638b89vboxsync a different key tag), repeat the above command.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The <span><strong class="command">dnssec-keyfromlabel</strong></span> program is used
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to get a key pair from a crypto hardware and build the key
a180a41bba1d50822df23fff0099e90b86638b89vboxsync files. Its usage is similar to <span><strong class="command">dnssec-keygen</strong></span>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The public keys should be inserted into the zone file by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync including the <code class="filename">.key</code> files using
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">$INCLUDE</strong></span> statements.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2572192"></a>Signing the Zone</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The <span><strong class="command">dnssec-signzone</strong></span> program is used
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to sign a zone.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Any <code class="filename">keyset</code> files corresponding to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync secure subzones should be present. The zone signer will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync generate <code class="literal">NSEC</code>, <code class="literal">NSEC3</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and <code class="literal">RRSIG</code> records for the zone, as
a180a41bba1d50822df23fff0099e90b86638b89vboxsync well as <code class="literal">DS</code> for the child zones if
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="literal">'-g'</code> is specified. If <code class="literal">'-g'</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is not specified, then DS RRsets for the secure child
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zones need to be added manually.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The following command signs the zone, assuming it is in a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file called <code class="filename">zone.child.example</code>. By
a180a41bba1d50822df23fff0099e90b86638b89vboxsync default, all zone keys which have an available private key are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync used to generate signatures.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <strong class="userinput"><code>dnssec-signzone -o child.example zone.child.example</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync One output file is produced:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">zone.child.example.signed</code>. This
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file
a180a41bba1d50822df23fff0099e90b86638b89vboxsync should be referenced by <code class="filename">named.conf</code>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync as the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync input file for the zone.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p><span><strong class="command">dnssec-signzone</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will also produce a keyset and dsset files and optionally a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync dlvset file. These are used to provide the parent zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync administrators with the <code class="literal">DNSKEYs</code> (or their
a180a41bba1d50822df23fff0099e90b86638b89vboxsync corresponding <code class="literal">DS</code> records) that are the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync secure entry point to the zone.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2572273"></a>Configuring Servers</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync To enable <span><strong class="command">named</strong></span> to respond appropriately
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to DNS requests from DNSSEC aware clients,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-enable</strong></span> must be set to yes.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (This is the default setting.)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync To enable <span><strong class="command">named</strong></span> to validate answers from
a180a41bba1d50822df23fff0099e90b86638b89vboxsync other servers, the <span><strong class="command">dnssec-enable</strong></span> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-validation</strong></span> options must both be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync set to yes (the default setting in <acronym class="acronym">BIND</acronym> 9.5
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and later), and at least one trust anchor must be configured
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with a <span><strong class="command">trusted-keys</strong></span> or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">managed-keys</strong></span> statement in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">named.conf</code>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">trusted-keys</strong></span> are copies of DNSKEY RRs
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for zones that are used to form the first link in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync cryptographic chain of trust. All keys listed in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">trusted-keys</strong></span> (and corresponding zones)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync are deemed to exist and only the listed keys will be used
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to validated the DNSKEY RRset that they are from.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">managed-keys</strong></span> are trusted keys which are
a180a41bba1d50822df23fff0099e90b86638b89vboxsync automatically kept up to date via RFC 5011 trust anchor
a180a41bba1d50822df23fff0099e90b86638b89vboxsync maintenance.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">trusted-keys</strong></span> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">managed-keys</strong></span> are described in more detail
a180a41bba1d50822df23fff0099e90b86638b89vboxsync later in this document.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Unlike <acronym class="acronym">BIND</acronym> 8, <acronym class="acronym">BIND</acronym>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 9 does not verify signatures on load, so zone keys for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync authoritative zones do not need to be specified in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configuration file.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync After DNSSEC gets established, a typical DNSSEC configuration
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will look something like the following. It has one or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync more public keys for the root. This allows answers from
a180a41bba1d50822df23fff0099e90b86638b89vboxsync outside the organization to be validated. It will also
a180a41bba1d50822df23fff0099e90b86638b89vboxsync have several keys for parts of the namespace the organization
a180a41bba1d50822df23fff0099e90b86638b89vboxsync controls. These are here to ensure that <span><strong class="command">named</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is immune to compromises in the DNSSEC components of the security
a180a41bba1d50822df23fff0099e90b86638b89vboxsync of parent zones.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncmanaged-keys {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync /* Root Key */
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
a180a41bba1d50822df23fff0099e90b86638b89vboxsync JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
a180a41bba1d50822df23fff0099e90b86638b89vboxsync aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
a180a41bba1d50822df23fff0099e90b86638b89vboxsync hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
a180a41bba1d50822df23fff0099e90b86638b89vboxsync g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
a180a41bba1d50822df23fff0099e90b86638b89vboxsync dgxbcDTClU0CRBdiieyLMNzXG3";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsynctrusted-keys {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync /* Key for our organization's forward zone */
a180a41bba1d50822df23fff0099e90b86638b89vboxsync example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
a180a41bba1d50822df23fff0099e90b86638b89vboxsync GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
a180a41bba1d50822df23fff0099e90b86638b89vboxsync kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
a180a41bba1d50822df23fff0099e90b86638b89vboxsync g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
a180a41bba1d50822df23fff0099e90b86638b89vboxsync TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
a180a41bba1d50822df23fff0099e90b86638b89vboxsync FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
a180a41bba1d50822df23fff0099e90b86638b89vboxsync F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
a180a41bba1d50822df23fff0099e90b86638b89vboxsync /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 1OTQ09A0=";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsync /* Key for our reverse zone. */
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
a180a41bba1d50822df23fff0099e90b86638b89vboxsync xOdNax071L18QqZnQQQAVVr+i
a180a41bba1d50822df23fff0099e90b86638b89vboxsync LhGTnNGp3HoWQLUIzKrJVZ3zg
a180a41bba1d50822df23fff0099e90b86638b89vboxsync gy3WwNT6kZo6c0tszYqbtvchm
a180a41bba1d50822df23fff0099e90b86638b89vboxsync gQC8CzKojM/W16i6MG/eafGU3
a180a41bba1d50822df23fff0099e90b86638b89vboxsync siaOdS0yOI6BgPsw+YZdzlYMa
a180a41bba1d50822df23fff0099e90b86638b89vboxsync IJGf4M4dyoKIhzdZyQ2bYQrjy
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Q4LB0lC7aOnsMyYKHHYeRvPxj
a180a41bba1d50822df23fff0099e90b86638b89vboxsync IQXmdqgOJGq+vsevG06zW+1xg
a180a41bba1d50822df23fff0099e90b86638b89vboxsync YJh9rCIfnm1GX/KMgxLPG2vXT
a180a41bba1d50822df23fff0099e90b86638b89vboxsync D/RnLX+D3T3UL7HJYHJhAZD5L
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 59VvjSPsZJHeDCUyWYrvPZesZ
a180a41bba1d50822df23fff0099e90b86638b89vboxsync DIRvhDD52SKvbheeTJUm6Ehkz
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ytNN2SN96QRk8j/iI8ib";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncoptions {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ...
a180a41bba1d50822df23fff0099e90b86638b89vboxsync dnssec-enable yes;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync dnssec-validation yes;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync};
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<h3 class="title">Note</h3>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync None of the keys listed in this example are valid. In particular,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the root key is not valid.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync When DNSSEC validation is enabled and properly configured,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the resolver will reject any answers from signed, secure zones
a180a41bba1d50822df23fff0099e90b86638b89vboxsync which fail to validate, and will return SERVFAIL to the client.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Responses may fail to validate for any of several reasons,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync including missing, expired, or invalid signatures, a key which
a180a41bba1d50822df23fff0099e90b86638b89vboxsync does not match the DS RRset in the parent zone, or an insecure
a180a41bba1d50822df23fff0099e90b86638b89vboxsync response from a zone which, according to its parent, should have
a180a41bba1d50822df23fff0099e90b86638b89vboxsync been secure.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<h3 class="title">Note</h3>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync When the validator receives a response from an unsigned zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that has a signed parent, it must confirm with the parent
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that the zone was intentionally left unsigned. It does
a180a41bba1d50822df23fff0099e90b86638b89vboxsync this by verifying, via signed and validated NSEC/NSEC3 records,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that the parent zone contains no DS records for the child.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If the validator <span class="emphasis"><em>can</em></span> prove that the zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is insecure, then the response is accepted. However, if it
a180a41bba1d50822df23fff0099e90b86638b89vboxsync cannot, then it must assume an insecure response to be a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync forgery; it rejects the response and logs an error.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The logged error reads "insecurity proof failed" and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "got insecure response; parent indicates it should be secure".
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (Prior to BIND 9.7, the logged error was "not insecure".
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This referred to the zone, not the response.)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="dnssec.dynamic.zones"></a>DNSSEC, Dynamic Zones, and Automatic Signing</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>As of BIND 9.7.0 it is possible to change a dynamic zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync from insecure to signed and back again. A secure zone can use
a180a41bba1d50822df23fff0099e90b86638b89vboxsync either NSEC or NSEC3 chains.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571833"></a>Converting from insecure to secure</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Changing a zone from insecure to secure can be done in two
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ways: using a dynamic DNS update, or the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec</strong></span> zone option.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>For either method, you need to configure
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> so that it can see the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">K*</code> files which contain the public and private
a180a41bba1d50822df23fff0099e90b86638b89vboxsync parts of the keys that will be used to sign the zone. These files
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will have been generated by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-keygen</strong></span>. You can do this by placing them
a180a41bba1d50822df23fff0099e90b86638b89vboxsync in the key-directory, as specified in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">named.conf</code>:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone example.net {
a180a41bba1d50822df23fff0099e90b86638b89vboxsync type master;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync update-policy local;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync file "dynamic/example.net/example.net";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync key-directory "dynamic/example.net";
a180a41bba1d50822df23fff0099e90b86638b89vboxsync };
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If one KSK and one ZSK DNSKEY key have been generated, this
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configuration will cause all records in the zone to be signed
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with the ZSK, and the DNSKEY RRset to be signed with the KSK as
a180a41bba1d50822df23fff0099e90b86638b89vboxsync well. An NSEC chain will be generated as part of the initial
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signing process.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571870"></a>Dynamic DNS update method</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To insert the keys via dynamic update:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync % nsupdate
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; ttl 3600
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; update add example.net DNSKEY 256 3 7 AwEAAZn17pUF0KpbPA2c7Gz76Vb18v0teKT3EyAGfBfL8eQ8al35zz3Y I1m/SAQBxIqMfLtIwqWPdgthsu36azGQAX8=
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; update add example.net DNSKEY 257 3 7 AwEAAd/7odU/64o2LGsifbLtQmtO8dFDtTAZXSX2+X3e/UNlq9IHq3Y0 XtC0Iuawl/qkaKVxXe2lo8Ct+dM6UehyCqk=
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; send
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>While the update request will complete almost immediately,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the zone will not be completely signed until
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> has had time to walk the zone and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync generate the NSEC and RRSIG records. The NSEC record at the apex
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will be added last, to signal that there is a complete NSEC
a180a41bba1d50822df23fff0099e90b86638b89vboxsync chain.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If you wish to sign using NSEC3 instead of NSEC, you should
a180a41bba1d50822df23fff0099e90b86638b89vboxsync add an NSEC3PARAM record to the initial update request. If you
a180a41bba1d50822df23fff0099e90b86638b89vboxsync wish the NSEC3 chain to have the OPTOUT bit set, set it in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync flags field of the NSEC3PARAM record.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync % nsupdate
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; ttl 3600
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; update add example.net DNSKEY 256 3 7 AwEAAZn17pUF0KpbPA2c7Gz76Vb18v0teKT3EyAGfBfL8eQ8al35zz3Y I1m/SAQBxIqMfLtIwqWPdgthsu36azGQAX8=
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; update add example.net DNSKEY 257 3 7 AwEAAd/7odU/64o2LGsifbLtQmtO8dFDtTAZXSX2+X3e/UNlq9IHq3Y0 XtC0Iuawl/qkaKVxXe2lo8Ct+dM6UehyCqk=
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; update add example.net NSEC3PARAM 1 1 100 1234567890
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &gt; send
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Again, this update request will complete almost
a180a41bba1d50822df23fff0099e90b86638b89vboxsync immediately; however, the record won't show up until
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> has had a chance to build/remove the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync relevant chain. A private type record will be created to record
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the state of the operation (see below for more details), and will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be removed once the operation completes.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>While the initial signing and NSEC/NSEC3 chain generation
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is happening, other updates are possible as well.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2563442"></a>Fully automatic zone signing</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To enable automatic signing, add the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec</strong></span> option to the zone statement in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">named.conf</code>.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec</strong></span> has two possible arguments:
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="constant">allow</code> or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="constant">maintain</code>.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>With
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec allow</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> can search the key directory for keys
a180a41bba1d50822df23fff0099e90b86638b89vboxsync matching the zone, insert them into the zone, and use them to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync sign the zone. It will do so only when it receives an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">rndc sign &lt;zonename&gt;</strong></span> or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">rndc loadkeys &lt;zonename&gt;</strong></span> command.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec maintain</strong></span> includes the above
a180a41bba1d50822df23fff0099e90b86638b89vboxsync functionality, but will also automatically adjust the zone's
a180a41bba1d50822df23fff0099e90b86638b89vboxsync DNSKEY records on schedule according to the keys' timing metadata.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (See <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a> for more information.)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync If keys are present in the key directory the first time the zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is loaded, it will be signed immediately, without waiting for an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">rndc sign</strong></span> or <span><strong class="command">rndc loadkeys</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync command. (Those commands can still be used when there are unscheduled
a180a41bba1d50822df23fff0099e90b86638b89vboxsync key changes, however.)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Using the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec</strong></span> option requires the zone to be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configured to allow dynamic updates, by adding an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">allow-update</strong></span> or
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">update-policy</strong></span> statement to the zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configuration. If this has not been done, the configuration will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync fail.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2563729"></a>Private-type records</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The state of the signing process is signaled by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync private-type records (with a default type value of 65534). When
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signing is complete, these records will have a nonzero value for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the final octet (for those records which have a nonzero initial
a180a41bba1d50822df23fff0099e90b86638b89vboxsync octet).</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The private type record format: If the first octet is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync non-zero then the record indicates that the zone needs to be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signed with the key matching the record, or that all signatures
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that match the record should be removed.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="literallayout"><p><br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��algorithm�(octet�1)<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��key�id�in�network�order�(octet�2�and�3)<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��removal�flag�(octet�4)<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��complete�flag�(octet�5)<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</p></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Only records flagged as "complete" can be removed via
a180a41bba1d50822df23fff0099e90b86638b89vboxsync dynamic update. Attempts to remove other private type records
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will be silently ignored.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If the first octet is zero (this is a reserved algorithm
a180a41bba1d50822df23fff0099e90b86638b89vboxsync number that should never appear in a DNSKEY record) then the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync record indicates changes to the NSEC3 chains are in progress. The
a180a41bba1d50822df23fff0099e90b86638b89vboxsync rest of the record contains an NSEC3PARAM record. The flag field
a180a41bba1d50822df23fff0099e90b86638b89vboxsync tells what operation to perform based on the flag bits.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="literallayout"><p><br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��0x01�OPTOUT<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��0x80�CREATE<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��0x40�REMOVE<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync��0x20�NONSEC<br>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</p></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2563834"></a>DNSKEY rollovers</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>As with insecure-to-secure conversions, rolling DNSSEC
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keys can be done in two ways: using a dynamic DNS update, or the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">auto-dnssec</strong></span> zone option.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2563847"></a>Dynamic DNS update method</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p> To perform key rollovers via dynamic update, you need to add
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the <code class="filename">K*</code> files for the new keys so that
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> can find them. You can then add the new
a180a41bba1d50822df23fff0099e90b86638b89vboxsync DNSKEY RRs via dynamic update.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> will then cause the zone to be signed
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with the new keys. When the signing is complete the private type
a180a41bba1d50822df23fff0099e90b86638b89vboxsync records will be updated so that the last octet is non
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zero.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If this is for a KSK you need to inform the parent and any
a180a41bba1d50822df23fff0099e90b86638b89vboxsync trust anchor repositories of the new KSK.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>You should then wait for the maximum TTL in the zone before
a180a41bba1d50822df23fff0099e90b86638b89vboxsync removing the old DNSKEY. If it is a KSK that is being updated,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync you also need to wait for the DS RRset in the parent to be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync updated and its TTL to expire. This ensures that all clients will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be able to verify at least one signature when you remove the old
a180a41bba1d50822df23fff0099e90b86638b89vboxsync DNSKEY.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The old DNSKEY can be removed via UPDATE. Take care to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync specify the correct key.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> will clean out any signatures generated
a180a41bba1d50822df23fff0099e90b86638b89vboxsync by the old key after the update completes.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2563880"></a>Automatic key rollovers</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>When a new key reaches its activation date (as set by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-keygen</strong></span> or <span><strong class="command">dnssec-settime</strong></span>),
a180a41bba1d50822df23fff0099e90b86638b89vboxsync if the <span><strong class="command">auto-dnssec</strong></span> zone option is set to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="constant">maintain</code>, <span><strong class="command">named</strong></span> will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync automatically carry out the key rollover. If the key's algorithm
a180a41bba1d50822df23fff0099e90b86638b89vboxsync has not previously been used to sign the zone, then the zone will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync be fully signed as quickly as possible. However, if the new key
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is replacing an existing key of the same algorithm, then the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone will be re-signed incrementally, with signatures from the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync old key being replaced with signatures from the new key as their
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signature validity periods expire. By default, this rollover
a180a41bba1d50822df23fff0099e90b86638b89vboxsync completes in 30 days, after which it will be safe to remove the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync old key from the DNSKEY RRset.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571894"></a>NSEC3PARAM rollovers via UPDATE</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Add the new NSEC3PARAM record via dynamic update. When the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync new NSEC3 chain has been generated, the NSEC3PARAM flag field
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will be zero. At this point you can remove the old NSEC3PARAM
a180a41bba1d50822df23fff0099e90b86638b89vboxsync record. The old chain will be removed after the update request
a180a41bba1d50822df23fff0099e90b86638b89vboxsync completes.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571904"></a>Converting from NSEC to NSEC3</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To do this, you just need to add an NSEC3PARAM record. When
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the conversion is complete, the NSEC chain will have been removed
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and the NSEC3PARAM record will have a zero flag field. The NSEC3
a180a41bba1d50822df23fff0099e90b86638b89vboxsync chain will be generated before the NSEC chain is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync destroyed.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571913"></a>Converting from NSEC3 to NSEC</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To do this, use <span><strong class="command">nsupdate</strong></span> to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync remove all NSEC3PARAM records with a zero flag
a180a41bba1d50822df23fff0099e90b86638b89vboxsync field. The NSEC chain will be generated before the NSEC3 chain is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync removed.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571926"></a>Converting from secure to insecure</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To convert a signed zone to unsigned using dynamic DNS,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync delete all the DNSKEY records from the zone apex using
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">nsupdate</strong></span>. All signatures, NSEC or NSEC3 chains,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and associated NSEC3PARAM records will be removed automatically.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This will take place after the update request completes.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p> This requires the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-secure-to-insecure</strong></span> option to be set to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <strong class="userinput"><code>yes</code></strong> in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">named.conf</code>.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>In addition, if the <span><strong class="command">auto-dnssec maintain</strong></span>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone statement is used, it should be removed or changed to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">allow</strong></span> instead (or it will re-sign).
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571963"></a>Periodic re-signing</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>In any secure zone which supports dynamic updates, named
a180a41bba1d50822df23fff0099e90b86638b89vboxsync will periodically re-sign RRsets which have not been re-signed as
a180a41bba1d50822df23fff0099e90b86638b89vboxsync a result of some update action. The signature lifetimes will be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync adjusted so as to spread the re-sign load over time rather than
a180a41bba1d50822df23fff0099e90b86638b89vboxsync all at once.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2571973"></a>NSEC3 and OPTOUT</h3></div></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> only supports creating new NSEC3 chains
a180a41bba1d50822df23fff0099e90b86638b89vboxsync where all the NSEC3 records in the zone have the same OPTOUT
a180a41bba1d50822df23fff0099e90b86638b89vboxsync state.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> supports UPDATES to zones where the NSEC3
a180a41bba1d50822df23fff0099e90b86638b89vboxsync records in the chain have mixed OPTOUT state.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> does not support changing the OPTOUT
a180a41bba1d50822df23fff0099e90b86638b89vboxsync state of an individual NSEC3 record, the entire chain needs to be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync changed if the OPTOUT state of an individual NSEC3 needs to be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync changed.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="rfc5011.support"></a>Dynamic Trust Anchor Management</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>BIND 9.7.0 introduces support for RFC 5011, dynamic trust
a180a41bba1d50822df23fff0099e90b86638b89vboxsync anchor management. Using this feature allows
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> to keep track of changes to critical
a180a41bba1d50822df23fff0099e90b86638b89vboxsync DNSSEC keys without any need for the operator to make changes to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configuration files.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606433"></a>Validating Resolver</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To configure a validating resolver to use RFC 5011 to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync maintain a trust anchor, configure the trust anchor using a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">managed-keys</strong></span> statement. Information about
a180a41bba1d50822df23fff0099e90b86638b89vboxsync this can be found in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <a href="Bv9ARM.ch06.html#managed-keys" title="managed-keys Statement Definition
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and Usage">the section called &#8220;<span><strong class="command">managed-keys</strong></span> Statement Definition
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and Usage&#8221;</a>.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606455"></a>Authoritative Server</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To set up an authoritative zone for RFC 5011 trust anchor
a180a41bba1d50822df23fff0099e90b86638b89vboxsync maintenance, generate two (or more) key signing keys (KSKs) for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the zone. Sign the zone with one of them; this is the "active"
a180a41bba1d50822df23fff0099e90b86638b89vboxsync KSK. All KSK's which do not sign the zone are "stand-by"
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keys.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Any validating resolver which is configured to use the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync active KSK as an RFC 5011-managed trust anchor will take note
a180a41bba1d50822df23fff0099e90b86638b89vboxsync of the stand-by KSKs in the zone's DNSKEY RRset, and store them
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for future reference. The resolver will recheck the zone
a180a41bba1d50822df23fff0099e90b86638b89vboxsync periodically, and after 30 days, if the new key is still there,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync then the key will be accepted by the resolver as a valid trust
a180a41bba1d50822df23fff0099e90b86638b89vboxsync anchor for the zone. Any time after this 30-day acceptance
a180a41bba1d50822df23fff0099e90b86638b89vboxsync timer has completed, the active KSK can be revoked, and the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync zone can be "rolled over" to the newly accepted key.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The easiest way to place a stand-by key in a zone is to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync use the "smart signing" features of
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-keygen</strong></span> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-signzone</strong></span>. If a key with a publication
a180a41bba1d50822df23fff0099e90b86638b89vboxsync date in the past, but an activation date which is unset or in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the future, "
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-signzone -S</strong></span>" will include the DNSKEY
a180a41bba1d50822df23fff0099e90b86638b89vboxsync record in the zone, but will not sign with it:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-keygen -K keys -f KSK -P now -A now+2y example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-signzone -S -K keys example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To revoke a key, the new command
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-revoke</strong></span> has been added. This adds the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync REVOKED bit to the key flags and re-generates the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">K*.key</code> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">K*.private</code> files.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>After revoking the active key, the zone must be signed
a180a41bba1d50822df23fff0099e90b86638b89vboxsync with both the revoked KSK and the new active KSK. (Smart
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signing takes care of this automatically.)</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Once a key has been revoked and used to sign the DNSKEY
a180a41bba1d50822df23fff0099e90b86638b89vboxsync RRset in which it appears, that key will never again be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync accepted as a valid trust anchor by the resolver. However,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync validation can proceed using the new active key (which had been
a180a41bba1d50822df23fff0099e90b86638b89vboxsync accepted by the resolver when it was a stand-by key).</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>See RFC 5011 for more details on key rollover
a180a41bba1d50822df23fff0099e90b86638b89vboxsync scenarios.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>When a key has been revoked, its key ID changes,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync increasing by 128, and wrapping around at 65535. So, for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync example, the key "<code class="filename">Kexample.com.+005+10000</code>" becomes
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<code class="filename">Kexample.com.+005+10128</code>".</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If two keys have ID's exactly 128 apart, and one is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync revoked, then the two key ID's will collide, causing several
a180a41bba1d50822df23fff0099e90b86638b89vboxsync problems. To prevent this,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-keygen</strong></span> will not generate a new key if
a180a41bba1d50822df23fff0099e90b86638b89vboxsync another key is present which may collide. This checking will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync only occur if the new keys are written to the same directory
a180a41bba1d50822df23fff0099e90b86638b89vboxsync which holds all other keys in use for that zone.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Older versions of BIND 9 did not have this precaution.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Exercise caution if using key revocation on keys that were
a180a41bba1d50822df23fff0099e90b86638b89vboxsync generated by previous releases, or if using keys stored in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync multiple directories or on multiple machines.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>It is expected that a future release of BIND 9 will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync address this problem in a different way, by storing revoked
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keys with their original unrevoked key ID's.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="pkcs11"></a>PKCS #11 (Cryptoki) support</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>PKCS #11 (Public Key Cryptography Standard #11) defines a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync platform- independent API for the control of hardware security
a180a41bba1d50822df23fff0099e90b86638b89vboxsync modules (HSMs) and other cryptographic support devices.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>BIND 9 is known to work with two HSMs: The Sun SCA 6000
a180a41bba1d50822df23fff0099e90b86638b89vboxsync cryptographic acceleration board, tested under Solaris x86, and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the AEP Keyper network-attached key storage device, tested with
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Debian Linux, Solaris x86 and Windows Server 2003.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2608344"></a>Prerequisites</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>See the HSM vendor documentation for information about
a180a41bba1d50822df23fff0099e90b86638b89vboxsync installing, initializing, testing and troubleshooting the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync HSM.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>BIND 9 uses OpenSSL for cryptography, but stock OpenSSL
a180a41bba1d50822df23fff0099e90b86638b89vboxsync does not yet fully support PKCS #11. However, a PKCS #11 engine
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for OpenSSL is available from the OpenSolaris project. It has
a180a41bba1d50822df23fff0099e90b86638b89vboxsync been modified by ISC to work with with BIND 9, and to provide
a180a41bba1d50822df23fff0099e90b86638b89vboxsync new features such as PIN management and key by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync reference.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The patched OpenSSL depends on a "PKCS #11 provider".
a180a41bba1d50822df23fff0099e90b86638b89vboxsync This is a shared library object, providing a low-level PKCS #11
a180a41bba1d50822df23fff0099e90b86638b89vboxsync interface to the HSM hardware. It is dynamically loaded by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync OpenSSL at runtime. The PKCS #11 provider comes from the HSM
a180a41bba1d50822df23fff0099e90b86638b89vboxsync vendor, and and is specific to the HSM to be controlled.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>There are two "flavors" of PKCS #11 support provided by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the patched OpenSSL, one of which must be chosen at
a180a41bba1d50822df23fff0099e90b86638b89vboxsync configuration time. The correct choice depends on the HSM
a180a41bba1d50822df23fff0099e90b86638b89vboxsync hardware:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="itemizedlist"><ul type="disc">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li><p>Use 'crypto-accelerator' with HSMs that have hardware
a180a41bba1d50822df23fff0099e90b86638b89vboxsync cryptographic acceleration features, such as the SCA 6000
a180a41bba1d50822df23fff0099e90b86638b89vboxsync board. This causes OpenSSL to run all supported
a180a41bba1d50822df23fff0099e90b86638b89vboxsync cryptographic operations in the HSM.</p></li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<li><p>Use 'sign-only' with HSMs that are designed to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync function primarily as secure key storage devices, but lack
a180a41bba1d50822df23fff0099e90b86638b89vboxsync hardware acceleration. These devices are highly secure, but
a180a41bba1d50822df23fff0099e90b86638b89vboxsync are not necessarily any faster at cryptography than the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync system CPU &#8212; often, they are slower. It is therefore
a180a41bba1d50822df23fff0099e90b86638b89vboxsync most efficient to use them only for those cryptographic
a180a41bba1d50822df23fff0099e90b86638b89vboxsync functions that require access to the secured private key,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync such as zone signing, and to use the system CPU for all
a180a41bba1d50822df23fff0099e90b86638b89vboxsync other computationally-intensive operations. The AEP Keyper
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is an example of such a device.</p></li>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</ul></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The modified OpenSSL code is included in the BIND 9.7.0
a180a41bba1d50822df23fff0099e90b86638b89vboxsync release, in the form of a context diff against the latest OpenSSL.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<h3 class="title">Note</h3>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync The latest OpenSSL version at the time of the BIND release
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is 0.9.8l.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync ISC will provide an updated patch as new versions of OpenSSL
a180a41bba1d50822df23fff0099e90b86638b89vboxsync are released. The version number in the following examples
a180a41bba1d50822df23fff0099e90b86638b89vboxsync is expected to change.</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Before building BIND 9 with PKCS #11 support, it will be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync necessary to build OpenSSL with this patch in place and inform
a180a41bba1d50822df23fff0099e90b86638b89vboxsync it of the path to the HSM-specific PKCS #11 provider
a180a41bba1d50822df23fff0099e90b86638b89vboxsync library.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Obtain OpenSSL 0.9.8l:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>wget <a href="" target="_top">http://www.openssl.org/source/openssl-0.9.8l.tar.gz</a></code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Extract the tarball:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>tar zxf openssl-0.9.8l.tar.gz</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Apply the patch from the BIND 9 release:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>patch -p1 -d openssl-0.9.8l \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &lt; bind-9.7.0/bin/pkcs11/openssl-0.9.8l-patch</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<h3 class="title">Note</h3>(Note that the patch file may not be compatible with the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "patch" utility on all operating systems. You may need to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync install GNU patch.)</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>When building OpenSSL, place it in a non-standard
a180a41bba1d50822df23fff0099e90b86638b89vboxsync location so that it does not interfere with OpenSSL libraries
a180a41bba1d50822df23fff0099e90b86638b89vboxsync elsewhere on the system. In the following examples, we choose
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to install into "/opt/pkcs11/usr". We will use this location
a180a41bba1d50822df23fff0099e90b86638b89vboxsync when we configure BIND 9.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect3" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h4 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606256"></a>Building OpenSSL for the AEP Keyper on Linux</h4></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The AEP Keyper is a highly secure key storage device,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync but does not provide hardware cryptographic acceleration. It
a180a41bba1d50822df23fff0099e90b86638b89vboxsync can carry out cryptographic operations, but it is probably
a180a41bba1d50822df23fff0099e90b86638b89vboxsync slower than your system's CPU. Therefore, we choose the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 'sign-only' flavor when building OpenSSL.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The Keyper-specific PKCS #11 provider library is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync delivered with the Keyper software. In this example, we place
a180a41bba1d50822df23fff0099e90b86638b89vboxsync it /opt/pkcs11/usr/lib:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>cp pkcs11.GCC4.0.2.so.4.05 /opt/pkcs11/usr/lib/libpkcs11.so</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>This library is only available for Linux as a 32-bit
a180a41bba1d50822df23fff0099e90b86638b89vboxsync binary. If we are compiling on a 64-bit Linux system, it is
a180a41bba1d50822df23fff0099e90b86638b89vboxsync necessary to force a 32-bit build, by specifying -m32 in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync build options.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Finally, the Keyper library requires threads, so we
a180a41bba1d50822df23fff0099e90b86638b89vboxsync must specify -pthread.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>cd openssl-0.9.8l</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>/Configure linux-generic32 -m32 -pthread \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --pk11-libname=/opt/pkcs11/usr/lib/libpkcs11.so \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --pk11-flavor=sign-only \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --prefix=/opt/pkcs11/usr</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>After configuring, run "<span><strong class="command">make</strong></span>"
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and "<span><strong class="command">make test</strong></span>". If "<span><strong class="command">make
a180a41bba1d50822df23fff0099e90b86638b89vboxsync test</strong></span>" fails with "pthread_atfork() not found", you forgot to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync add the -pthread above.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect3" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h4 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606325"></a>Building OpenSSL for the SCA 6000 on Solaris</h4></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The SCA-6000 PKCS #11 provider is installed as a system
a180a41bba1d50822df23fff0099e90b86638b89vboxsync library, libpkcs11. It is a true crypto accelerator, up to 4
a180a41bba1d50822df23fff0099e90b86638b89vboxsync times faster than any CPU, so the flavor shall be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 'crypto-accelerator'.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>In this example, we are building on Solaris x86 on an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync AMD64 system.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>cd openssl-0.9.8l</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>/Configure solaris64-x86_64-cc \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --pk11-libname=/usr/lib/64/libpkcs11.so \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --pk11-flavor=crypto-accelerator \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --prefix=/opt/pkcs11/usr</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>(For a 32-bit build, use "solaris-x86-cc" and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync /usr/lib/libpkcs11.so.)</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>After configuring, run
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">make</strong></span> and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">make test</strong></span>.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Once you have built OpenSSL, run
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<span><strong class="command">apps/openssl engine pkcs11</strong></span>" to confirm
a180a41bba1d50822df23fff0099e90b86638b89vboxsync that PKCS #11 support was compiled in correctly. The output
a180a41bba1d50822df23fff0099e90b86638b89vboxsync should be one of the following lines, depending on the flavor
a180a41bba1d50822df23fff0099e90b86638b89vboxsync selected:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (pkcs11) PKCS #11 engine support (sign only)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Or:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync (pkcs11) PKCS #11 engine support (crypto accelerator)
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Next, run
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<span><strong class="command">apps/openssl engine pkcs11 -t</strong></span>". This will
a180a41bba1d50822df23fff0099e90b86638b89vboxsync attempt to initialize the PKCS #11 engine. If it is able to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync do so successfully, it will report
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &#8220;<span class="quote"><code class="literal">[ available ]</code></span>&#8221;.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If the output is correct, run
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<span><strong class="command">make install</strong></span>" which will install the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync modified OpenSSL suite to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">/opt/pkcs11/usr</code>.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606704"></a>Building BIND 9 with PKCS#11</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>When building BIND 9, the location of the custom-built
a180a41bba1d50822df23fff0099e90b86638b89vboxsync OpenSSL library must be specified via configure.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect3" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h4 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606712"></a>Configuring BIND 9 for Linux</h4></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To link with the PKCS #11 provider, threads must be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync enabled in the BIND 9 build.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The PKCS #11 library for the AEP Keyper is currently
a180a41bba1d50822df23fff0099e90b86638b89vboxsync only available as a 32-bit binary. If we are building on a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 64-bit host, we must force a 32-bit build by adding "-m32" to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the CC options on the "configure" command line.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>cd /bind-9.7.0</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>/configure CC="gcc -m32" --enable-threads \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --with-openssl=/opt/pkcs11/usr \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --with-pkcs11=/opt/pkcs11/usr/lib/libpkcs11.so</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect3" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h4 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606743"></a>Configuring BIND 9 for Solaris</h4></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To link with the PKCS #11 provider, threads must be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync enabled in the BIND 9 build.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>cd /bind-9.7.0</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>/configure CC="cc -xarch=amd64" --enable-threads \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --with-openssl=/opt/pkcs11/usr \
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --with-pkcs11=/usr/lib/64/libpkcs11.so</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>(For a 32-bit build, omit CC="cc -xarch=amd64".)</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If configure complains about OpenSSL not working, you
a180a41bba1d50822df23fff0099e90b86638b89vboxsync may have a 32/64-bit architecture mismatch. Or, you may have
a180a41bba1d50822df23fff0099e90b86638b89vboxsync incorrectly specified the path to OpenSSL (it should be the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync same as the --prefix argument to the OpenSSL
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Configure).</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>After configuring, run
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<span><strong class="command">make</strong></span>",
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<span><strong class="command">make test</strong></span>" and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "<span><strong class="command">make install</strong></span>".</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606867"></a>PKCS #11 Tools</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>BIND 9 includes a minimal set of tools to operate the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync HSM, including
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">pkcs11-keygen</strong></span> to generate a new key pair
a180a41bba1d50822df23fff0099e90b86638b89vboxsync within the HSM,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">pkcs11-list</strong></span> to list objects currently
a180a41bba1d50822df23fff0099e90b86638b89vboxsync available, and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">pkcs11-destroy</strong></span> to remove objects.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>In UNIX/Linux builds, these tools are built only if BIND
a180a41bba1d50822df23fff0099e90b86638b89vboxsync 9 is configured with the --with-pkcs11 option. (NOTE: If
a180a41bba1d50822df23fff0099e90b86638b89vboxsync --with-pkcs11 is set to "yes", rather than to the path of the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync PKCS #11 provider, then the tools will be built but the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync provider will be left undefined. Use the -m option or the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync PKCS11_PROVIDER environment variable to specify the path to the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync provider.)</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2606898"></a>Using the HSM</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>First, we must set up the runtime environment so the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync OpenSSL and PKCS #11 libraries can be loaded:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>export LD_LIBRARY_PATH=/opt/pkcs11/usr/lib:${LD_LIBRARY_PATH}</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>When operating an AEP Keyper, it is also necessary to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync specify the location of the "machine" file, which stores
a180a41bba1d50822df23fff0099e90b86638b89vboxsync information about the Keyper for use by PKCS #11 provider
a180a41bba1d50822df23fff0099e90b86638b89vboxsync library. If the machine file is in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">/opt/Keyper/PKCS11Provider/machine</code>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync use:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>export KEYPER_LIBRARY_PATH=/opt/Keyper/PKCS11Provider</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>These environment variables must be set whenever running
a180a41bba1d50822df23fff0099e90b86638b89vboxsync any tool that uses the HSM, including
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">pkcs11-keygen</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">pkcs11-list</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">pkcs11-destroy</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-keyfromlabel</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-signzone</strong></span>,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-keygen</strong></span>(which will use the HSM for
a180a41bba1d50822df23fff0099e90b86638b89vboxsync random number generation), and
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span>.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>We can now create and use keys in the HSM. In this case,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync we will create a 2048 bit key and give it the label
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "sample-ksk":</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>pkcs11-keygen -b 2048 -l sample-ksk</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>To confirm that the key exists:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>pkcs11-list</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncEnter PIN:
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncobject[0]: handle 2147483658 class 3 label[8] 'sample-ksk' id[0]
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncobject[1]: handle 2147483657 class 2 label[8] 'sample-ksk' id[0]
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Before using this key to sign a zone, we must create a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync pair of BIND 9 key files. The "dnssec-keyfromlabel" utility
a180a41bba1d50822df23fff0099e90b86638b89vboxsync does this. In this case, we will be using the HSM key
a180a41bba1d50822df23fff0099e90b86638b89vboxsync "sample-ksk" as the key-signing key for "example.net":</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-keyfromlabel -l sample-ksk -f KSK example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The resulting K*.key and K*.private files can now be used
a180a41bba1d50822df23fff0099e90b86638b89vboxsync to sign the zone. Unlike normal K* files, which contain both
a180a41bba1d50822df23fff0099e90b86638b89vboxsync public and private key data, these files will contain only the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync public key data, plus an identifier for the private key which
a180a41bba1d50822df23fff0099e90b86638b89vboxsync remains stored within the HSM. The HSM handles signing with the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync private key.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If you wish to generate a second key in the HSM for use
a180a41bba1d50822df23fff0099e90b86638b89vboxsync as a zone-signing key, follow the same procedure above, using a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync different keylabel, a smaller key size, and omitting "-f KSK"
a180a41bba1d50822df23fff0099e90b86638b89vboxsync from the dnssec-keyfromlabel arguments:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>pkcs11-keygen -b 1024 -l sample-zsk</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-keyfromlabel -l sample-zsk example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Alternatively, you may prefer to generate a conventional
a180a41bba1d50822df23fff0099e90b86638b89vboxsync on-disk key, using dnssec-keygen:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-keygen example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>This provides less security than an HSM key, but since
a180a41bba1d50822df23fff0099e90b86638b89vboxsync HSMs can be slow or cumbersome to use for security reasons, it
a180a41bba1d50822df23fff0099e90b86638b89vboxsync may be more efficient to reserve HSM keys for use in the less
a180a41bba1d50822df23fff0099e90b86638b89vboxsync frequent key-signing operation. The zone-signing key can be
a180a41bba1d50822df23fff0099e90b86638b89vboxsync rolled more frequently, if you wish, to compensate for a
a180a41bba1d50822df23fff0099e90b86638b89vboxsync reduction in key security.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Now you can sign the zone. (Note: If not using the -S
a180a41bba1d50822df23fff0099e90b86638b89vboxsync option to
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-signzone</strong></span>, it will be necessary to add
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the contents of both
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">K*.key</code> files to the zone master file before
a180a41bba1d50822df23fff0099e90b86638b89vboxsync signing it.)</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-signzone -S example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncEnter PIN:
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncVerifying the zone using the following algorithms:
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncNSEC3RSASHA1.
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncZone signing complete:
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncAlgorithm: NSEC3RSASHA1: ZSKs: 1, KSKs: 1 active, 0 revoked, 0 stand-by
a180a41bba1d50822df23fff0099e90b86638b89vboxsyncexample.net.signed
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2608871"></a>Specifying the engine on the command line</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The OpenSSL engine can be specified in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> and all of the BIND
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-*</strong></span> tools by using the "-E
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &lt;engine&gt;" command line option. If BIND 9 is built with
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the --with-pkcs11 option, this option defaults to "pkcs11".
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Specifying the engine will generally not be necessary unless
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for some reason you wish to use a different OpenSSL
a180a41bba1d50822df23fff0099e90b86638b89vboxsync engine.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If you wish to disable use of the "pkcs11" engine &#8212;
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for troubleshooting purposes, or because the HSM is unavailable
a180a41bba1d50822df23fff0099e90b86638b89vboxsync &#8212; set the engine to the empty string. For example:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="screen">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync$ <strong class="userinput"><code>dnssec-signzone -E '' -S example.net</code></strong>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>This causes
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">dnssec-signzone</strong></span> to run as if it were compiled
a180a41bba1d50822df23fff0099e90b86638b89vboxsync without the --with-pkcs11 option.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect2" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h3 class="title">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2608917"></a>Running named with automatic zone re-signing</h3></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>If you want
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span><strong class="command">named</strong></span> to dynamically re-sign zones using HSM
a180a41bba1d50822df23fff0099e90b86638b89vboxsync keys, and/or to to sign new records inserted via nsupdate, then
a180a41bba1d50822df23fff0099e90b86638b89vboxsync named must have access to the HSM PIN. This can be accomplished
a180a41bba1d50822df23fff0099e90b86638b89vboxsync by placing the PIN into the openssl.cnf file (in the above
a180a41bba1d50822df23fff0099e90b86638b89vboxsync examples,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <code class="filename">/opt/pkcs11/usr/ssl/openssl.cnf</code>).</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>The location of the openssl.cnf file can be overridden by
a180a41bba1d50822df23fff0099e90b86638b89vboxsync setting the OPENSSL_CONF environment variable before running
a180a41bba1d50822df23fff0099e90b86638b89vboxsync named.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Sample openssl.cnf:</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<pre class="programlisting">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync openssl_conf = openssl_def
a180a41bba1d50822df23fff0099e90b86638b89vboxsync [ openssl_def ]
a180a41bba1d50822df23fff0099e90b86638b89vboxsync engines = engine_section
a180a41bba1d50822df23fff0099e90b86638b89vboxsync [ engine_section ]
a180a41bba1d50822df23fff0099e90b86638b89vboxsync pkcs11 = pkcs11_section
a180a41bba1d50822df23fff0099e90b86638b89vboxsync [ pkcs11_section ]
a180a41bba1d50822df23fff0099e90b86638b89vboxsync PIN = <em class="replaceable"><code>&lt;PLACE PIN HERE&gt;</code></em>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</pre>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>This will also allow the dnssec-* tools to access the HSM
a180a41bba1d50822df23fff0099e90b86638b89vboxsync without PIN entry. (The pkcs11-* tools access the HSM directly,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync not via OpenSSL, so a PIN will still be required to use
a180a41bba1d50822df23fff0099e90b86638b89vboxsync them.)</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<h3 class="title">Warning</h3>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>Placing the HSM's PIN in a text file in
a180a41bba1d50822df23fff0099e90b86638b89vboxsync this manner may reduce the security advantage of using an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync HSM. Be sure this is what you want to do before configuring
a180a41bba1d50822df23fff0099e90b86638b89vboxsync OpenSSL in this way.</p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync</div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="sect1" lang="en">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<a name="id2572468"></a>IPv6 Support in <acronym class="acronym">BIND</acronym> 9</h2></div></div></div>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <acronym class="acronym">BIND</acronym> 9 fully supports all currently
a180a41bba1d50822df23fff0099e90b86638b89vboxsync defined forms of IPv6 name to address and address to name
a180a41bba1d50822df23fff0099e90b86638b89vboxsync lookups. It will also use IPv6 addresses to make queries when
a180a41bba1d50822df23fff0099e90b86638b89vboxsync running on an IPv6 capable system.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync For forward lookups, <acronym class="acronym">BIND</acronym> 9 supports
a180a41bba1d50822df23fff0099e90b86638b89vboxsync only AAAA records. RFC 3363 deprecated the use of A6 records,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync and client-side support for A6 records was accordingly removed
a180a41bba1d50822df23fff0099e90b86638b89vboxsync from <acronym class="acronym">BIND</acronym> 9.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync However, authoritative <acronym class="acronym">BIND</acronym> 9 name servers still
a180a41bba1d50822df23fff0099e90b86638b89vboxsync load zone files containing A6 records correctly, answer queries
a180a41bba1d50822df23fff0099e90b86638b89vboxsync for A6 records, and accept zone transfer for a zone containing A6
a180a41bba1d50822df23fff0099e90b86638b89vboxsync records.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync For IPv6 reverse lookups, <acronym class="acronym">BIND</acronym> 9 supports
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the traditional "nibble" format used in the
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span class="emphasis"><em>ip6.arpa</em></span> domain, as well as the older, deprecated
a180a41bba1d50822df23fff0099e90b86638b89vboxsync <span class="emphasis"><em>ip6.int</em></span> domain.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Older versions of <acronym class="acronym">BIND</acronym> 9
a180a41bba1d50822df23fff0099e90b86638b89vboxsync supported the "binary label" (also known as "bitstring") format,
a180a41bba1d50822df23fff0099e90b86638b89vboxsync but support of binary labels has been completely removed per
a180a41bba1d50822df23fff0099e90b86638b89vboxsync RFC 3363.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync Many applications in <acronym class="acronym">BIND</acronym> 9 do not understand
a180a41bba1d50822df23fff0099e90b86638b89vboxsync the binary label format at all any more, and will return an
a180a41bba1d50822df23fff0099e90b86638b89vboxsync error if given.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync In particular, an authoritative <acronym class="acronym">BIND</acronym> 9
a180a41bba1d50822df23fff0099e90b86638b89vboxsync name server will not load a zone file containing binary labels.
a180a41bba1d50822df23fff0099e90b86638b89vboxsync </p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync<p>
a180a41bba1d50822df23fff0099e90b86638b89vboxsync For an overview of the format and structure of IPv6 addresses,
see <a href="Bv9ARM.ch09.html#ipv6addresses" title="IPv6 addresses (AAAA)">the section called &#8220;IPv6 addresses (AAAA)&#8221;</a>.
</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id2572734"></a>Address Lookups Using AAAA Records</h3></div></div></div>
<p>
The IPv6 AAAA record is a parallel to the IPv4 A record,
and, unlike the deprecated A6 record, specifies the entire
IPv6 address in a single record. For example,
</p>
<pre class="programlisting">
$ORIGIN example.com.
host 3600 IN AAAA 2001:db8::1
</pre>
<p>
Use of IPv4-in-IPv6 mapped addresses is not recommended.
If a host has an IPv4 address, use an A record, not
a AAAA, with <code class="literal">::ffff:192.168.42.1</code> as
the address.
</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id2572756"></a>Address to Name Lookups Using Nibble Format</h3></div></div></div>
<p>
When looking up an address in nibble format, the address
components are simply reversed, just as in IPv4, and
<code class="literal">ip6.arpa.</code> is appended to the
resulting name.
For example, the following would provide reverse name lookup for
a host with address
<code class="literal">2001:db8::1</code>.
</p>
<pre class="programlisting">
$ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 14400 IN PTR (
host.example.com. )
</pre>
</div>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
<td width="20%" align="center">�</td>
<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter�3.�Name Server Configuration�</td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top">�Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</td>
</tr>
</table>
</div>
</body>
</html>