man.rndc.conf.html revision 25ae0fd27c7f65d235511e9b20f97f6ba92a14cf
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - Copyright (C) 2000-2003 Internet Software Consortium.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - Permission to use, copy, modify, and/or distribute this software for any
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - purpose with or without fee is hereby granted, provided that the above
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - copyright notice and this permission notice appear in all copies.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync - PERFORMANCE OF THIS SOFTWARE.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<!-- $Id$ -->
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<link rel="next" href="man.rndc-confgen.html" title="rndc-confgen">
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<tr><th colspan="3" align="center"><code class="filename">rndc.conf</code></th></tr>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<a accesskey="p" href="man.rndc.html">Prev</a>�</td>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<td width="20%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<a name="man.rndc.conf"></a><div class="titlepage"></div>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<p><code class="filename">rndc.conf</code> — rndc configuration file</p>
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync<p><code class="filename">rndc.conf</code> is the configuration file
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync utility. This file has a similar structure and syntax to
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync <code class="filename">named.conf</code>. Statements are enclosed
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync in braces and terminated with a semi-colon. Clauses in
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync the statements are also semi-colon terminated. The usual
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync comment styles are supported:
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync C style: /* */
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync C++ style: // to end of line
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync Unix style: # to end of line
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync<p><code class="filename">rndc.conf</code> is much simpler than
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync <code class="filename">named.conf</code>. The file uses three
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync statements: an options statement, a server statement
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync and a key statement.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync The <code class="option">options</code> statement contains five clauses.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync The <code class="option">default-server</code> clause is followed by the
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync name or address of a name server. This host will be used when
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync no name server is given as an argument to
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <span><strong class="command">rndc</strong></span>. The <code class="option">default-key</code>
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync clause is followed by the name of a key which is identified by
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">keyid</code> is provided on the rndc command line,
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync and no <code class="option">key</code> clause is found in a matching
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">server</code> statement, this default key will be
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync used to authenticate the server's commands and responses. The
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">default-port</code> clause is followed by the port
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync to connect to on the remote name server. If no
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">port</code> option is provided on the rndc command
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync line, and no <code class="option">port</code> clause is found in a
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync matching <code class="option">server</code> statement, this default port
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync will be used to connect.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync The <code class="option">default-source-address</code> and
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">default-source-address-v6</code> clauses which
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync can be used to set the IPv4 and IPv6 source addresses
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync respectively.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync After the <code class="option">server</code> keyword, the server
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync statement includes a string which is the hostname or address
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync for a name server. The statement has three possible clauses:
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">key</code>, <code class="option">port</code> and
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">addresses</code>. The key name must match the
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync name of a key statement in the file. The port number
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync specifies the port to connect to. If an <code class="option">addresses</code>
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync clause is supplied these addresses will be used instead of
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync the server name. Each address can take an optional port.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync of supplied then these will be used to specify the IPv4 and IPv6
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync source addresses respectively.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync The <code class="option">key</code> statement begins with an identifying
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync string, the name of the key. The statement has two clauses.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <code class="option">algorithm</code> identifies the authentication algorithm
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync (for compatibility), HMAC-SHA1, HMAC-SHA224, HMAC-SHA256
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync (default), HMAC-SHA384 and HMAC-SHA512 are
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync supported. This is followed by a secret clause which contains
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync the base-64 encoding of the algorithm's authentication key. The
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync base-64 string is enclosed in double quotes.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync There are two common ways to generate the base-64 string for the
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync secret. The BIND 9 program <span><strong class="command">rndc-confgen</strong></span>
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync be used to generate a random key, or the
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <span><strong class="command">mmencode</strong></span> program, also known as
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync <span><strong class="command">mimencode</strong></span>, can be used to generate a
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync string from known input. <span><strong class="command">mmencode</strong></span> does
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync ship with BIND 9 but is available on many systems. See the
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync EXAMPLE section for sample command lines for each.
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync default-server localhost;
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync default-key samplekey;
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync server localhost {
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync key samplekey;
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync server testserver {
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync key testkey;
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync addresses { localhost port 5353; };
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync key samplekey {
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync algorithm hmac-sha256;
9ac9eda1e04d193f54339eaeffe1c8b2f8ea04b1vboxsync secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync key testkey {
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync algorithm hmac-sha256;
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync In the above example, <span><strong class="command">rndc</strong></span> will by
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync default use
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync the server at localhost (127.0.0.1) and the key called samplekey.
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync Commands to the localhost server will use the samplekey key, which
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync must also be defined in the server's configuration file with the
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync same name and secret. The key statement indicates that samplekey
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync uses the HMAC-SHA256 algorithm and its secret clause contains the
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync base-64 encoding of the HMAC-SHA256 secret enclosed in double quotes.
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync If <span><strong class="command">rndc -s testserver</strong></span> is used then <span><strong class="command">rndc</strong></span> will
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync connect to server on localhost port 5353 using the key testkey.
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync To generate a random secret with <span><strong class="command">rndc-confgen</strong></span>:
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync<p><strong class="userinput"><code>rndc-confgen</code></strong>
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync A complete <code class="filename">rndc.conf</code> file, including
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync randomly generated key, will be written to the standard
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync output. Commented-out <code class="option">key</code> and
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync <code class="option">controls</code> statements for
4ee5a4cd660730c997785c6cbc12881a115079e8vboxsync <code class="filename">named.conf</code> are also printed.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync To generate a base-64 secret with <span><strong class="command">mmencode</strong></span>:
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<a name="id2660430"></a><h2>NAME SERVER CONFIGURATION</h2>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync The name server must be configured to accept rndc connections and
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync to recognize the key specified in the <code class="filename">rndc.conf</code>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync file, using the controls statement in <code class="filename">named.conf</code>.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync See the sections on the <code class="option">controls</code> statement in the
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync BIND 9 Administrator Reference Manual for details.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync <span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync <span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<p><span class="corpauthor">Internet Systems Consortium</span>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<a accesskey="p" href="man.rndc.html">Prev</a>�</td>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<td width="40%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<td width="40%" align="right" valign="top">�<span class="application">rndc-confgen</span>
b1d7d513c459787311cd09c440524044fa7ff8a9vboxsync<p style="text-align: center;">BIND 9.11.0pre-alpha</p>