Bv9ARM.ch04.html revision 903596730995d4a0a7c3cc76119c9cf240a4c4fc
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - Copyright (C) 2000-2015 Internet Systems Consortium, Inc. ("ISC")
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - This Source Code Form is subject to the terms of the Mozilla Public
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - License, v. 2.0. If a copy of the MPL was not distributed with this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - file, You can obtain one at http://mozilla.org/MPL/2.0/.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="prev" href="Bv9ARM.ch03.html" title="Chapter�3.�Name Server Configuration">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="next" href="Bv9ARM.ch05.html" title="Chapter�5.�The BIND 9 Lightweight Resolver">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<tr><th colspan="3" align="center">Chapter�4.�Advanced DNS Features</th></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="Bv9ARM.ch04"></a>Chapter�4.�Advanced DNS Features</h1></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#notify">Notify</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dynamic_update">Dynamic Update</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dd><dl><dt><span class="section"><a href="Bv9ARM.ch04.html#journal">The journal file</a></span></dt></dl></dd>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#incremental_zone_transfers">Incremental Zone Transfers (IXFR)</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#split_dns">Split DNS</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dd><dl><dt><span class="section"><a href="Bv9ARM.ch04.html#split_dns_sample">Example split DNS setup</a></span></dt></dl></dd>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#tsig">TSIG</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.6.5">Generating a Shared Key</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.6.6">Loading A New Key</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.6.7">Instructing the Server to Use a Key</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.6.8">TSIG-Based Access Control</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.6.9">Errors</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#tkey">TKEY</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#sig0">SIG(0)</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#DNSSEC">DNSSEC</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dnssec_keys">Generating Keys</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dnssec_signing">Signing the Zone</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dnssec_config">Configuring Servers</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dnssec.dynamic.zones">DNSSEC, Dynamic Zones, and Automatic Signing</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.3">Converting from insecure to secure</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.8">Dynamic DNS update method</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.16">Fully automatic zone signing</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.25">Private-type records</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.32">DNSKEY rollovers</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.34">Dynamic DNS update method</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.39">Automatic key rollovers</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.41">NSEC3PARAM rollovers via UPDATE</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.43">Converting from NSEC to NSEC3</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.45">Converting from NSEC3 to NSEC</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.47">Converting from secure to insecure</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.51">Periodic re-signing</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.10.53">NSEC3 and OPTOUT</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#rfc5011.support">Dynamic Trust Anchor Management</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.11.3">Validating Resolver</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.11.4">Authoritative Server</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#pkcs11">PKCS#11 (Cryptoki) support</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.6">Prerequisites</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.7">Native PKCS#11</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.8">OpenSSL-based PKCS#11</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.9">PKCS#11 Tools</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.10">Using the HSM</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.11">Specifying the engine on the command line</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.12.12">Running named with automatic zone re-signing</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dlz-info">DLZ (Dynamically Loadable Zones)</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.13.6">Configuring DLZ</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.13.7">Sample DLZ Driver</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#dyndb-info">DynDB (Dynamic Database)</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.14.5">Configuring DynDB</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.14.6">Sample DynDB Module</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#catz-info">Catalog Zones</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.15.4">Principle of Operation</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.15.5">Configuring Catalog Zones</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.15.6">Catalog Zone format</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#ipv6">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.16.6">Address Lookups Using AAAA Records</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="section"><a href="Bv9ARM.ch04.html#id-1.5.16.7">Address to Name Lookups Using Nibble Format</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <acronym class="acronym">DNS</acronym> NOTIFY is a mechanism that allows master
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync servers to notify their slave servers of changes to a zone's data. In
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync response to a <span class="command"><strong>NOTIFY</strong></span> from a master server, the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync slave will check to see that its version of the zone is the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync current version and, if not, initiate a zone transfer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync For more information about <acronym class="acronym">DNS</acronym>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>NOTIFY</strong></span>, see the description of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>notify</strong></span> option in <a class="xref" href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the description of the zone option <span class="command"><strong>also-notify</strong></span> in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <a class="xref" href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called “Zone Transfers”</a>. The <span class="command"><strong>NOTIFY</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync protocol is specified in RFC 1996.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync As a slave zone can also be a master to other slaves, <span class="command"><strong>named</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by default, sends <span class="command"><strong>NOTIFY</strong></span> messages for every zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync it loads. Specifying <span class="command"><strong>notify master-only;</strong></span> will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync cause <span class="command"><strong>named</strong></span> to only send <span class="command"><strong>NOTIFY</strong></span> for master
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zones that it loads.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="dynamic_update"></a>Dynamic Update</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Dynamic Update is a method for adding, replacing or deleting
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync records in a master server by sending it a special form of DNS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync messages. The format and meaning of these messages is specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in RFC 2136.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Dynamic update is enabled by including an
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>allow-update</strong></span> or an <span class="command"><strong>update-policy</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync clause in the <span class="command"><strong>zone</strong></span> statement.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If the zone's <span class="command"><strong>update-policy</strong></span> is set to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>local</code></strong>, updates to the zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will be permitted for the key <code class="varname">local-ddns</code>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync which will be generated by <span class="command"><strong>named</strong></span> at startup.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync See <a class="xref" href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a> for more details.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Dynamic updates using Kerberos signed requests can be made
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>tkey-gssapi-keytab</strong></span> option, or alternatively
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by setting both the <span class="command"><strong>tkey-gssapi-credential</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and <span class="command"><strong>tkey-domain</strong></span> options. Once enabled,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Kerberos signed requests will be matched against the update
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync policies for the zone, using the Kerberos principal as the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signer for the request.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Updating of secure zones (zones using DNSSEC) follows RFC
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 3007: RRSIG, NSEC and NSEC3 records affected by updates are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync automatically regenerated by the server using an online
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone key. Update authorization is based on transaction
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signatures and an explicit server policy.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="journal"></a>The journal file</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync All changes made to a zone using dynamic update are stored
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in the zone's journal file. This file is automatically created
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by the server when the first dynamic update takes place.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The name of the journal file is formed by appending the extension
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">.jnl</code> to the name of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync corresponding zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync file unless specifically overridden. The journal file is in a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync binary format and should not be edited manually.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The server will also occasionally write ("dump")
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the complete contents of the updated zone to its zone file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is not done immediately after
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync each dynamic update, because that would be too slow when a large
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone is updated frequently. Instead, the dump is delayed by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync up to 15 minutes, allowing additional updates to take place.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync During the dump process, transient files will be created
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with the extensions <code class="filename">.jnw</code> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">.jbk</code>; under ordinary circumstances, these
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will be removed when the dump is complete, and can be safely
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When a server is restarted after a shutdown or crash, it will replay
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the journal file to incorporate into the zone any updates that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync place after the last zone dump.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Changes that result from incoming incremental zone transfers are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync journalled in a similar way.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The zone files of dynamic zones cannot normally be edited by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync hand because they are not guaranteed to contain the most recent
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync dynamic changes — those are only in the journal file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The only way to ensure that the zone file of a dynamic zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is up to date is to run <span class="command"><strong>rndc stop</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If you have to make changes to a dynamic zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync manually, the following procedure will work:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Disable dynamic updates to the zone using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc freeze <em class="replaceable"><code>zone</code></em></strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This will update the zone's master file with the changes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync stored in its <code class="filename">.jnl</code> file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Edit the zone file. Run
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc thaw <em class="replaceable"><code>zone</code></em></strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to reload the changed zone and re-enable dynamic updates.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc sync <em class="replaceable"><code>zone</code></em></strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will update the zone file with changes from the journal file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync without stopping dynamic updates; this may be useful for viewing
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the current zone state. To remove the <code class="filename">.jnl</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync file after updating the zone file, use
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc sync -clean</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="incremental_zone_transfers"></a>Incremental Zone Transfers (IXFR)</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The incremental zone transfer (IXFR) protocol is a way for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync slave servers to transfer only changed data, instead of having to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync transfer the entire zone. The IXFR protocol is specified in RFC
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 1995. See <a class="xref" href="Bv9ARM.ch11.html#proposed_standards" title="Proposed Standards">Proposed Standards</a>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When acting as a master, <acronym class="acronym">BIND</acronym> 9
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync supports IXFR for those zones
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync where the necessary change history information is available. These
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync include master zones maintained by dynamic update and slave zones
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync whose data was obtained by IXFR. For manually maintained master
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zones, and for slave zones obtained by performing a full zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync transfer (AXFR), IXFR is supported only if the option
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>ixfr-from-differences</strong></span> is set
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to <strong class="userinput"><code>yes</code></strong>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When acting as a slave, <acronym class="acronym">BIND</acronym> 9 will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync attempt to use IXFR unless
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync it is explicitly disabled. For more information about disabling
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IXFR, see the description of the <span class="command"><strong>request-ixfr</strong></span> clause
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the <span class="command"><strong>server</strong></span> statement.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="split_dns"></a>Split DNS</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Setting up different views, or visibility, of the DNS space to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync internal and external resolvers is usually referred to as a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="emphasis"><em>Split DNS</em></span> setup. There are several
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync reasons an organization would want to set up its DNS this way.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync One common reason for setting up a DNS system this way is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to hide "internal" DNS information from "external" clients on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Internet. There is some debate as to whether or not this is actually
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Internal DNS information leaks out in many ways (via email headers,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for example) and most savvy "attackers" can find the information
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync they need using other means.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync However, since listing addresses of internal servers that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync external clients cannot possibly reach can result in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync connection delays and other annoyances, an organization may
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync choose to use a Split DNS to present a consistent view of itself
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to the outside world.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Another common reason for setting up a Split DNS system is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to allow internal networks that are behind filters or in RFC 1918
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync space (reserved IP space, as documented in RFC 1918) to resolve DNS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on the Internet. Split DNS can also be used to allow mail from outside
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync back in to the internal network.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="split_dns_sample"></a>Example split DNS setup</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Let's say a company named <span class="emphasis"><em>Example, Inc.</em></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync has several corporate sites that have an internal network with
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Internet Protocol (IP) space and an external demilitarized zone (DMZ),
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync or "outside" section of a network, that is available to the public.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="emphasis"><em>Example, Inc.</em></span> wants its internal clients
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to be able to resolve external hostnames and to exchange mail with
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync people on the outside. The company also wants its internal resolvers
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to have access to certain internal-only zones that are not available
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync at all outside of the internal network.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In order to accomplish this, the company will set up two sets
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of name servers. One set will be on the inside network (in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IP space) and the other set will be on bastion hosts, which are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync hosts that can talk to both sides of its network, in the DMZ.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The internal servers will be configured to forward all queries,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync except queries for <code class="filename">site1.internal</code>, <code class="filename">site2.internal</code>, <code class="filename">site1.example.com</code>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and <code class="filename">site2.example.com</code>, to the servers
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DMZ. These internal servers will have complete sets of information
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for <code class="filename">site1.example.com</code>, <code class="filename">site2.example.com</code>, <code class="filename">site1.internal</code>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync To protect the <code class="filename">site1.internal</code> and <code class="filename">site2.internal</code> domains,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the internal name servers must be configured to disallow all queries
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to these domains from any external hosts, including the bastion
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The external servers, which are on the bastion hosts, will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be configured to serve the "public" version of the <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This could include things such as the host records for public servers
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (<code class="filename">www.example.com</code> and <code class="filename">ftp.example.com</code>),
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and mail exchange (MX) records (<code class="filename">a.mx.example.com</code> and <code class="filename">b.mx.example.com</code>).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In addition, the public <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync should have special MX records that contain wildcard (`*') records
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync pointing to the bastion hosts. This is needed because external mail
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync servers do not have any other way of looking up how to deliver mail
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to those internal hosts. With the wildcard records, the mail will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be delivered to the bastion host, which can then forward it on to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync internal hosts.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Here's an example of a wildcard MX record:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<pre class="programlisting">* IN MX 10 external1.example.com.</pre>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Now that they accept mail on behalf of anything in the internal
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync network, the bastion hosts will need to know how to deliver mail
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to internal hosts. In order for this to work properly, the resolvers
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the bastion hosts will need to be configured to point to the internal
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync name servers for DNS resolution.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Queries for internal hostnames will be answered by the internal
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync servers, and queries for external hostnames will be forwarded back
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync out to the DNS servers on the bastion hosts.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In order for all this to work properly, internal clients will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync need to be configured to query <span class="emphasis"><em>only</em></span> the internal
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync name servers for DNS queries. This could also be enforced via
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync filtering on the network.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If everything has been set properly, <span class="emphasis"><em>Example, Inc.</em></span>'s
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync internal clients will now be able to:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Look up any hostnames in the <code class="literal">site1</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="literal">site2.example.com</code> zones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Look up any hostnames in the <code class="literal">site1.internal</code> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="literal">site2.internal</code> domains.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<li class="listitem">Look up any hostnames on the Internet.</li>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<li class="listitem">Exchange mail with both internal and external people.</li>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Hosts on the Internet will be able to:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Look up any hostnames in the <code class="literal">site1</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="literal">site2.example.com</code> zones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Exchange mail with anyone in the <code class="literal">site1</code> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="literal">site2.example.com</code> zones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Here is an example configuration for the setup we just
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync described above. Note that this is only configuration information;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for information on how to configure your zone files, see <a class="xref" href="Bv9ARM.ch03.html#sample_configuration" title="Sample Configurations">the section called “Sample Configurations”</a>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Internal DNS server config:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncacl externals { <code class="varname">bastion-ips-go-here</code>; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forward only;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // forward to external servers
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forwarders {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // sample allow-transfer (no one)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { none; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // restrict query access
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { internals; externals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // restrict recursion
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-recursion { internals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// sample master zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type master;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // do normal iterative resolution (do not forward)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forwarders { };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { internals; externals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { internals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// sample slave zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type slave;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync masters { 172.16.72.3; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forwarders { };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { internals; externals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { internals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type master;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forwarders { };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { internals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { internals; }
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type slave;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync masters { 172.16.72.3; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forwarders { };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { internals };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { internals; }
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync External (bastion host) DNS server config:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncacl externals { bastion-ips-go-here; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // sample allow-transfer (no one)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { none; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // default query access
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { any; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // restrict cache access
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query-cache { internals; externals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // restrict recursion
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-recursion { internals; externals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// sample slave zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type master;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { internals; externals; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type slave;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync masters { another_bastion_host_maybe; };
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-transfer { internals; externals; }
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In the <code class="filename">resolv.conf</code> (or equivalent) on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the bastion host(s):
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncnameserver 172.16.72.2
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncnameserver 172.16.72.3
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncnameserver 172.16.72.4
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TSIG (Transaction SIGnatures) is a mechanism for authenticating DNS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync messages, originally specified in RFC 2845. It allows DNS messages
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to be cryptographically signed using a shared secret. TSIG can
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be used in any DNS transaction, as a way to restrict access to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync certain server functions (e.g., recursive queries) to authorized
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync clients when IP-based access control is insufficient or needs to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be overridden, or as a way to ensure message authenticity when it
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is critical to the integrity of the server, such as with dynamic
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UPDATE messages or zone transfers from a master to a slave server.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is a guide to setting up TSIG in <acronym class="acronym">BIND</acronym>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync It describes the configuration syntax and the process of creating
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> supports TSIG for server-to-server
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync communication, and some of the tools included with
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <acronym class="acronym">BIND</acronym> support it for sending messages to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span>:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a class="xref" href="man.nsupdate.html" title="nsupdate"><span class="refentrytitle"><span class="application">nsupdate</span></span>(1)</a> supports TSIG via the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="option">-k</code>, <code class="option">-l</code> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="option">-y</code> command line options, or via
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the <span class="command"><strong>key</strong></span> command when running
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync interactively.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a class="xref" href="man.dig.html" title="dig"><span class="refentrytitle">dig</span>(1)</a> supports TSIG via the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="option">-k</code> and <code class="option">-y</code> command
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync line options.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.6.5"></a>Generating a Shared Key</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TSIG keys can be generated using the <span class="command"><strong>tsig-keygen</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync command; the output of the command is a <span class="command"><strong>key</strong></span> directive
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync suitable for inclusion in <code class="filename">named.conf</code>. The
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync key name, algorithm and size can be specified by command line parameters;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the defaults are "tsig-key", HMAC-SHA256, and 256 bits, respectively.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Any string which is a valid DNS name can be used as a key name.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync For example, a key to be shared between servers called
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span> could
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be called "host1-host2.", and this key could be generated using:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $ tsig-keygen host1-host2. > host1-host2.key
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This key may then be copied to both hosts. The key name and secret
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync must be identical on both hosts.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (Note: copying a shared secret from one server to another is beyond
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the scope of the DNS. A secure transport mechanism should be used:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync secure FTP, SSL, ssh, telephone, encrypted email, etc.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>tsig-keygen</strong></span> can also be run as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>ddns-confgen</strong></span>, in which case its output includes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync additional configuration text for setting up dynamic DNS in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span>. See <a class="xref" href="man.ddns-confgen.html" title="ddns-confgen"><span class="refentrytitle"><span class="application">ddns-confgen</span></span>(8)</a>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for details.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.6.6"></a>Loading A New Key</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync For a key shared between servers called
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the following could be added to each server's
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynckey "host1-host2." {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync algorithm hmac-sha256;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync secret "DAopyf1mhCbFVZw7pgmNPBoLUq8wEUT7UuPoLENP2HY=";
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (This is the same key generated above using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>tsig-keygen</strong></span>.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Since this text contains a secret, it
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is recommended that either <code class="filename">named.conf</code> not be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync world-readable, or that the <span class="command"><strong>key</strong></span> directive
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be stored in a file which is not world-readable, and which is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync included in <code class="filename">named.conf</code> via the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>include</strong></span> directive.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Once a key has been added to <code class="filename">named.conf</code> and the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync server has been restarted or reconfigured, the server can recognize
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the key. If the server receives a message signed by the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync key, it will be able to verify the signature. If the signature
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is valid, the response will be signed using the same key.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TSIG keys that are known to a server can be listed using the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync command <span class="command"><strong>rndc tsig-list</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.6.7"></a>Instructing the Server to Use a Key</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync A server sending a request to another server must be told whether
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to use a key, and if so, which key to use.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync For example, a key may be specified for each server in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>masters</strong></span> statement in the definition of a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync slave zone; in this case, all SOA QUERY messages, NOTIFY
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync messages, and zone transfer requests (AXFR or IXFR) will be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signed using the specified key. Keys may also be specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in the <span class="command"><strong>also-notify</strong></span> statement of a master
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync or slave zone, causing NOTIFY messages to be signed using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the specified key.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Keys can also be specified in a <span class="command"><strong>server</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync directive. Adding the following on <span class="emphasis"><em>host1</em></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if the IP address of <span class="emphasis"><em>host2</em></span> is 10.1.2.3, would
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync cause <span class="emphasis"><em>all</em></span> requests from <span class="emphasis"><em>host1</em></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to <span class="emphasis"><em>host2</em></span>, including normal DNS queries, to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signed using the <span class="command"><strong>host1-host2.</strong></span> key:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncserver 10.1.2.3 {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync keys { host1-host2. ;};
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Multiple keys may be present in the <span class="command"><strong>keys</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync statement, but only the first one is used. As this directive does
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync not contain secrets, it can be used in a world-readable file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Requests sent by <span class="emphasis"><em>host2</em></span> to <span class="emphasis"><em>host1</em></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync would <span class="emphasis"><em>not</em></span> be signed, unless a similar
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>server</strong></span> directive were in <span class="emphasis"><em>host2</em></span>'s
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configuration file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Whenever any server sends a TSIG-signed DNS request, it will expect
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the response to be signed with the same key. If a response is not
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signed, or if the signature is not valid, the response will be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.6.8"></a>TSIG-Based Access Control</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TSIG keys may be specified in ACL definitions and ACL directives
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync such as <span class="command"><strong>allow-query</strong></span>, <span class="command"><strong>allow-transfer</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and <span class="command"><strong>allow-update</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The above key would be denoted in an ACL element as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>key host1-host2.</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync An example of an <span class="command"><strong>allow-update</strong></span> directive using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a TSIG key:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncallow-update { !{ !localnets; any; }; key host1-host2. ;};
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This allows dynamic updates to succeed only if the UPDATE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync request comes from an address in <span class="command"><strong>localnets</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="emphasis"><em>and</em></span> if it is signed using the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>host1-host2.</strong></span> key.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync See <a class="xref" href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a> for a discussion of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the more flexible <span class="command"><strong>update-policy</strong></span> statement.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.6.9"></a>Errors</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Processing of TSIG-signed messages can result in several errors:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If a TSIG-aware server receives a message signed by an
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync unknown key, the response will be unsigned, with the TSIG
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync extended error code set to BADKEY.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If a TSIG-aware server receives a message from a known key
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync but with an invalid signature, the response will be unsigned,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with the TSIG extended error code set to BADSIG.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If a TSIG-aware server receives a message with a time
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync outside of the allowed range, the response will be signed, with
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the TSIG extended error code set to BADTIME, and the time values
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will be adjusted so that the response can be successfully
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In all of the above cases, the server will return a response code
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of NOTAUTH (not authenticated).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TKEY (Transaction KEY) is a mechanism for automatically negotiating
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a shared secret between two hosts, originally specified in RFC 2930.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync There are several TKEY "modes" that specify how a key is to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync generated or assigned. <acronym class="acronym">BIND</acronym> 9 implements only
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync one of these modes: Diffie-Hellman key exchange. Both hosts are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync required to have a KEY record with algorithm DH (though this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync record is not required to be present in a zone).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The TKEY process is initiated by a client or server by sending
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a query of type TKEY to a TKEY-aware server. The query must include
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync an appropriate KEY record in the additional section, and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync must be signed using either TSIG or SIG(0) with a previously
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync established key. The server's response, if successful, will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contain a TKEY record in its answer section. After this transaction,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync both participants will have enough information to calculate a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync shared secret using Diffie-Hellman key exchange. The shared secret
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync can then be used by to sign subsequent transactions between the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync two servers.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TSIG keys known by the server, including TKEY-negotiated keys, can
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be listed using <span class="command"><strong>rndc tsig-list</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TKEY-negotiated keys can be deleted from a server using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc tsig-delete</strong></span>. This can also be done via
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the TKEY protocol itself, by sending an authenticated TKEY query
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync specifying the "key deletion" mode.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <acronym class="acronym">BIND</acronym> partially supports DNSSEC SIG(0)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync transaction signatures as specified in RFC 2535 and RFC 2931.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SIG(0) uses public/private keys to authenticate messages. Access control
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is performed in the same manner as TSIG keys; privileges can be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync granted or denied in ACL directives based on the key name.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When a SIG(0) signed message is received, it will only be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync verified if the key is known and trusted by the server. The
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync server will not attempt to recursively fetch or validate the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SIG(0) signing of multiple-message TCP streams is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The only tool shipped with <acronym class="acronym">BIND</acronym> 9 that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync generates SIG(0) signed messages is <span class="command"><strong>nsupdate</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Cryptographic authentication of DNS information is possible
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync through the DNS Security (<span class="emphasis"><em>DNSSEC-bis</em></span>) extensions,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync defined in RFC 4033, RFC 4034, and RFC 4035.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This section describes the creation and use of DNSSEC signed zones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In order to set up a DNSSEC secure zone, there are a series
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of steps which must be followed. <acronym class="acronym">BIND</acronym>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with several tools
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that are used in this process, which are explained in more detail
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync below. In all cases, the <code class="option">-h</code> option prints a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync full list of parameters. Note that the DNSSEC tools require the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync keyset files to be in the working directory or the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync directory specified by the <code class="option">-d</code> option, and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that the tools shipped with BIND 9.2.x and earlier are not compatible
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with the current ones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync There must also be communication with the administrators of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the parent and/or child zone to transmit keys. A zone's security
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync status must be indicated by the parent zone for a DNSSEC capable
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync resolver to trust its data. This is done through the presence
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync or absence of a <code class="literal">DS</code> record at the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync For other servers to trust data in this zone, they must
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync either be statically configured with this zone's zone key or the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone key of another zone above this one in the DNS tree.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="dnssec_keys"></a>Generating Keys</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The <span class="command"><strong>dnssec-keygen</strong></span> program is used to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync generate keys.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync A secure zone must contain one or more zone keys. The
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone keys will sign all other records in the zone, as well as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the zone keys of any secure delegated zones. Zone keys must
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync have the same name as the zone, a name type of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>ZONE</strong></span>, and must be usable for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync authentication.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync It is recommended that zone keys use a cryptographic algorithm
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync designated as "mandatory to implement" by the IETF; currently
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the only one is RSASHA1.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The following command will generate a 768-bit RSASHA1 key for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the <code class="filename">child.example</code> zone:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</code></strong>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Two output files will be produced:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">Kchild.example.+005+12345.key</code> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">Kchild.example.+005+12345.private</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 12345 is an example of a key tag). The key filenames contain
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the key name (<code class="filename">child.example.</code>),
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync algorithm (3
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this case).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The private key (in the <code class="filename">.private</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync used to generate signatures, and the public key (in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">.key</code> file) is used for signature
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync verification.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync To generate another key with the same properties (but with
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a different key tag), repeat the above command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The <span class="command"><strong>dnssec-keyfromlabel</strong></span> program is used
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to get a key pair from a crypto hardware and build the key
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync files. Its usage is similar to <span class="command"><strong>dnssec-keygen</strong></span>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The public keys should be inserted into the zone file by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync including the <code class="filename">.key</code> files using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>$INCLUDE</strong></span> statements.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="dnssec_signing"></a>Signing the Zone</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The <span class="command"><strong>dnssec-signzone</strong></span> program is used
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to sign a zone.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Any <code class="filename">keyset</code> files corresponding to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync secure subzones should be present. The zone signer will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync generate <code class="literal">NSEC</code>, <code class="literal">NSEC3</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and <code class="literal">RRSIG</code> records for the zone, as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync well as <code class="literal">DS</code> for the child zones if
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="literal">'-g'</code> is specified. If <code class="literal">'-g'</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is not specified, then DS RRsets for the secure child
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zones need to be added manually.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The following command signs the zone, assuming it is in a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync file called <code class="filename">zone.child.example</code>. By
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync default, all zone keys which have an available private key are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync used to generate signatures.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>dnssec-signzone -o child.example zone.child.example</code></strong>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync One output file is produced:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">zone.child.example.signed</code>. This
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync should be referenced by <code class="filename">named.conf</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync input file for the zone.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p><span class="command"><strong>dnssec-signzone</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will also produce a keyset and dsset files and optionally a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync dlvset file. These are used to provide the parent zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync administrators with the <code class="literal">DNSKEYs</code> (or their
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync corresponding <code class="literal">DS</code> records) that are the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync secure entry point to the zone.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="dnssec_config"></a>Configuring Servers</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync To enable <span class="command"><strong>named</strong></span> to respond appropriately
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to DNS requests from DNSSEC aware clients,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-enable</strong></span> must be set to yes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (This is the default setting.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync To enable <span class="command"><strong>named</strong></span> to validate answers from
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync other servers, the <span class="command"><strong>dnssec-enable</strong></span> option
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync must be set to <strong class="userinput"><code>yes</code></strong>, and the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-validation</strong></span> options must be set to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>auto</code></strong>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If <span class="command"><strong>dnssec-validation</strong></span> is set to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>auto</code></strong>, then a default
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync trust anchor for the DNS root zone will be used.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If it is set to <strong class="userinput"><code>yes</code></strong>, however,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then at least one trust anchor must be configured
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with a <span class="command"><strong>trusted-keys</strong></span> or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>managed-keys</strong></span> statement in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">named.conf</code>, or DNSSEC validation
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will not occur. The default setting is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>yes</code></strong>.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>trusted-keys</strong></span> are copies of DNSKEY RRs
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for zones that are used to form the first link in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync cryptographic chain of trust. All keys listed in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>trusted-keys</strong></span> (and corresponding zones)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are deemed to exist and only the listed keys will be used
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to validated the DNSKEY RRset that they are from.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>managed-keys</strong></span> are trusted keys which are
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync automatically kept up to date via RFC 5011 trust anchor
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync maintenance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>trusted-keys</strong></span> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>managed-keys</strong></span> are described in more detail
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync later in this document.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unlike <acronym class="acronym">BIND</acronym> 8, <acronym class="acronym">BIND</acronym>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 9 does not verify signatures on load, so zone keys for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync authoritative zones do not need to be specified in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configuration file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync After DNSSEC gets established, a typical DNSSEC configuration
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will look something like the following. It has one or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync more public keys for the root. This allows answers from
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync outside the organization to be validated. It will also
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync have several keys for parts of the namespace the organization
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync controls. These are here to ensure that <span class="command"><strong>named</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is immune to compromises in the DNSSEC components of the security
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of parent zones.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncmanaged-keys {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync /* Root Key */
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync dgxbcDTClU0CRBdiieyLMNzXG3";
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctrusted-keys {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync /* Key for our organization's forward zone */
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 1OTQ09A0=";
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync /* Key for our reverse zone. */
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync xOdNax071L18QqZnQQQAVVr+i
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LhGTnNGp3HoWQLUIzKrJVZ3zg
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync gy3WwNT6kZo6c0tszYqbtvchm
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync siaOdS0yOI6BgPsw+YZdzlYMa
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IJGf4M4dyoKIhzdZyQ2bYQrjy
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Q4LB0lC7aOnsMyYKHHYeRvPxj
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IQXmdqgOJGq+vsevG06zW+1xg
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 59VvjSPsZJHeDCUyWYrvPZesZ
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DIRvhDD52SKvbheeTJUm6Ehkz
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync dnssec-enable yes;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync dnssec-validation yes;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync None of the keys listed in this example are valid. In particular,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the root key is not valid.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When DNSSEC validation is enabled and properly configured,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the resolver will reject any answers from signed, secure zones
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync which fail to validate, and will return SERVFAIL to the client.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Responses may fail to validate for any of several reasons,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync including missing, expired, or invalid signatures, a key which
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync does not match the DS RRset in the parent zone, or an insecure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync response from a zone which, according to its parent, should have
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync been secure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When the validator receives a response from an unsigned zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that has a signed parent, it must confirm with the parent
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that the zone was intentionally left unsigned. It does
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this by verifying, via signed and validated NSEC/NSEC3 records,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that the parent zone contains no DS records for the child.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If the validator <span class="emphasis"><em>can</em></span> prove that the zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is insecure, then the response is accepted. However, if it
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync cannot, then it must assume an insecure response to be a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forgery; it rejects the response and logs an error.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The logged error reads "insecurity proof failed" and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "got insecure response; parent indicates it should be secure".
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (Prior to BIND 9.7, the logged error was "not insecure".
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This referred to the zone, not the response.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="dnssec.dynamic.zones"></a>DNSSEC, Dynamic Zones, and Automatic Signing</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>As of BIND 9.7.0 it is possible to change a dynamic zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync from insecure to signed and back again. A secure zone can use
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync either NSEC or NSEC3 chains.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.3"></a>Converting from insecure to secure</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Changing a zone from insecure to secure can be done in two
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ways: using a dynamic DNS update, or the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec</strong></span> zone option.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>For either method, you need to configure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> so that it can see the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">K*</code> files which contain the public and private
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync parts of the keys that will be used to sign the zone. These files
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will have been generated by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-keygen</strong></span>. You can do this by placing them
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in the key-directory, as specified in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync type master;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync update-policy local;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>If one KSK and one ZSK DNSKEY key have been generated, this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configuration will cause all records in the zone to be signed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with the ZSK, and the DNSKEY RRset to be signed with the KSK as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync well. An NSEC chain will be generated as part of the initial
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signing process.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.8"></a>Dynamic DNS update method</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > ttl 3600
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > update add example.net DNSKEY 256 3 7 AwEAAZn17pUF0KpbPA2c7Gz76Vb18v0teKT3EyAGfBfL8eQ8al35zz3Y I1m/SAQBxIqMfLtIwqWPdgthsu36azGQAX8=
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > update add example.net DNSKEY 257 3 7 AwEAAd/7odU/64o2LGsifbLtQmtO8dFDtTAZXSX2+X3e/UNlq9IHq3Y0 XtC0Iuawl/qkaKVxXe2lo8Ct+dM6UehyCqk=
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>While the update request will complete almost immediately,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the zone will not be completely signed until
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> has had time to walk the zone and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync generate the NSEC and RRSIG records. The NSEC record at the apex
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will be added last, to signal that there is a complete NSEC
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>If you wish to sign using NSEC3 instead of NSEC, you should
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync add an NSEC3PARAM record to the initial update request. If you
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync wish the NSEC3 chain to have the OPTOUT bit set, set it in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync flags field of the NSEC3PARAM record.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > ttl 3600
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > update add example.net DNSKEY 256 3 7 AwEAAZn17pUF0KpbPA2c7Gz76Vb18v0teKT3EyAGfBfL8eQ8al35zz3Y I1m/SAQBxIqMfLtIwqWPdgthsu36azGQAX8=
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > update add example.net DNSKEY 257 3 7 AwEAAd/7odU/64o2LGsifbLtQmtO8dFDtTAZXSX2+X3e/UNlq9IHq3Y0 XtC0Iuawl/qkaKVxXe2lo8Ct+dM6UehyCqk=
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync > update add example.net NSEC3PARAM 1 1 100 1234567890
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Again, this update request will complete almost
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync immediately; however, the record won't show up until
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> has had a chance to build/remove the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync relevant chain. A private type record will be created to record
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the state of the operation (see below for more details), and will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be removed once the operation completes.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>While the initial signing and NSEC/NSEC3 chain generation
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is happening, other updates are possible as well.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.16"></a>Fully automatic zone signing</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To enable automatic signing, add the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec</strong></span> option to the zone statement in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec</strong></span> has two possible arguments:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec allow</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> can search the key directory for keys
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync matching the zone, insert them into the zone, and use them to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync sign the zone. It will do so only when it receives an
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc sign <zonename></strong></span>.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec maintain</strong></span> includes the above
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync functionality, but will also automatically adjust the zone's
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DNSKEY records on schedule according to the keys' timing metadata.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (See <a class="xref" href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <a class="xref" href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a> for more information.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> will periodically search the key directory
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for keys matching the zone, and if the keys' metadata indicates
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that any change should be made the zone, such as adding, removing,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync or revoking a key, then that action will be carried out. By default,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the key directory is checked for changes every 60 minutes; this period
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync can be adjusted with the <code class="option">dnssec-loadkeys-interval</code>, up
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to a maximum of 24 hours. The <span class="command"><strong>rndc loadkeys</strong></span> forces
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> to check for key updates immediately.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If keys are present in the key directory the first time the zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is loaded, the zone will be signed immediately, without waiting for an
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>rndc sign</strong></span> or <span class="command"><strong>rndc loadkeys</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync command. (Those commands can still be used when there are unscheduled
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync key changes, however.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync When new keys are added to a zone, the TTL is set to match that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of any existing DNSKEY RRset. If there is no existing DNSKEY RRset,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then the TTL will be set to the TTL specified when the key was
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync created (using the <span class="command"><strong>dnssec-keygen -L</strong></span> option), if
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync any, or to the SOA TTL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If you wish the zone to be signed using NSEC3 instead of NSEC,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync submit an NSEC3PARAM record via dynamic update prior to the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync scheduled publication and activation of the keys. If you wish the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync NSEC3 chain to have the OPTOUT bit set, set it in the flags field
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the NSEC3PARAM record. The NSEC3PARAM record will not appear in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the zone immediately, but it will be stored for later reference. When
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the zone is signed and the NSEC3 chain is completed, the NSEC3PARAM
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync record will appear in the zone.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Using the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec</strong></span> option requires the zone to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configured to allow dynamic updates, by adding an
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>allow-update</strong></span> or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>update-policy</strong></span> statement to the zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configuration. If this has not been done, the configuration will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.25"></a>Private-type records</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>The state of the signing process is signaled by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync private-type records (with a default type value of 65534). When
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signing is complete, these records will have a nonzero value for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the final octet (for those records which have a nonzero initial
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync octet).</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>The private type record format: If the first octet is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync non-zero then the record indicates that the zone needs to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signed with the key matching the record, or that all signatures
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync that match the record should be removed.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��algorithm�(octet�1)<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��key�id�in�network�order�(octet�2�and�3)<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��removal�flag�(octet�4)<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��complete�flag�(octet�5)<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Only records flagged as "complete" can be removed via
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync dynamic update. Attempts to remove other private type records
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will be silently ignored.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>If the first octet is zero (this is a reserved algorithm
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync number that should never appear in a DNSKEY record) then the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync record indicates changes to the NSEC3 chains are in progress. The
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync rest of the record contains an NSEC3PARAM record. The flag field
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync tells what operation to perform based on the flag bits.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��0x01�OPTOUT<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��0x80�CREATE<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��0x40�REMOVE<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync��0x20�NONSEC<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.32"></a>DNSKEY rollovers</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>As with insecure-to-secure conversions, rolling DNSSEC
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync keys can be done in two ways: using a dynamic DNS update, or the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>auto-dnssec</strong></span> zone option.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.34"></a>Dynamic DNS update method</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p> To perform key rollovers via dynamic update, you need to add
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the <code class="filename">K*</code> files for the new keys so that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> can find them. You can then add the new
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DNSKEY RRs via dynamic update.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> will then cause the zone to be signed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with the new keys. When the signing is complete the private type
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync records will be updated so that the last octet is non
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>If this is for a KSK you need to inform the parent and any
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync trust anchor repositories of the new KSK.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>You should then wait for the maximum TTL in the zone before
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync removing the old DNSKEY. If it is a KSK that is being updated,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync you also need to wait for the DS RRset in the parent to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync updated and its TTL to expire. This ensures that all clients will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be able to verify at least one signature when you remove the old
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DNSKEY.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>The old DNSKEY can be removed via UPDATE. Take care to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync specify the correct key.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> will clean out any signatures generated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by the old key after the update completes.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.39"></a>Automatic key rollovers</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>When a new key reaches its activation date (as set by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-keygen</strong></span> or <span class="command"><strong>dnssec-settime</strong></span>),
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if the <span class="command"><strong>auto-dnssec</strong></span> zone option is set to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="constant">maintain</code>, <span class="command"><strong>named</strong></span> will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync automatically carry out the key rollover. If the key's algorithm
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync has not previously been used to sign the zone, then the zone will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be fully signed as quickly as possible. However, if the new key
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is replacing an existing key of the same algorithm, then the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone will be re-signed incrementally, with signatures from the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync old key being replaced with signatures from the new key as their
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signature validity periods expire. By default, this rollover
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync completes in 30 days, after which it will be safe to remove the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync old key from the DNSKEY RRset.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.41"></a>NSEC3PARAM rollovers via UPDATE</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Add the new NSEC3PARAM record via dynamic update. When the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync new NSEC3 chain has been generated, the NSEC3PARAM flag field
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will be zero. At this point you can remove the old NSEC3PARAM
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync record. The old chain will be removed after the update request
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync completes.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.43"></a>Converting from NSEC to NSEC3</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To do this, you just need to add an NSEC3PARAM record. When
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the conversion is complete, the NSEC chain will have been removed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and the NSEC3PARAM record will have a zero flag field. The NSEC3
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync chain will be generated before the NSEC chain is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync destroyed.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.45"></a>Converting from NSEC3 to NSEC</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To do this, use <span class="command"><strong>nsupdate</strong></span> to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync remove all NSEC3PARAM records with a zero flag
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync field. The NSEC chain will be generated before the NSEC3 chain is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync removed.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.47"></a>Converting from secure to insecure</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To convert a signed zone to unsigned using dynamic DNS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync delete all the DNSKEY records from the zone apex using
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>nsupdate</strong></span>. All signatures, NSEC or NSEC3 chains,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and associated NSEC3PARAM records will be removed automatically.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This will take place after the update request completes.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p> This requires the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-secure-to-insecure</strong></span> option to be set to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <strong class="userinput"><code>yes</code></strong> in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>In addition, if the <span class="command"><strong>auto-dnssec maintain</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone statement is used, it should be removed or changed to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>allow</strong></span> instead (or it will re-sign).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.51"></a>Periodic re-signing</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>In any secure zone which supports dynamic updates, <span class="command"><strong>named</strong></span>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync will periodically re-sign RRsets which have not been re-signed as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a result of some update action. The signature lifetimes will be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync adjusted so as to spread the re-sign load over time rather than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync all at once.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="section"><div class="titlepage"><div><div><h3 class="title">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.10.53"></a>NSEC3 and OPTOUT</h3></div></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> only supports creating new NSEC3 chains
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync where all the NSEC3 records in the zone have the same OPTOUT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> supports UPDATES to zones where the NSEC3
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync records in the chain have mixed OPTOUT state.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> does not support changing the OPTOUT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync state of an individual NSEC3 record, the entire chain needs to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync changed if the OPTOUT state of an individual NSEC3 needs to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync changed.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="rfc5011.support"></a>Dynamic Trust Anchor Management</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>BIND 9.7.0 introduces support for RFC 5011, dynamic trust
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync anchor management. Using this feature allows
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>named</strong></span> to keep track of changes to critical
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DNSSEC keys without any need for the operator to make changes to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configuration files.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.11.3"></a>Validating Resolver</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To configure a validating resolver to use RFC 5011 to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync maintain a trust anchor, configure the trust anchor using a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>managed-keys</strong></span> statement. Information about
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this can be found in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <a class="xref" href="Bv9ARM.ch06.html#managed-keys" title="managed-keys Statement Definition and Usage">the section called “<span class="command"><strong>managed-keys</strong></span> Statement Definition
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="id-1.5.11.4"></a>Authoritative Server</h3></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To set up an authoritative zone for RFC 5011 trust anchor
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync maintenance, generate two (or more) key signing keys (KSKs) for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the zone. Sign the zone with one of them; this is the "active"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync KSK. All KSKs which do not sign the zone are "stand-by"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Any validating resolver which is configured to use the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync active KSK as an RFC 5011-managed trust anchor will take note
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the stand-by KSKs in the zone's DNSKEY RRset, and store them
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for future reference. The resolver will recheck the zone
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync periodically, and after 30 days, if the new key is still there,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then the key will be accepted by the resolver as a valid trust
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync anchor for the zone. Any time after this 30-day acceptance
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync timer has completed, the active KSK can be revoked, and the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync zone can be "rolled over" to the newly accepted key.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>The easiest way to place a stand-by key in a zone is to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync use the "smart signing" features of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-keygen</strong></span> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-signzone</strong></span>. If a key with a publication
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync date in the past, but an activation date which is unset or in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the future, "
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-signzone -S</strong></span>" will include the DNSKEY
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync record in the zone, but will not sign with it:</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$ <strong class="userinput"><code>dnssec-keygen -K keys -f KSK -P now -A now+2y example.net</code></strong>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$ <strong class="userinput"><code>dnssec-signzone -S -K keys example.net</code></strong>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>To revoke a key, the new command
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-revoke</strong></span> has been added. This adds the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync REVOKED bit to the key flags and re-generates the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="filename">K*.private</code> files.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>After revoking the active key, the zone must be signed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync with both the revoked KSK and the new active KSK. (Smart
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync signing takes care of this automatically.)</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Once a key has been revoked and used to sign the DNSKEY
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RRset in which it appears, that key will never again be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync accepted as a valid trust anchor by the resolver. However,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync validation can proceed using the new active key (which had been
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync accepted by the resolver when it was a stand-by key).</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>See RFC 5011 for more details on key rollover
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync scenarios.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>When a key has been revoked, its key ID changes,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync increasing by 128, and wrapping around at 65535. So, for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync example, the key "<code class="filename">Kexample.com.+005+10000</code>" becomes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "<code class="filename">Kexample.com.+005+10128</code>".</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>If two keys have IDs exactly 128 apart, and one is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync revoked, then the two key IDs will collide, causing several
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync problems. To prevent this,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span class="command"><strong>dnssec-keygen</strong></span> will not generate a new key if
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync another key is present which may collide. This checking will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync only occur if the new keys are written to the same directory
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync which holds all other keys in use for that zone.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>Older versions of BIND 9 did not have this precaution.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Exercise caution if using key revocation on keys that were
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync generated by previous releases, or if using keys stored in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync multiple directories or on multiple machines.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<p>It is expected that a future release of BIND 9 will
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync address this problem in a different way, by storing revoked
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync keys with their original unrevoked key IDs.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="pkcs11"></a>PKCS#11 (Cryptoki) support</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PKCS#11 (Public Key Cryptography Standard #11) defines a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync platform-independent API for the control of hardware security
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync modules (HSMs) and other cryptographic support devices.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BIND 9 is known to work with three HSMs: The AEP Keyper, which has
and the <span class="command"><strong>dnssec-*</strong></span> and <span class="command"><strong>pkcs11-*</strong></span>
<span class="command"><strong>dnssec-*</strong></span> tools, or the <code class="option">-m</code> in
$ <strong class="userinput"><code> configure --with-crypto-backend=openssl --prefix=/opt/pkcs11/usr --enable-gost </code></strong>
$ <strong class="userinput"><code> /opt/pkcs11/usr/bin/softhsm-util --init-token 0 --slot 0 --label softhsmv2 </code></strong>
$ <strong class="userinput"><code>wget <a class="link" href="" target="_top">http://www.openssl.org/source/openssl-0.9.8zc.tar.gz</a></code></strong>
$ <strong class="userinput"><code>cp pkcs11.GCC4.0.2.so.4.05 /opt/pkcs11/usr/lib/libpkcs11.so</code></strong>
and "<span class="command"><strong>make test</strong></span>". If "<span class="command"><strong>make
$ <strong class="userinput"><code> echo "0:/opt/pkcs11/softhsm.db" > $SOFTHSM_CONF </code></strong>
$ <strong class="userinput"><code> /opt/pkcs11/usr/bin/softhsm --init-token 0 --slot 0 --label softhsm </code></strong>
<span class="quote">“<span class="quote"><code class="literal">[ available ]</code></span>”</span>.
<a name="id-1.5.12.8.18"></a>Configuring BIND 9 for Linux with the AEP Keyper</h4></div></div></div>
<a name="id-1.5.12.8.19"></a>Configuring BIND 9 for Solaris with the SCA 6000</h4></div></div></div>
$ <strong class="userinput"><code>export LD_LIBRARY_PATH=/opt/pkcs11/usr/lib:${LD_LIBRARY_PATH}</code></strong>
$ <strong class="userinput"><code>export KEYPER_LIBRARY_PATH=/opt/Keyper/PKCS11Provider</code></strong>
"sample-ksk" as the key-signing key for "example.net":
$ <strong class="userinput"><code>dnssec-keyfromlabel -l sample-ksk -f KSK example.net</code></strong>
<a class="xref" href="man.dnssec-keyfromlabel.html" title="dnssec-keyfromlabel"><span class="refentrytitle"><span class="application">dnssec-keyfromlabel</span></span>(8)</a> for details.)
then <span class="command"><strong>named</strong></span> must have access to the HSM PIN. In OpenSSL-based PKCS#11,
this is accomplished by placing the PIN into the openssl.cnf file
The location of the openssl.cnf file can be overridden by
Historically, DLZ drivers had to be statically linked with the <span class="command"><strong>named</strong></span>
"dlopen" driver is linked into <span class="command"><strong>named</strong></span> by default, so configure options
When the DLZ module provides data to <span class="command"><strong>named</strong></span>, it does so in text format.
The response is converted to DNS wire format by <span class="command"><strong>named</strong></span>. This
dynamically-linkable DLZ module--i.e., one which can be
"example.nil", which can answer queries and AXFR requests, and
example.nil. 1800 IN A 10.53.0.1
e.g., by providing different address records for a particular name
(see <a class="xref" href="Bv9ARM.ch04.html#dlz-info" title="DLZ (Dynamically Loadable Zones)">the section called “DLZ (Dynamically Loadable Zones)”</a>), allows zone data to be
<a class="link" href="https://fedorahosted.org/bind-dyndb-ldap/" target="_top">https://fedorahosted.org/bind-dyndb-ldap/</a>.
dyndb example "driver.so" {
"example.nil", which can answer queries and AXFR requests, and
example.nil. 86400 IN A 127.0.0.1
whether the updated RR is an address (i.e., type A or AAAA) and if
zone "catalog.example"
means <span class="command"><strong>rndc addzone</strong></span> and <span class="command"><strong>rndc delzone</strong></span>
catalog.example. IN SOA . . 2016022901 900 600 86400 1
catalog.example. IN NS nsexample.
version.catalog.example. IN TXT "1"
Global options are set at the apex of the catalog zone, e.g.:
masters.catalog.example. IN AAAA 2001:db8::1
masters.catalog.example. IN A 192.0.2.1
label.masters.catalog.example. IN A 192.0.2.2
label.masters.catalog.example. IN TXT "tsig_key_name"
label.masters.5960775ba382e7a4e09263fc06e7c00569b6a05c.zones.catalog.example. IN AAAA 2001:db8::2
see <a class="xref" href="Bv9ARM.ch11.html#ipv6addresses" title="IPv6 addresses (AAAA)">the section called “IPv6 addresses (AAAA)”</a>.
$ORIGIN example.com.