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