man.rndc.conf.html revision ea94d370123a5892f6c47a97f21d1b28d44bb168
c92c50783e4e93699f2a42643b8f200b9b719c87Automatic Updater - Copyright (C) 2004-2012 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<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="prev" href="man.rndc.html" title="rndc">
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater<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>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="man.rndc.conf"></a><div class="titlepage"></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><code class="filename">rndc.conf</code> — rndc configuration file</p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews utility. This file has a similar structure and syntax to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <code class="filename">named.conf</code>. Statements are enclosed
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews in braces and terminated with a semi-colon. Clauses in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the statements are also semi-colon terminated. The usual
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews comment styles are supported:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews C style: /* */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews C++ style: // to end of line
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Unix style: # to end of line
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><code class="filename">rndc.conf</code> is much simpler than
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <code class="filename">named.conf</code>. The file uses three
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews statements: an options statement, a server statement
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and a key statement.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <code class="option">options</code> statement contains five clauses.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <code class="option">default-server</code> clause is followed by the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews name or address of a name server. This host will be used when
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews no name server is given as an argument to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <code class="option">keyid</code> is provided on the rndc command line,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews matching <code class="option">server</code> statement, this default port
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews will be used to connect.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <code class="option">default-source-address</code> and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <code class="option">default-source-address-v6</code> clauses which
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews can be used to set the IPv4 and IPv6 source addresses
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for a name server. The statement has three possible clauses:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <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>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews clause is supplied these addresses will be used instead of
f6da30bb5447c23d880b09f601441e70c5313557Mark Andrews the server name. Each address can take an optional port.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews of supplied then these will be used to specify the IPv4 and IPv6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews source addresses respectively.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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 encryption algorithm
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews supported. This is followed by a secret clause which contains
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the base-64 encoding of the algorithm's encryption key. The
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews base-64 string is enclosed in double quotes.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews default-server localhost;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews default-key samplekey;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews server localhost {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews key samplekey;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews server testserver {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews key testkey;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews addresses { localhost port 5353; };
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews key samplekey {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews algorithm hmac-md5;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews key testkey {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews algorithm hmac-md5;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews In the above example, <span><strong class="command">rndc</strong></span> will by
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews must also be defined in the server's configuration file with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews same name and secret. The key statement indicates that samplekey
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews uses the HMAC-MD5 algorithm and its secret clause contains the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews base-64 encoding of the HMAC-MD5 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>:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><strong class="userinput"><code>rndc-confgen</code></strong>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews A complete <code class="filename">rndc.conf</code> file, including
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews randomly generated key, will be written to the standard
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews output. Commented-out <code class="option">key</code> and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <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>:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User<a name="id2642293"></a><h2>NAME SERVER CONFIGURATION</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The name server must be configured to accept rndc connections and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews See the sections on the <code class="option">controls</code> statement in the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews BIND 9 Administrator Reference Manual for details.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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>,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><span class="corpauthor">Internet Systems Consortium</span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<table width="100%" summary="Navigation footer">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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>
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater<td width="40%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater<td width="40%" align="right" valign="top">�<span class="application">rndc-confgen</span>