Bv9ARM.ch04.html revision 3cddb2c552ee6582e8db0849c28747f6b6ca57fe
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
32098293b78922a5fbd10906afa28624820d3756Tinderbox User - Copyright (C) 2000-2003 Internet Software Consortium.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Permission to use, copy, modify, and/or distribute this software for any
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - purpose with or without fee is hereby granted, provided that the above
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - copyright notice and this permission notice appear in all copies.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - PERFORMANCE OF THIS SOFTWARE.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<!-- $Id: Bv9ARM.ch04.html,v 1.99 2009/07/15 01:13:11 tbox Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<link rel="prev" href="Bv9ARM.ch03.html" title="Chapter�3.�Name Server Configuration">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<link rel="next" href="Bv9ARM.ch05.html" title="Chapter�5.�The BIND 9 Lightweight Resolver">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<tr><th colspan="3" align="center">Chapter�4.�Advanced DNS Features</th></tr>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User<div class="titlepage"><div><div><h2 class="title">
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<a name="Bv9ARM.ch04"></a>Chapter�4.�Advanced DNS Features</h2></div></div></div>
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch04.html#notify">Notify</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dynamic_update">Dynamic Update</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#journal">The journal file</a></span></dt></dl></dd>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#incremental_zone_transfers">Incremental Zone Transfers (IXFR)</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2570508">Split DNS</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2570526">Example split DNS setup</a></span></dt></dl></dd>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#tsig">TSIG</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571028">Generate Shared Keys for Each Pair of Hosts</a></span></dt>
f9ce6280cec79deb16ff6d9807aa493ff23e10d9Tinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571101">Copying the Shared Secret to Both Machines</a></span></dt>
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571112">Informing the Servers of the Key's Existence</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571155">Instructing the Server to Use the Key</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571281">TSIG Key Based Access Control</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571330">Errors</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571412">TKEY</a></span></dt>
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571461">SIG(0)</a></span></dt>
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch04.html#DNSSEC">DNSSEC</a></span></dt>
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571666">Generating Keys</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571813">Signing the Zone</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571894">Configuring Servers</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2572064">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572262">Address Lookups Using AAAA Records</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572283">Address to Name Lookups Using Nibble Format</a></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<div class="titlepage"><div><div><h2 class="title" style="clear: both">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <acronym class="acronym">DNS</acronym> NOTIFY is a mechanism that allows master
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User servers to notify their slave servers of changes to a zone's data. In
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt response to a <span><strong class="command">NOTIFY</strong></span> from a master server, the
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User slave will check to see that its version of the zone is the
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User current version and, if not, initiate a zone transfer.
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User For more information about <acronym class="acronym">DNS</acronym>
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User <span><strong class="command">NOTIFY</strong></span>, see the description of the
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User <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
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User the description of the zone option <span><strong class="command">also-notify</strong></span> in
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called “Zone Transfers”</a>. The <span><strong class="command">NOTIFY</strong></span>
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User protocol is specified in RFC 1996.
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User As a slave zone can also be a master to other slaves, <span><strong class="command">named</strong></span>,
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User by default, sends <span><strong class="command">NOTIFY</strong></span> messages for every zone
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User it loads. Specifying <span><strong class="command">notify master-only;</strong></span> will
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User cause <span><strong class="command">named</strong></span> to only send <span><strong class="command">NOTIFY</strong></span> for master
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User zones that it loads.
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User<div class="titlepage"><div><div><h2 class="title" style="clear: both">
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User<a name="dynamic_update"></a>Dynamic Update</h2></div></div></div>
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User Dynamic Update is a method for adding, replacing or deleting
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User records in a master server by sending it a special form of DNS
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User messages. The format and meaning of these messages is specified
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User Dynamic update is enabled by including an
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User <span><strong class="command">allow-update</strong></span> or an <span><strong class="command">update-policy</strong></span>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User clause in the <span><strong class="command">zone</strong></span> statement.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User If the zone's <span><strong class="command">update-policy</strong></span> is set to
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User <strong class="userinput"><code>local</code></strong>, updates to the zone
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User will be permitted for the key <code class="varname">local-ddns</code>,
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User which will be generated by <span><strong class="command">named</strong></span> at startup.
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a> for more details.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <span><strong class="command">tkey-gssapi-credential</strong></span> and
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User <span><strong class="command">tkey-domain</strong></span> clauses in the
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User <span><strong class="command">options</strong></span> statement enable the
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User server to negotiate keys that can be matched against those
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User in <span><strong class="command">update-policy</strong></span> or
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User <span><strong class="command">allow-update</strong></span>.
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User Updating of secure zones (zones using DNSSEC) follows RFC
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User 3007: RRSIG, NSEC and NSEC3 records affected by updates are
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User automatically regenerated by the server using an online
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User zone key. Update authorization is based on transaction
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User signatures and an explicit server policy.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="titlepage"><div><div><h3 class="title">
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<a name="journal"></a>The journal file</h3></div></div></div>
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User All changes made to a zone using dynamic update are stored
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User in the zone's journal file. This file is automatically created
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User by the server when the first dynamic update takes place.
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User The name of the journal file is formed by appending the extension
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User <code class="filename">.jnl</code> to the name of the
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User corresponding zone
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User file unless specifically overridden. The journal file is in a
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User binary format and should not be edited manually.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User The server will also occasionally write ("dump")
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User the complete contents of the updated zone to its zone file.
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User This is not done immediately after
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User each dynamic update, because that would be too slow when a large
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User zone is updated frequently. Instead, the dump is delayed by
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User up to 15 minutes, allowing additional updates to take place.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User When a server is restarted after a shutdown or crash, it will replay
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User the journal file to incorporate into the zone any updates that
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User place after the last zone dump.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User Changes that result from incoming incremental zone transfers are
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User journalled in a similar way.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User The zone files of dynamic zones cannot normally be edited by
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User hand because they are not guaranteed to contain the most recent
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User dynamic changes — those are only in the journal file.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User The only way to ensure that the zone file of a dynamic zone
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User is up to date is to run <span><strong class="command">rndc stop</strong></span>.
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User If you have to make changes to a dynamic zone
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User manually, the following procedure will work: Disable dynamic updates
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User to the zone using
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User <span><strong class="command">rndc freeze <em class="replaceable"><code>zone</code></em></strong></span>.
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User This will also remove the zone's <code class="filename">.jnl</code> file
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User and update the master file. Edit the zone file. Run
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User <span><strong class="command">rndc thaw <em class="replaceable"><code>zone</code></em></strong></span>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User to reload the changed zone and re-enable dynamic updates.
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User<div class="titlepage"><div><div><h2 class="title" style="clear: both">
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User<a name="incremental_zone_transfers"></a>Incremental Zone Transfers (IXFR)</h2></div></div></div>
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User The incremental zone transfer (IXFR) protocol is a way for
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User slave servers to transfer only changed data, instead of having to
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User transfer the entire zone. The IXFR protocol is specified in RFC
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User 1995. See <a href="Bv9ARM.ch09.html#proposed_standards">Proposed Standards</a>.
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User When acting as a master, <acronym class="acronym">BIND</acronym> 9
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User supports IXFR for those zones
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User where the necessary change history information is available. These
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User include master zones maintained by dynamic update and slave zones
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User whose data was obtained by IXFR. For manually maintained master
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User zones, and for slave zones obtained by performing a full zone
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User transfer (AXFR), IXFR is supported only if the option
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User <span><strong class="command">ixfr-from-differences</strong></span> is set
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User to <strong class="userinput"><code>yes</code></strong>.
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User When acting as a slave, <acronym class="acronym">BIND</acronym> 9 will
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User attempt to use IXFR unless
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User it is explicitly disabled. For more information about disabling
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User IXFR, see the description of the <span><strong class="command">request-ixfr</strong></span> clause
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User of the <span><strong class="command">server</strong></span> statement.
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User<div class="titlepage"><div><div><h2 class="title" style="clear: both">
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User<a name="id2570508"></a>Split DNS</h2></div></div></div>
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User Setting up different views, or visibility, of the DNS space to
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User internal and external resolvers is usually referred to as a
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User <span class="emphasis"><em>Split DNS</em></span> setup. There are several
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User reasons an organization would want to set up its DNS this way.
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User One common reason for setting up a DNS system this way is
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User to hide "internal" DNS information from "external" clients on the
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User Internet. There is some debate as to whether or not this is actually
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User Internal DNS information leaks out in many ways (via email headers,
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User for example) and most savvy "attackers" can find the information
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User they need using other means.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt However, since listing addresses of internal servers that
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User external clients cannot possibly reach can result in
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User connection delays and other annoyances, an organization may
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User choose to use a Split DNS to present a consistent view of itself
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User to the outside world.
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User Another common reason for setting up a Split DNS system is
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User to allow internal networks that are behind filters or in RFC 1918
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User space (reserved IP space, as documented in RFC 1918) to resolve DNS
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User on the Internet. Split DNS can also be used to allow mail from outside
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User back in to the internal network.
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User<div class="titlepage"><div><div><h3 class="title">
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User<a name="id2570526"></a>Example split DNS setup</h3></div></div></div>
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User Let's say a company named <span class="emphasis"><em>Example, Inc.</em></span>
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User has several corporate sites that have an internal network with
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User Internet Protocol (IP) space and an external demilitarized zone (DMZ),
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User or "outside" section of a network, that is available to the public.
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User <span class="emphasis"><em>Example, Inc.</em></span> wants its internal clients
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User to be able to resolve external hostnames and to exchange mail with
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User people on the outside. The company also wants its internal resolvers
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User to have access to certain internal-only zones that are not available
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User at all outside of the internal network.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User In order to accomplish this, the company will set up two sets
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User of name servers. One set will be on the inside network (in the
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User IP space) and the other set will be on bastion hosts, which are
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User hosts that can talk to both sides of its network, in the DMZ.
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User The internal servers will be configured to forward all queries,
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User except queries for <code class="filename">site1.internal</code>, <code class="filename">site2.internal</code>, <code class="filename">site1.example.com</code>,
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User and <code class="filename">site2.example.com</code>, to the servers
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User DMZ. These internal servers will have complete sets of information
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User for <code class="filename">site1.example.com</code>, <code class="filename">site2.example.com</code>, <code class="filename">site1.internal</code>,
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User and <code class="filename">site2.internal</code>.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User To protect the <code class="filename">site1.internal</code> and <code class="filename">site2.internal</code> domains,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User the internal name servers must be configured to disallow all queries
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt to these domains from any external hosts, including the bastion
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User The external servers, which are on the bastion hosts, will
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User be configured to serve the "public" version of the <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones.
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User This could include things such as the host records for public servers
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User (<code class="filename">www.example.com</code> and <code class="filename">ftp.example.com</code>),
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User and mail exchange (MX) records (<code class="filename">a.mx.example.com</code> and <code class="filename">b.mx.example.com</code>).
111d5ef471ecec90671f480afd8f93e550a80917Tinderbox User In addition, the public <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User should have special MX records that contain wildcard (`*') records
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User pointing to the bastion hosts. This is needed because external mail
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User servers do not have any other way of looking up how to deliver mail
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User to those internal hosts. With the wildcard records, the mail will
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User be delivered to the bastion host, which can then forward it on to
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User internal hosts.
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User Here's an example of a wildcard MX record:
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User<pre class="programlisting">* IN MX 10 external1.example.com.</pre>
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User Now that they accept mail on behalf of anything in the internal
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User network, the bastion hosts will need to know how to deliver mail
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User to internal hosts. In order for this to work properly, the resolvers
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User the bastion hosts will need to be configured to point to the internal
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User name servers for DNS resolution.
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User Queries for internal hostnames will be answered by the internal
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User servers, and queries for external hostnames will be forwarded back
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User out to the DNS servers on the bastion hosts.
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User In order for all this to work properly, internal clients will
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User need to be configured to query <span class="emphasis"><em>only</em></span> the internal
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User name servers for DNS queries. This could also be enforced via
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User filtering on the network.
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User If everything has been set properly, <span class="emphasis"><em>Example, Inc.</em></span>'s
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User internal clients will now be able to:
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User Look up any hostnames in the <code class="literal">site1</code>
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User <code class="literal">site2.example.com</code> zones.
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User Look up any hostnames in the <code class="literal">site1.internal</code> and
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User <code class="literal">site2.internal</code> domains.
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User<li>Look up any hostnames on the Internet.</li>
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User<li>Exchange mail with both internal and external people.</li>
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User Hosts on the Internet will be able to:
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User Look up any hostnames in the <code class="literal">site1</code>
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User <code class="literal">site2.example.com</code> zones.
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User Exchange mail with anyone in the <code class="literal">site1</code> and
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User <code class="literal">site2.example.com</code> zones.
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User Here is an example configuration for the setup we just
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User described above. Note that this is only configuration information;
bea02a4cc08d57b9f36979906f291ac78a99060aTinderbox User 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>.
bea02a4cc08d57b9f36979906f291ac78a99060aTinderbox User Internal DNS server config:
bea02a4cc08d57b9f36979906f291ac78a99060aTinderbox Useracl internals { 172.16.72.0/24; 192.168.1.0/24; };
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox Useracl externals { <code class="varname">bastion-ips-go-here</code>; };
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt forward only;
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User // forward to external servers
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt forwarders {
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt // sample allow-transfer (no one)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User allow-transfer { none; };
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User // restrict query access
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt allow-query { internals; externals; };
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt // restrict recursion
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User allow-recursion { internals; };
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User// sample master zone
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User // do normal iterative resolution (do not forward)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein forwarders { };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein allow-query { internals; externals; };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein allow-transfer { internals; };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein// sample slave zone
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein masters { 172.16.72.3; };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein forwarders { };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein allow-query { internals; externals; };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein allow-transfer { internals; };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein type master;
350e5eecadfc5ee72b11b2cc46828c9a0bcd717cTinderbox User forwarders { };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein allow-query { internals; };
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein allow-transfer { internals; }
zone "site2.internal" {
zone "site1.example.com" {
zone "site2.example.com" {
A shared secret is generated to be shared between <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span>.
<strong class="userinput"><code>dnssec-keygen -a hmac-md5 -b 128 -n HOST host1-host2.</code></strong>
Imagine <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host 2</em></span>
both servers. The following is added to each server's <code class="filename">named.conf</code> file:
The algorithm, <code class="literal">hmac-md5</code>, is the only one supported by <acronym class="acronym">BIND</acronym>.
be told when keys are to be used. The following is added to the <code class="filename">named.conf</code> file
for <span class="emphasis"><em>host1</em></span>, if the IP address of <span class="emphasis"><em>host2</em></span> is
to that address, the message will be signed with the specified key. <span class="emphasis"><em>host1</em></span> will
configuration file (with <span class="emphasis"><em>host1</em></span>'s address) for <span class="emphasis"><em>host2</em></span> to
See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a> for a discussion of
that the tools shipped with BIND 9.2.x and earlier are not compatible
<strong class="userinput"><code>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</code></strong>
controls. These are here to ensure that <span><strong class="command">named</strong></span> is immune
example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
<a name="id2572064"></a>IPv6 Support in <acronym class="acronym">BIND</acronym> 9</h2></div></div></div>
see <a href="Bv9ARM.ch09.html#ipv6addresses" title="IPv6 addresses (AAAA)">the section called “IPv6 addresses (AAAA)”</a>.
$ORIGIN example.com.