2 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
17 <!-- $Id: rndc.conf.html,v 1.5.2.1.4.13 2006/06/29 13:02:31 marka Exp $ -->
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>rndc.conf</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
24 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25 <a name="id2482688"></a><div class="titlepage"></div>
26 <div class="refnamediv">
28 <p><code class="filename">rndc.conf</code> — rndc configuration file</p>
30 <div class="refsynopsisdiv">
32 <div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
34 <div class="refsect1" lang="en">
35 <a name="id2549398"></a><h2>DESCRIPTION</h2>
37 <code class="filename">rndc.conf</code> is the configuration file
38 for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
39 utility. This file has a similar structure and syntax to
40 <code class="filename">named.conf</code>. Statements are enclosed
41 in braces and terminated with a semi-colon. Clauses in
42 the statements are also semi-colon terminated. The usual
43 comment styles are supported:
49 C++ style: // to end of line
52 Unix style: # to end of line
55 <code class="filename">rndc.conf</code> is much simpler than
56 <code class="filename">named.conf</code>. The file uses three
57 statements: an options statement, a server statement
61 The <code class="option">options</code> statement contains three clauses.
62 The <code class="option">default-server</code> clause is followed by the
63 name or address of a name server. This host will be used when
64 no name server is given as an argument to
65 <span><strong class="command">rndc</strong></span>. The <code class="option">default-key</code>
66 clause is followed by the name of a key which is identified by
67 a <code class="option">key</code> statement. If no
68 <code class="option">keyid</code> is provided on the rndc command line,
69 and no <code class="option">key</code> clause is found in a matching
70 <code class="option">server</code> statement, this default key will be
71 used to authenticate the server's commands and responses. The
72 <code class="option">default-port</code> clause is followed by the port
73 to connect to on the remote name server. If no
74 <code class="option">port</code> option is provided on the rndc command
75 line, and no <code class="option">port</code> clause is found in a
76 matching <code class="option">server</code> statement, this default port
77 will be used to connect.
80 After the <code class="option">server</code> keyword, the server statement
81 includes a string which is the hostname or address for a name
82 server. The statement has two possible clauses:
83 <code class="option">key</code> and <code class="option">port</code>. The key name must
84 match the name of a key statement in the file. The port number
85 specifies the port to connect to.
88 The <code class="option">key</code> statement begins with an identifying
89 string, the name of the key. The statement has two clauses.
90 <code class="option">algorithm</code> identifies the encryption algorithm
91 for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5 is
92 supported. This is followed by a secret clause which contains
93 the base-64 encoding of the algorithm's encryption key. The
94 base-64 string is enclosed in double quotes.
97 There are two common ways to generate the base-64 string for the
98 secret. The BIND 9 program <span><strong class="command">rndc-confgen</strong></span> can
99 be used to generate a random key, or the
100 <span><strong class="command">mmencode</strong></span> program, also known as
101 <span><strong class="command">mimencode</strong></span>, can be used to generate a base-64
102 string from known input. <span><strong class="command">mmencode</strong></span> does not
103 ship with BIND 9 but is available on many systems. See the
104 EXAMPLE section for sample command lines for each.
107 <div class="refsect1" lang="en">
108 <a name="id2549601"></a><h2>EXAMPLE</h2>
109 <pre class="programlisting">
111 default-server localhost;
112 default-key samplekey;
121 secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
125 In the above example, <span><strong class="command">rndc</strong></span> will by default use
126 the server at localhost (127.0.0.1) and the key called samplekey.
127 Commands to the localhost server will use the samplekey key, which
128 must also be defined in the server's configuration file with the
129 same name and secret. The key statement indicates that samplekey
130 uses the HMAC-MD5 algorithm and its secret clause contains the
131 base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
134 To generate a random secret with <span><strong class="command">rndc-confgen</strong></span>:
137 <strong class="userinput"><code>rndc-confgen</code></strong>
140 A complete <code class="filename">rndc.conf</code> file, including the
141 randomly generated key, will be written to the standard
142 output. Commented out <code class="option">key</code> and
143 <code class="option">controls</code> statements for
144 <code class="filename">named.conf</code> are also printed.
147 To generate a base-64 secret with <span><strong class="command">mmencode</strong></span>:
150 <strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
153 <div class="refsect1" lang="en">
154 <a name="id2549730"></a><h2>NAME SERVER CONFIGURATION</h2>
156 The name server must be configured to accept rndc connections and
157 to recognize the key specified in the <code class="filename">rndc.conf</code>
158 file, using the controls statement in <code class="filename">named.conf</code>.
159 See the sections on the <code class="option">controls</code> statement in the
160 BIND 9 Administrator Reference Manual for details.
163 <div class="refsect1" lang="en">
164 <a name="id2549750"></a><h2>SEE ALSO</h2>
166 <span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
167 <span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
168 <span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
169 <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
172 <div class="refsect1" lang="en">
173 <a name="id2549793"></a><h2>AUTHOR</h2>
175 <span class="corpauthor">Internet Systems Consortium</span>