man.rndc.conf.html revision ccc383f3a74bdf3559650c630bbca24b11d8f8ae
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews<!--
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User - Copyright (C) 2000-2003 Internet Software Consortium.
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater -
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Permission to use, copy, modify, and 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.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt -
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - 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
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User - PERFORMANCE OF THIS SOFTWARE.
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User-->
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<!-- $Id: man.rndc.conf.html,v 1.100 2008/10/28 01:11:27 tbox Exp $ -->
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<html>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<head>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<title>rndc.conf</title>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User<link rel="prev" href="man.rndc.html" title="rndc">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<link rel="next" href="man.rndc-confgen.html" title="rndc-confgen">
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</head>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<div class="navheader">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<table width="100%" summary="Navigation header">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<tr><th colspan="3" align="center"><code class="filename">rndc.conf</code></th></tr>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<tr>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<td width="20%" align="left">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<a accesskey="p" href="man.rndc.html">Prev</a>�</td>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<th width="60%" align="center">Manual pages</th>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<td width="20%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User</td>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User</tr>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User</table>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<hr>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt</div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="refentry" lang="en">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a name="man.rndc.conf"></a><div class="titlepage"></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="refnamediv">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<h2>Name</h2>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p><code class="filename">rndc.conf</code> &#8212; rndc configuration file</p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User</div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="refsynopsisdiv">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<h2>Synopsis</h2>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt</div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="refsect1" lang="en">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a name="id2606572"></a><h2>DESCRIPTION</h2>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p><code class="filename">rndc.conf</code> is the configuration file
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User utility. This file has a similar structure and syntax to
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="filename">named.conf</code>. Statements are enclosed
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User in braces and terminated with a semi-colon. Clauses in
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User the statements are also semi-colon terminated. The usual
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User comment styles are supported:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User C style: /* */
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p>
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User C++ style: // to end of line
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt Unix style: # to end of line
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater </p>
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater<p><code class="filename">rndc.conf</code> is much simpler than
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt <code class="filename">named.conf</code>. The file uses three
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User statements: an options statement, a server statement
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User and a key statement.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User<p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <code class="option">options</code> statement contains five clauses.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <code class="option">default-server</code> clause is followed by the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User name or address of a name server. This host will be used when
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt no name server is given as an argument to
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span><strong class="command">rndc</strong></span>. The <code class="option">default-key</code>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User clause is followed by the name of a key which is identified by
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt a <code class="option">key</code> statement. If no
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">keyid</code> is provided on the rndc command line,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User and no <code class="option">key</code> clause is found in a matching
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <code class="option">server</code> statement, this default key will be
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User used to authenticate the server's commands and responses. The
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">default-port</code> clause is followed by the port
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt to connect to on the remote name server. If no
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">port</code> option is provided on the rndc command
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User line, and no <code class="option">port</code> clause is found in a
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt matching <code class="option">server</code> statement, this default port
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User will be used to connect.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <code class="option">default-source-address</code> and
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt <code class="option">default-source-address-v6</code> clauses which
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt can be used to set the IPv4 and IPv6 source addresses
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User respectively.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User After the <code class="option">server</code> keyword, the server
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User statement includes a string which is the hostname or address
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt for a name server. The statement has three possible clauses:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">key</code>, <code class="option">port</code> and
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">addresses</code>. The key name must match the
6f1205897504b8f50b1785975482c995888dd630Tinderbox User name of a key statement in the file. The port number
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User specifies the port to connect to. If an <code class="option">addresses</code>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User clause is supplied these addresses will be used instead of
6f1205897504b8f50b1785975482c995888dd630Tinderbox User the server name. Each address can take an optional port.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User of supplied then these will be used to specify the IPv4 and IPv6
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater source addresses respectively.
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User </p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p>
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User The <code class="option">key</code> statement begins with an identifying
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User string, the name of the key. The statement has two clauses.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">algorithm</code> identifies the encryption algorithm
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User is
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User supported. This is followed by a secret clause which contains
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User the base-64 encoding of the algorithm's encryption key. The
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User base-64 string is enclosed in double quotes.
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User </p>
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User<p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User There are two common ways to generate the base-64 string for the
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt secret. The BIND 9 program <span><strong class="command">rndc-confgen</strong></span>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User can
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User be used to generate a random key, or the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span><strong class="command">mmencode</strong></span> program, also known as
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt <span><strong class="command">mimencode</strong></span>, can be used to generate a
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt base-64
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User string from known input. <span><strong class="command">mmencode</strong></span> does
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User not
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater ship with BIND 9 but is available on many systems. See the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User EXAMPLE section for sample command lines for each.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater</div>
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater<div class="refsect1" lang="en">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a name="id2611045"></a><h2>EXAMPLE</h2>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<pre class="programlisting">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt options {
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User default-server localhost;
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User default-key samplekey;
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User };
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User</pre>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<pre class="programlisting">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User server localhost {
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt key samplekey;
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt };
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt</pre>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<p>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User </p>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<pre class="programlisting">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt server testserver {
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt key testkey;
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt addresses { localhost port 5353; };
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt };
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt</pre>
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User<p>
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User </p>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<pre class="programlisting">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt key samplekey {
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt algorithm hmac-md5;
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt };
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User</pre>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </p>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<pre class="programlisting">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt key testkey {
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt algorithm hmac-md5;
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
c313914d0e66b20969215e519bbf2ab4ecf39512Tinderbox User };
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt </pre>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p>
</p>
<p>
In the above example, <span><strong class="command">rndc</strong></span> will by
default use
the server at localhost (127.0.0.1) and the key called samplekey.
Commands to the localhost server will use the samplekey key, which
must also be defined in the server's configuration file with the
same name and secret. The key statement indicates that samplekey
uses the HMAC-MD5 algorithm and its secret clause contains the
base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
</p>
<p>
If <span><strong class="command">rndc -s testserver</strong></span> is used then <span><strong class="command">rndc</strong></span> will
connect to server on localhost port 5353 using the key testkey.
</p>
<p>
To generate a random secret with <span><strong class="command">rndc-confgen</strong></span>:
</p>
<p><strong class="userinput"><code>rndc-confgen</code></strong>
</p>
<p>
A complete <code class="filename">rndc.conf</code> file, including
the
randomly generated key, will be written to the standard
output. Commented-out <code class="option">key</code> and
<code class="option">controls</code> statements for
<code class="filename">named.conf</code> are also printed.
</p>
<p>
To generate a base-64 secret with <span><strong class="command">mmencode</strong></span>:
</p>
<p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2611166"></a><h2>NAME SERVER CONFIGURATION</h2>
<p>
The name server must be configured to accept rndc connections and
to recognize the key specified in the <code class="filename">rndc.conf</code>
file, using the controls statement in <code class="filename">named.conf</code>.
See the sections on the <code class="option">controls</code> statement in the
BIND 9 Administrator Reference Manual for details.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2611192"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2611230"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="man.rndc.html">Prev</a>�</td>
<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
<td width="40%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">
<span class="application">rndc</span>�</td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top">�<span class="application">rndc-confgen</span>
</td>
</tr>
</table>
</div>
</body>
</html>