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