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