rndc.conf.html revision 02004b6ff1357b0b97147058d54b58e9f29d8452
93N/A<!--
93N/A - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
93N/A - Copyright (C) 2000, 2001 Internet Software Consortium.
93N/A -
93N/A - Permission to use, copy, modify, and distribute this software for any
93N/A - purpose with or without fee is hereby granted, provided that the above
93N/A - copyright notice and this permission notice appear in all copies.
93N/A -
93N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
93N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
93N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
93N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
93N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
93N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
93N/A - PERFORMANCE OF THIS SOFTWARE.
93N/A-->
93N/A<!-- $Id: rndc.conf.html,v 1.18 2005/07/18 02:57:50 marka Exp $ -->
93N/A<html>
93N/A<head>
93N/A<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
93N/A<title>rndc.conf</title>
93N/A<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
844N/A</head>
93N/A<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
93N/A<a name="id2456972"></a><div class="titlepage"></div>
93N/A<div class="refnamediv">
93N/A<h2>Name</h2>
93N/A<p><code class="filename">rndc.conf</code> &#8212; rndc configuration file</p>
93N/A</div>
285N/A<div class="refsynopsisdiv">
618N/A<h2>Synopsis</h2>
93N/A<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
93N/A</div>
844N/A<div class="refsect1" lang="en">
844N/A<a name="id2514516"></a><h2>DESCRIPTION</h2>
93N/A<p><code class="filename">rndc.conf</code> is the configuration file
93N/A for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
93N/A utility. This file has a similar structure and syntax to
93N/A <code class="filename">named.conf</code>. Statements are enclosed
93N/A in braces and terminated with a semi-colon. Clauses in
93N/A the statements are also semi-colon terminated. The usual
93N/A comment styles are supported:
99N/A </p>
93N/A<p>
93N/A C style: /* */
93N/A </p>
93N/A<p>
285N/A C++ style: // to end of line
93N/A </p>
93N/A<p>
93N/A Unix style: # to end of line
93N/A </p>
285N/A<p><code class="filename">rndc.conf</code> is much simpler than
93N/A <code class="filename">named.conf</code>. The file uses three
93N/A statements: an options statement, a server statement
93N/A and a key statement.
93N/A </p>
93N/A<p>
93N/A The <code class="option">options</code> statement contains five clauses.
93N/A The <code class="option">default-server</code> clause is followed by the
93N/A name or address of a name server. This host will be used when
93N/A no name server is given as an argument to
93N/A <span><strong class="command">rndc</strong></span>. The <code class="option">default-key</code>
93N/A clause is followed by the name of a key which is identified by
93N/A a <code class="option">key</code> statement. If no
93N/A <code class="option">keyid</code> is provided on the rndc command line,
93N/A and no <code class="option">key</code> clause is found in a matching
93N/A <code class="option">server</code> statement, this default key will be
93N/A used to authenticate the server's commands and responses. The
93N/A <code class="option">default-port</code> clause is followed by the port
93N/A to connect to on the remote name server. If no
93N/A <code class="option">port</code> option is provided on the rndc command
93N/A line, and no <code class="option">port</code> clause is found in a
93N/A matching <code class="option">server</code> statement, this default port
93N/A will be used to connect.
93N/A The <code class="option">default-source-address</code> and
93N/A <code class="option">default-source-address-v6</code> clauses which
93N/A can be used to set the IPv4 and IPv6 source addresses
93N/A respectively.
93N/A </p>
93N/A<p>
93N/A After the <code class="option">server</code> keyword, the server
93N/A statement includes a string which is the hostname or address
93N/A for a name server. The statement has three possible clauses:
93N/A <code class="option">key</code>, <code class="option">port</code> and
93N/A <code class="option">addresses</code>. The key name must match the
93N/A name of a key statement in the file. The port number
93N/A specifies the port to connect to. If an <code class="option">addresses</code>
93N/A clause is supplied these addresses will be used instead of
93N/A the server name. Each address can take a optional port.
93N/A If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
93N/A of supplied then these will be used to specify the IPv4 and IPv6
93N/A source addresses respectively.
285N/A </p>
93N/A<p>
93N/A The <code class="option">key</code> statement begins with an identifying
93N/A string, the name of the key. The statement has two clauses.
93N/A <code class="option">algorithm</code> identifies the encryption algorithm
for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5
is
supported. This is followed by a secret clause which contains
the base-64 encoding of the algorithm's encryption key. The
base-64 string is enclosed in double quotes.
</p>
<p>
There are two common ways to generate the base-64 string for the
secret. The BIND 9 program <span><strong class="command">rndc-confgen</strong></span>
can
be used to generate a random key, or the
<span><strong class="command">mmencode</strong></span> program, also known as
<span><strong class="command">mimencode</strong></span>, can be used to generate a
base-64
string from known input. <span><strong class="command">mmencode</strong></span> does
not
ship with BIND 9 but is available on many systems. See the
EXAMPLE section for sample command lines for each.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2514801"></a><h2>EXAMPLE</h2>
<pre class="programlisting">
options {
default-server localhost;
default-key samplekey;
};
</pre>
<p>
</p>
<pre class="programlisting">
server localhost {
key samplekey;
};
</pre>
<p>
</p>
<pre class="programlisting">
server testserver {
key testkey;
addresses { localhost port 5353; };
};
</pre>
<p>
</p>
<pre class="programlisting">
key samplekey {
algorithm hmac-md5;
secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
};
</pre>
<p>
</p>
<pre class="programlisting">
key testkey {
algorithm hmac-md5;
secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
}
</pre>
<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="id2514892"></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="id2514914"></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="id2514952"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
</div></body>
</html>