Bv9ARM.ch04.html revision 1fdd2470b625a58b57d0b155e6caf8c4fc0afe8a
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews - Permission to use, copy, modify, and distribute this software for any
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews - purpose with or without fee is hereby granted, provided that the above
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews - copyright notice and this permission notice appear in all copies.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews - PERFORMANCE OF THIS SOFTWARE.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<!-- $Id: Bv9ARM.ch04.html,v 1.88 2009/01/08 01:11:50 tbox Exp $ -->
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<link rel="prev" href="Bv9ARM.ch03.html" title="Chapter�3.�Name Server Configuration">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<link rel="next" href="Bv9ARM.ch05.html" title="Chapter�5.�The BIND 9 Lightweight Resolver">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<table width="100%" summary="Navigation header">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<tr><th colspan="3" align="center">Chapter�4.�Advanced DNS Features</th></tr>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews<div class="titlepage"><div><div><h2 class="title">
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews<a name="Bv9ARM.ch04"></a>Chapter�4.�Advanced DNS Features</h2></div></div></div>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#notify">Notify</a></span></dt>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dynamic_update">Dynamic Update</a></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#journal">The journal file</a></span></dt></dl></dd>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#incremental_zone_transfers">Incremental Zone Transfers (IXFR)</a></span></dt>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2570513">Split DNS</a></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570531">Example split DNS setup</a></span></dt></dl></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="sect1"><a href="Bv9ARM.ch04.html#tsig">TSIG</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571171">Generate Shared Keys for Each Pair of Hosts</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571244">Copying the Shared Secret to Both Machines</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571255">Informing the Servers of the Key's Existence</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571294">Instructing the Server to Use the Key</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571489">TSIG Key Based Access Control</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571533">Errors</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571616">TKEY</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571665">SIG(0)</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#DNSSEC">DNSSEC</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571801">Generating Keys</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571880">Signing the Zone</a></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571961">Configuring Servers</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2572104">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572166">Address Lookups Using AAAA Records</a></span></dt>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572187">Address to Name Lookups Using Nibble Format</a></span></dt>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<div class="titlepage"><div><div><h2 class="title" style="clear: both">
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<a name="notify"></a>Notify</h2></div></div></div>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <acronym class="acronym">DNS</acronym> NOTIFY is a mechanism that allows master
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson servers to notify their slave servers of changes to a zone's data. In
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson response to a <span><strong class="command">NOTIFY</strong></span> from a master server, the
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson slave will check to see that its version of the zone is the
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson current version and, if not, initiate a zone transfer.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews For more information about <acronym class="acronym">DNS</acronym>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">NOTIFY</strong></span>, see the description of the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">notify</strong></span> option in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a> and
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the description of the zone option <span><strong class="command">also-notify</strong></span> in
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called “Zone Transfers”</a>. The <span><strong class="command">NOTIFY</strong></span>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews protocol is specified in RFC 1996.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews As a slave zone can also be a master to other slaves, named,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews by default, sends <span><strong class="command">NOTIFY</strong></span> messages for every zone
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews it loads. Specifying <span><strong class="command">notify master-only;</strong></span> will
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews cause named to only send <span><strong class="command">NOTIFY</strong></span> for master
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews zones that it loads.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="dynamic_update"></a>Dynamic Update</h2></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Dynamic Update is a method for adding, replacing or deleting
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews records in a master server by sending it a special form of DNS
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews messages. The format and meaning of these messages is specified
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews in RFC 2136.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Dynamic update is enabled by including an
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">allow-update</strong></span> or <span><strong class="command">update-policy</strong></span>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews clause in the <span><strong class="command">zone</strong></span> statement. The
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">tkey-gssapi-credential</strong></span> and
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">tkey-domain</strong></span> clauses in the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">options</strong></span> statement enable the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews server to negotiate keys that can be matched against those
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews in <span><strong class="command">update-policy</strong></span> or
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">allow-update</strong></span>.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Updating of secure zones (zones using DNSSEC) follows RFC
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews 3007: RRSIG, NSEC and NSEC3 records affected by updates are
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews automatically regenerated by the server using an online
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews zone key. Update authorization is based on transaction
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews signatures and an explicit server policy.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h3 class="title">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="journal"></a>The journal file</h3></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews All changes made to a zone using dynamic update are stored
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews in the zone's journal file. This file is automatically created
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews by the server when the first dynamic update takes place.
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews The name of the journal file is formed by appending the extension
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews <code class="filename">.jnl</code> to the name of the
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews corresponding zone
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews file unless specifically overridden. The journal file is in a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews binary format and should not be edited manually.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The server will also occasionally write ("dump")
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the complete contents of the updated zone to its zone file.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews This is not done immediately after
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews each dynamic update, because that would be too slow when a large
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington zone is updated frequently. Instead, the dump is delayed by
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews up to 15 minutes, allowing additional updates to take place.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews When a server is restarted after a shutdown or crash, it will replay
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the journal file to incorporate into the zone any updates that
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson place after the last zone dump.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Changes that result from incoming incremental zone transfers are
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews journalled in a similar way.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The zone files of dynamic zones cannot normally be edited by
09344332cf7840e7e219215128fd52ea4c3d6942Mark Andrews hand because they are not guaranteed to contain the most recent
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews dynamic changes — those are only in the journal file.
fd42a013f17611b34cd49cc0abee0a6b0d251a6bMark Andrews The only way to ensure that the zone file of a dynamic zone
09344332cf7840e7e219215128fd52ea4c3d6942Mark Andrews is up to date is to run <span><strong class="command">rndc stop</strong></span>.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews If you have to make changes to a dynamic zone
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington manually, the following procedure will work: Disable dynamic updates
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews to the zone using
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">rndc freeze <em class="replaceable"><code>zone</code></em></strong></span>.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews This will also remove the zone's <code class="filename">.jnl</code> file
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews and update the master file. Edit the zone file. Run
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">rndc thaw <em class="replaceable"><code>zone</code></em></strong></span>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews to reload the changed zone and re-enable dynamic updates.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="incremental_zone_transfers"></a>Incremental Zone Transfers (IXFR)</h2></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews The incremental zone transfer (IXFR) protocol is a way for
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson slave servers to transfer only changed data, instead of having to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews transfer the entire zone. The IXFR protocol is specified in RFC
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews 1995. See <a href="Bv9ARM.ch09.html#proposed_standards">Proposed Standards</a>.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson When acting as a master, <acronym class="acronym">BIND</acronym> 9
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson supports IXFR for those zones
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson where the necessary change history information is available. These
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews include master zones maintained by dynamic update and slave zones
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson whose data was obtained by IXFR. For manually maintained master
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson zones, and for slave zones obtained by performing a full zone
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews transfer (AXFR), IXFR is supported only if the option
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">ixfr-from-differences</strong></span> is set
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to <strong class="userinput"><code>yes</code></strong>.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews When acting as a slave, <acronym class="acronym">BIND</acronym> 9 will
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews attempt to use IXFR unless
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews it is explicitly disabled. For more information about disabling
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews IXFR, see the description of the <span><strong class="command">request-ixfr</strong></span> clause
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews of the <span><strong class="command">server</strong></span> statement.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2570513"></a>Split DNS</h2></div></div></div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Setting up different views, or visibility, of the DNS space to
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington internal and external resolvers is usually referred to as a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="emphasis"><em>Split DNS</em></span> setup. There are several
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington reasons an organization would want to set up its DNS this way.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington One common reason for setting up a DNS system this way is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to hide "internal" DNS information from "external" clients on the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Internet. There is some debate as to whether or not this is actually
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Internal DNS information leaks out in many ways (via email headers,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington for example) and most savvy "attackers" can find the information
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington they need using other means.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington However, since listing addresses of internal servers that
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington external clients cannot possibly reach can result in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington connection delays and other annoyances, an organization may
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington choose to use a Split DNS to present a consistent view of itself
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to the outside world.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Another common reason for setting up a Split DNS system is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to allow internal networks that are behind filters or in RFC 1918
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington space (reserved IP space, as documented in RFC 1918) to resolve DNS
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington on the Internet. Split DNS can also be used to allow mail from outside
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington back in to the internal network.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="titlepage"><div><div><h3 class="title">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2570531"></a>Example split DNS setup</h3></div></div></div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Let's say a company named <span class="emphasis"><em>Example, Inc.</em></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington has several corporate sites that have an internal network with
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Internet Protocol (IP) space and an external demilitarized zone (DMZ),
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington or "outside" section of a network, that is available to the public.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="emphasis"><em>Example, Inc.</em></span> wants its internal clients
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to be able to resolve external hostnames and to exchange mail with
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington people on the outside. The company also wants its internal resolvers
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to have access to certain internal-only zones that are not available
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington at all outside of the internal network.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington In order to accomplish this, the company will set up two sets
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington of name servers. One set will be on the inside network (in the
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews IP space) and the other set will be on bastion hosts, which are
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington hosts that can talk to both sides of its network, in the DMZ.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington The internal servers will be configured to forward all queries,
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington except queries for <code class="filename">site1.internal</code>, <code class="filename">site2.internal</code>, <code class="filename">site1.example.com</code>,
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington and <code class="filename">site2.example.com</code>, to the servers
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington DMZ. These internal servers will have complete sets of information
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington for <code class="filename">site1.example.com</code>, <code class="filename">site2.example.com</code>,<span class="emphasis"><em></em></span> <code class="filename">site1.internal</code>,
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington and <code class="filename">site2.internal</code>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington To protect the <code class="filename">site1.internal</code> and <code class="filename">site2.internal</code> domains,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the internal name servers must be configured to disallow all queries
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to these domains from any external hosts, including the bastion
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews The external servers, which are on the bastion hosts, will
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews be configured to serve the "public" version of the <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews This could include things such as the host records for public servers
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews (<code class="filename">www.example.com</code> and <code class="filename">ftp.example.com</code>),
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews and mail exchange (MX) records (<code class="filename">a.mx.example.com</code> and <code class="filename">b.mx.example.com</code>).
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews In addition, the public <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews should have special MX records that contain wildcard (`*') records
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews pointing to the bastion hosts. This is needed because external mail
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews servers do not have any other way of looking up how to deliver mail
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews to those internal hosts. With the wildcard records, the mail will
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews be delivered to the bastion host, which can then forward it on to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews internal hosts.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Here's an example of a wildcard MX record:
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<pre class="programlisting">* IN MX 10 external1.example.com.</pre>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Now that they accept mail on behalf of anything in the internal
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington network, the bastion hosts will need to know how to deliver mail
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to internal hosts. In order for this to work properly, the resolvers
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the bastion hosts will need to be configured to point to the internal
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington name servers for DNS resolution.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Queries for internal hostnames will be answered by the internal
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington servers, and queries for external hostnames will be forwarded back
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington out to the DNS servers on the bastion hosts.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington In order for all this to work properly, internal clients will
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington need to be configured to query <span class="emphasis"><em>only</em></span> the internal
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington name servers for DNS queries. This could also be enforced via
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington filtering on the network.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington If everything has been set properly, <span class="emphasis"><em>Example, Inc.</em></span>'s
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews internal clients will now be able to:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Look up any hostnames in the <code class="literal">site1</code>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <code class="literal">site2.example.com</code> zones.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Look up any hostnames in the <code class="literal">site1.internal</code> and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">site2.internal</code> domains.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<li>Look up any hostnames on the Internet.</li>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<li>Exchange mail with both internal and external people.</li>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Hosts on the Internet will be able to:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Look up any hostnames in the <code class="literal">site1</code>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">site2.example.com</code> zones.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Exchange mail with anyone in the <code class="literal">site1</code> and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">site2.example.com</code> zones.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Here is an example configuration for the setup we just
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington described above. Note that this is only configuration information;
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington for information on how to configure your zone files, see <a href="Bv9ARM.ch03.html#sample_configuration" title="Sample Configurations">the section called “Sample Configurations”</a>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Internal DNS server config:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonacl internals { 172.16.72.0/24; 192.168.1.0/24; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonacl externals { <code class="varname">bastion-ips-go-here</code>; };
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews forward only;
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington forwarders { // forward to external servers
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <code class="varname">bastion-ips-go-here</code>;
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews allow-transfer { none; }; // sample allow-transfer (no one)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews allow-query { internals; externals; }; // restrict query access
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews allow-recursion { internals; }; // restrict recursion
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewszone "site1.example.com" { // sample master zone
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington forwarders { }; // do normal iterative
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington // resolution (do not forward)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allow-query { internals; externals; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allow-transfer { internals; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonzone "site2.example.com" { // sample slave zone
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington masters { 172.16.72.3; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington forwarders { };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allow-query { internals; externals; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allow-transfer { internals; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington forwarders { };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allow-query { internals; };
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington allow-transfer { internals; }
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews masters { 172.16.72.3; };
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews forwarders { };
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews allow-query { internals };
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews allow-transfer { internals; }
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington External (bastion host) DNS server config:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsacl internals { 172.16.72.0/24; 192.168.1.0/24; };
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsacl externals { bastion-ips-go-here; };
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington allow-transfer { none; }; // sample allow-transfer (no one)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews allow-query { any; }; // default query access
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews allow-query-cache { internals; externals; }; // restrict cache access
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington allow-recursion { internals; externals; }; // restrict recursion
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewszone "site1.example.com" { // sample slave zone
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews type master;
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews allow-transfer { internals; externals; };
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews masters { another_bastion_host_maybe; };
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews allow-transfer { internals; externals; }
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews In the <code class="filename">resolv.conf</code> (or equivalent) on
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the bastion host(s):
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsnameserver 172.16.72.2
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsnameserver 172.16.72.3
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsnameserver 172.16.72.4
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews This is a short guide to setting up Transaction SIGnatures
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews (TSIG) based transaction security in <acronym class="acronym">BIND</acronym>. It describes changes
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews to the configuration file as well as what changes are required for
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews different features, including the process of creating transaction
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews keys and using transaction signatures with <acronym class="acronym">BIND</acronym>.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews <acronym class="acronym">BIND</acronym> primarily supports TSIG for server
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews to server communication.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews This includes zone transfer, notify, and recursive query messages.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews Resolvers based on newer versions of <acronym class="acronym">BIND</acronym> 8 have limited support
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews TSIG can also be useful for dynamic update. A primary
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews server for a dynamic zone should control access to the dynamic
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews update service, but IP-based access control is insufficient.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews The cryptographic access control provided by TSIG
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews is far superior. The <span><strong class="command">nsupdate</strong></span>
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews program supports TSIG via the <code class="option">-k</code> and
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews <code class="option">-y</code> command line options or inline by use
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews of the <span><strong class="command">key</strong></span>.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h3 class="title">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2571171"></a>Generate Shared Keys for Each Pair of Hosts</h3></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews A shared secret is generated to be shared between <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span>.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews An arbitrary key name is chosen: "host1-host2.". The key name must
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington be the same on both hosts.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<div class="titlepage"><div><div><h4 class="title">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="id2571188"></a>Automatic Generation</h4></div></div></div>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The following command will generate a 128-bit (16 byte) HMAC-MD5
854b0d831e45a90211917e3a49f40d10c4a2ee79Mark Andrews key as described above. Longer keys are better, but shorter keys
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews are easier to read. Note that the maximum key length is 512 bits;
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington keys longer than that will be digested with MD5 to produce a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews 128-bit key.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <strong class="userinput"><code>dnssec-keygen -a hmac-md5 -b 128 -n HOST host1-host2.</code></strong>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews The key is in the file <code class="filename">Khost1-host2.+157+00000.private</code>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Nothing directly uses this file, but the base-64 encoded string
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington can be extracted from the file and used as a shared secret:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<pre class="programlisting">Key: La/E5CjG9O+os1jq0a2jdA==</pre>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews The string "<code class="literal">La/E5CjG9O+os1jq0a2jdA==</code>" can
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews be used as the shared secret.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="titlepage"><div><div><h4 class="title">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<a name="id2571226"></a>Manual Generation</h4></div></div></div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The shared secret is simply a random sequence of bits, encoded
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington in base-64. Most ASCII strings are valid base-64 strings (assuming
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the length is a multiple of 4 and only valid characters are used),
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews so the shared secret can be manually generated.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Also, a known string can be run through <span><strong class="command">mmencode</strong></span> or
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington a similar program to generate base-64 encoded data.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h3 class="title">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2571244"></a>Copying the Shared Secret to Both Machines</h3></div></div></div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington This is beyond the scope of DNS. A secure transport mechanism
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews should be used. This could be secure FTP, ssh, telephone, etc.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h3 class="title">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="id2571255"></a>Informing the Servers of the Key's Existence</h3></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Imagine <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host 2</em></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington both servers. The following is added to each server's <code class="filename">named.conf</code> file:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewskey host1-host2. {
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews algorithm hmac-md5;
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews The algorithm, hmac-md5, is the only one supported by <acronym class="acronym">BIND</acronym>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The secret is the one generated above. Since this is a secret, it
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington is recommended that either <code class="filename">named.conf</code> be non-world
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington readable, or the key directive be added to a non-world readable
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington file that is included by
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews At this point, the key is recognized. This means that if the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews server receives a message signed by this key, it can verify the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews signature. If the signature is successfully verified, the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington response is signed by the same key.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h3 class="title">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<a name="id2571294"></a>Instructing the Server to Use the Key</h3></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Since keys are shared between two hosts only, the server must
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews be told when keys are to be used. The following is added to the <code class="filename">named.conf</code> file
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews for <span class="emphasis"><em>host1</em></span>, if the IP address of <span class="emphasis"><em>host2</em></span> is
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsserver 10.1.2.3 {
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews keys { host1-host2. ;};
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson Multiple keys may be present, but only the first is used.
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson This directive does not contain any secrets, so it may be in a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews world-readable
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews If <span class="emphasis"><em>host1</em></span> sends a message that is a request
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews to that address, the message will be signed with the specified key. <span class="emphasis"><em>host1</em></span> will
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews expect any responses to signed messages to be signed with the same
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington A similar statement must be present in <span class="emphasis"><em>host2</em></span>'s
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews configuration file (with <span class="emphasis"><em>host1</em></span>'s address) for <span class="emphasis"><em>host2</em></span> to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews sign request messages to <span class="emphasis"><em>host1</em></span>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="titlepage"><div><div><h3 class="title">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<a name="id2571489"></a>TSIG Key Based Access Control</h3></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <acronym class="acronym">BIND</acronym> allows IP addresses and ranges
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to be specified in ACL
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews definitions and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">allow-{ query | transfer | update }</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington This has been extended to allow TSIG keys also. The above key would
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington be denoted <span><strong class="command">key host1-host2.</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington An example of an allow-update directive would be:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsallow-update { key host1-host2. ;};
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews This allows dynamic updates to succeed only if the request
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington was signed by a key named "<span><strong class="command">host1-host2.</strong></span>".
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington You may want to read about the more powerful
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">update-policy</strong></span> statement in
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="titlepage"><div><div><h3 class="title">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<a name="id2571533"></a>Errors</h3></div></div></div>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The processing of TSIG signed messages can result in
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews several errors. If a signed message is sent to a non-TSIG aware
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews server, a FORMERR (format error) will be returned, since the server will not
53aed64e0f8553762fc0c380ee41cb42f514c7d5Brian Wellington understand the record. This is a result of misconfiguration,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews since the server must be explicitly configured to send a TSIG
53aed64e0f8553762fc0c380ee41cb42f514c7d5Brian Wellington signed message to a specific server.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews If a TSIG aware server receives a message signed by an
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews unknown key, the response will be unsigned with the TSIG
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews extended error code set to BADKEY. If a TSIG aware server
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews receives a message with a signature that does not validate, the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews response will be unsigned with the TSIG extended error code set
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews to BADSIG. If a TSIG aware server receives a message with a time
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews outside of the allowed range, the response will be signed with
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the TSIG extended error code set to BADTIME, and the time values
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews will be adjusted so that the response can be successfully
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington verified. In any of these cases, the message's rcode (response code) is set to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews NOTAUTH (not authenticated).
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="id2571616"></a>TKEY</h2></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<p><span><strong class="command">TKEY</strong></span>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews is a mechanism for automatically generating a shared secret
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington between two hosts. There are several "modes" of
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <span><strong class="command">TKEY</strong></span> that specify how the key is generated
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington or assigned. <acronym class="acronym">BIND</acronym> 9 implements only one of
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews these modes, the Diffie-Hellman key exchange. Both hosts are
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington required to have a Diffie-Hellman KEY record (although this
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews record is not required to be present in a zone). The
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">TKEY</strong></span> process must use signed messages,
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews signed either by TSIG or SIG(0). The result of
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">TKEY</strong></span> is a shared secret that can be used to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews sign messages with TSIG. <span><strong class="command">TKEY</strong></span> can also be
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews used to delete shared secrets that it had previously
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The <span><strong class="command">TKEY</strong></span> process is initiated by a
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews or server by sending a signed <span><strong class="command">TKEY</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (including any appropriate KEYs) to a TKEY-aware server. The
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews server response, if it indicates success, will contain a
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <span><strong class="command">TKEY</strong></span> record and any appropriate keys.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews this exchange, both participants have enough information to
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews determine the shared secret; the exact process depends on the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">TKEY</strong></span> mode. When using the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Diffie-Hellman
73eb75dc212911e4da58a3ce0a4672d3910193ebBrian Wellington <span><strong class="command">TKEY</strong></span> mode, Diffie-Hellman keys are
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews and the shared secret is derived by both participants.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="id2571665"></a>SIG(0)</h2></div></div></div>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <acronym class="acronym">BIND</acronym> 9 partially supports DNSSEC SIG(0)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews transaction signatures as specified in RFC 2535 and RFC2931.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington uses public/private keys to authenticate messages. Access control
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews is performed in the same manner as TSIG keys; privileges can be
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews granted or denied based on the key name.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews When a SIG(0) signed message is received, it will only be
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews verified if the key is known and trusted by the server; the server
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews will not attempt to locate and/or validate the key.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SIG(0) signing of multiple-message TCP streams is not
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The only tool shipped with <acronym class="acronym">BIND</acronym> 9 that
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington generates SIG(0) signed messages is <span><strong class="command">nsupdate</strong></span>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="titlepage"><div><div><h2 class="title" style="clear: both">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<a name="DNSSEC"></a>DNSSEC</h2></div></div></div>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Cryptographic authentication of DNS information is possible
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews through the DNS Security (<span class="emphasis"><em>DNSSEC-bis</em></span>) extensions,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews defined in RFC 4033, RFC 4034, and RFC 4035.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews This section describes the creation and use of DNSSEC signed zones.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews In order to set up a DNSSEC secure zone, there are a series
8227257b1c0224a7991e04bb79dc5059d5062dfbAndreas Gustafsson of steps which must be followed. <acronym class="acronym">BIND</acronym>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews with several tools
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews that are used in this process, which are explained in more detail
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews below. In all cases, the <code class="option">-h</code> option prints a
8227257b1c0224a7991e04bb79dc5059d5062dfbAndreas Gustafsson full list of parameters. Note that the DNSSEC tools require the
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews keyset files to be in the working directory or the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews directory specified by the <code class="option">-d</code> option, and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington that the tools shipped with BIND 9.2.x and earlier are not compatible
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews with the current ones.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews There must also be communication with the administrators of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the parent and/or child zone to transmit keys. A zone's security
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews status must be indicated by the parent zone for a DNSSEC capable
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews resolver to trust its data. This is done through the presence
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews or absence of a <code class="literal">DS</code> record at the
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews For other servers to trust data in this zone, they must
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews either be statically configured with this zone's zone key or the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews zone key of another zone above this one in the DNS tree.
99f467f016d9354c7548b7d24b65ac986b118a52Andreas Gustafsson<div class="titlepage"><div><div><h3 class="title">
99f467f016d9354c7548b7d24b65ac986b118a52Andreas Gustafsson<a name="id2571801"></a>Generating Keys</h3></div></div></div>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The <span><strong class="command">dnssec-keygen</strong></span> program is used to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews generate keys.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington A secure zone must contain one or more zone keys. The
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews zone keys will sign all other records in the zone, as well as
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the zone keys of any secure delegated zones. Zone keys must
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews have the same name as the zone, a name type of
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">ZONE</strong></span>, and must be usable for
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington authentication.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews It is recommended that zone keys use a cryptographic algorithm
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews designated as "mandatory to implement" by the IETF; currently
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the only one is RSASHA1.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews The following command will generate a 768-bit RSASHA1 key for
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the <code class="filename">child.example</code> zone:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <strong class="userinput"><code>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</code></strong>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Two output files will be produced:
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <code class="filename">Kchild.example.+005+12345.key</code> and
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <code class="filename">Kchild.example.+005+12345.private</code>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington 12345 is an example of a key tag). The key filenames contain
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the key name (<code class="filename">child.example.</code>),
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews algorithm (3
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The private key (in the <code class="filename">.private</code>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington used to generate signatures, and the public key (in the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <code class="filename">.key</code> file) is used for signature
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews verification.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson To generate another key with the same properties (but with
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson a different key tag), repeat the above command.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson The <span><strong class="command">dnssec-keyfromlabel</strong></span> program is used
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews to get a key pair from a crypto hardware and build the key
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews files. Its usage is similar to <span><strong class="command">dnssec-keygen</strong></span>.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson The public keys should be inserted into the zone file by
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson including the <code class="filename">.key</code> files using
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <span><strong class="command">$INCLUDE</strong></span> statements.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<div class="titlepage"><div><div><h3 class="title">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2571880"></a>Signing the Zone</h3></div></div></div>
ca9a8f6d0b0f2a400a96f868193471510364336fMark Andrews The <span><strong class="command">dnssec-signzone</strong></span> program is used
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to sign a zone.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Any <code class="filename">keyset</code> files corresponding to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews secure subzones should be present. The zone signer will
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews generate <code class="literal">NSEC</code>, <code class="literal">NSEC3</code>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews and <code class="literal">RRSIG</code> records for the zone, as
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews well as <code class="literal">DS</code> for the child zones if
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">'-g'</code> is specified. If <code class="literal">'-g'</code>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews is not specified, then DS RRsets for the secure child
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews zones need to be added manually.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews The following command signs the zone, assuming it is in a
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews file called <code class="filename">zone.child.example</code>. By
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews default, all zone keys which have an available private key are
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews used to generate signatures.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <strong class="userinput"><code>dnssec-signzone -o child.example zone.child.example</code></strong>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews One output file is produced:
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <code class="filename">zone.child.example.signed</code>. This
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews should be referenced by <code class="filename">named.conf</code>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews input file for the zone.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<p><span><strong class="command">dnssec-signzone</strong></span>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews will also produce a keyset and dsset files and optionally a
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews dlvset file. These are used to provide the parent zone
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews administrators with the <code class="literal">DNSKEYs</code> (or their
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews corresponding <code class="literal">DS</code> records) that are the
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews secure entry point to the zone.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<div class="titlepage"><div><div><h3 class="title">
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<a name="id2571961"></a>Configuring Servers</h3></div></div></div>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews To enable <span><strong class="command">named</strong></span> to respond appropriately
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews to DNS requests from DNSSEC aware clients,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span><strong class="command">dnssec-enable</strong></span> must be set to yes.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews To enable <span><strong class="command">named</strong></span> to validate answers from
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews other servers both <span><strong class="command">dnssec-enable</strong></span> and
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span><strong class="command">dnssec-validation</strong></span> must be set and some
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span><strong class="command">trusted-keys</strong></span> must be configured
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span><strong class="command">trusted-keys</strong></span> are copies of DNSKEY RRs
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews for zones that are used to form the first link in the
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews cryptographic chain of trust. All keys listed in
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span><strong class="command">trusted-keys</strong></span> (and corresponding zones)
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews are deemed to exist and only the listed keys will be used
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews to validated the DNSKEY RRset that they are from.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span><strong class="command">trusted-keys</strong></span> are described in more detail
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews later in this document.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews Unlike <acronym class="acronym">BIND</acronym> 8, <acronym class="acronym">BIND</acronym>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews 9 does not verify signatures on load, so zone keys for
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews authoritative zones do not need to be specified in the
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews configuration file.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews After DNSSEC gets established, a typical DNSSEC configuration
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews will look something like the following. It has a one or
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews more public keys for the root. This allows answers from
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews outside the organization to be validated. It will also
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews have several keys for parts of the namespace the organization
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews controls. These are here to ensure that named is immune
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews to compromises in the DNSSEC components of the security
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews of parent zones.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrewstrusted-keys {
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews /* Root Key */
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews"." 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwSJxrGkxJWoZu6I7PzJu/
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews E9gx4UC1zGAHlXKdE4zYIpRhaBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews zy2Xy4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYghf+6fElrmLkdaz
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews MQ2OCnACR817DF4BBa7UR/beDHyp5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews /lUUVRbkeg1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq66gKodQj+M
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews iA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ97S+LKUTpQcq27R7AT3/V5hRQxScI
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews Nqwcz4jYqZD2fQdgxbcDTClU0CRBdiieyLMNzXG3";
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews/* Key for our organization's forward zone */
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrewsexample.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM65KbhTjrW1ZaARmPhEZZe
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews 3Y9ifgEuq7vZ/zGZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb4JKUbb
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews OTcM8pwXlj0EiX3oDFVmjHO444gLkBO UKUf/mC7HvfwYH/Be22GnC
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews lrinKJp1Og4ywzO9WglMk7jbfW33gUKvirTHr25GL7STQUzBb5Usxt
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews 8lgnyTUHs1t3JwCY5hKZ6CqFxmAVZP20igTixin/1LcrgX/KMEGd/b
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews iuvF4qJCyduieHukuY3H4XMAcR+xia2 nIUPvm/oyWR8BW/hWdzOvn
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews/* Key for our reverse zone. */
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwcxOdNax071L18QqZnQQQA
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews VVr+iLhGTnNGp3HoWQLUIzKrJVZ3zggy3WwNT6kZo6c0
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews yOI6BgPsw+YZdzlYMaIJGf4M4dyoKIhzdZyQ2bYQrjyQ
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews 4LB0lC7aOnsMyYKHHYeRv PxjIQXmdqgOJGq+vsevG06
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews 7HJYHJhAZD5L59VvjSPsZJHeDCUyWYrvPZesZDIRvhDD
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews dnssec-enable yes;
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews dnssec-validation yes;
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews None of the keys listed in this example are valid. In particular,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews the root key is not valid.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<a name="id2572104"></a>IPv6 Support in <acronym class="acronym">BIND</acronym> 9</h2></div></div></div>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <acronym class="acronym">BIND</acronym> 9 fully supports all currently
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews defined forms of IPv6
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews name to address and address to name lookups. It will also use
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews IPv6 addresses to make queries when running on an IPv6 capable
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews For forward lookups, <acronym class="acronym">BIND</acronym> 9 supports
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews only AAAA records. RFC 3363 deprecated the use of A6 records,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews and client-side support for A6 records was accordingly removed
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews from <acronym class="acronym">BIND</acronym> 9.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews However, authoritative <acronym class="acronym">BIND</acronym> 9 name servers still
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews load zone files containing A6 records correctly, answer queries
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews for A6 records, and accept zone transfer for a zone containing A6
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews For IPv6 reverse lookups, <acronym class="acronym">BIND</acronym> 9 supports
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews the traditional "nibble" format used in the
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span class="emphasis"><em>ip6.arpa</em></span> domain, as well as the older, deprecated
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <span class="emphasis"><em>ip6.int</em></span> domain.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews Older versions of <acronym class="acronym">BIND</acronym> 9
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews supported the "binary label" (also known as "bitstring") format,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews but support of binary labels has been completely removed per
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews Many applications in <acronym class="acronym">BIND</acronym> 9 do not understand
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews the binary label format at all any more, and will return an
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews error if given.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews In particular, an authoritative <acronym class="acronym">BIND</acronym> 9
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews name server will not load a zone file containing binary labels.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews For an overview of the format and structure of IPv6 addresses,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews see <a href="Bv9ARM.ch09.html#ipv6addresses" title="IPv6 addresses (AAAA)">the section called “IPv6 addresses (AAAA)”</a>.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<div class="titlepage"><div><div><h3 class="title">
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<a name="id2572166"></a>Address Lookups Using AAAA Records</h3></div></div></div>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews The IPv6 AAAA record is a parallel to the IPv4 A record,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews and, unlike the deprecated A6 record, specifies the entire
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews IPv6 address in a single record. For example,
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrewshost 3600 IN AAAA 2001:db8::1
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews Use of IPv4-in-IPv6 mapped addresses is not recommended.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews If a host has an IPv4 address, use an A record, not
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews a AAAA, with <code class="literal">::ffff:192.168.42.1</code> as
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews the address.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<div class="titlepage"><div><div><h3 class="title">
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews<a name="id2572187"></a>Address to Name Lookups Using Nibble Format</h3></div></div></div>
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews When looking up an address in nibble format, the address
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews components are simply reversed, just as in IPv4, and
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews <code class="literal">ip6.arpa.</code> is appended to the
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews resulting name.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews For example, the following would provide reverse name lookup for
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews a host with address
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews$ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 14400 IN PTR host.example.com.
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<table width="100%" summary="Navigation footer">
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<td width="40%" align="left" valign="top">Chapter�3.�Name Server Configuration�</td>
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<td width="40%" align="right" valign="top">�Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</td>