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