2 - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-2003 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or 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.
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>rndc.conf</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
22 <link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
23 <link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
24 <link rel="prev" href="man.rndc.html" title="rndc">
25 <link rel="next" href="man.rndc-confgen.html" title="rndc-confgen">
27 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
28 <div class="navheader">
29 <table width="100%" summary="Navigation header">
30 <tr><th colspan="3" align="center"><code class="filename">rndc.conf</code></th></tr>
32 <td width="20%" align="left">
33 <a accesskey="p" href="man.rndc.html">Prev</a> </td>
34 <th width="60%" align="center">Manual pages</th>
35 <td width="20%" align="right"> <a accesskey="n" href="man.rndc-confgen.html">Next</a>
41 <div class="refentry">
42 <a name="man.rndc.conf"></a><div class="titlepage"></div>
43 <div class="refnamediv">
45 <p><code class="filename">rndc.conf</code> — rndc configuration file</p>
47 <div class="refsynopsisdiv">
49 <div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
51 <div class="refsection">
52 <a name="id-1.14.22.7"></a><h2>DESCRIPTION</h2>
53 <p><code class="filename">rndc.conf</code> is the configuration file
54 for <span class="command"><strong>rndc</strong></span>, the BIND 9 name server control
55 utility. This file has a similar structure and syntax to
56 <code class="filename">named.conf</code>. Statements are enclosed
57 in braces and terminated with a semi-colon. Clauses in
58 the statements are also semi-colon terminated. The usual
59 comment styles are supported:
65 C++ style: // to end of line
68 Unix style: # to end of line
70 <p><code class="filename">rndc.conf</code> is much simpler than
71 <code class="filename">named.conf</code>. The file uses three
72 statements: an options statement, a server statement
76 The <code class="option">options</code> statement contains five clauses.
77 The <code class="option">default-server</code> clause is followed by the
78 name or address of a name server. This host will be used when
79 no name server is given as an argument to
80 <span class="command"><strong>rndc</strong></span>. The <code class="option">default-key</code>
81 clause is followed by the name of a key which is identified by
82 a <code class="option">key</code> statement. If no
83 <code class="option">keyid</code> is provided on the rndc command line,
84 and no <code class="option">key</code> clause is found in a matching
85 <code class="option">server</code> statement, this default key will be
86 used to authenticate the server's commands and responses. The
87 <code class="option">default-port</code> clause is followed by the port
88 to connect to on the remote name server. If no
89 <code class="option">port</code> option is provided on the rndc command
90 line, and no <code class="option">port</code> clause is found in a
91 matching <code class="option">server</code> statement, this default port
92 will be used to connect.
93 The <code class="option">default-source-address</code> and
94 <code class="option">default-source-address-v6</code> clauses which
95 can be used to set the IPv4 and IPv6 source addresses
99 After the <code class="option">server</code> keyword, the server
100 statement includes a string which is the hostname or address
101 for a name server. The statement has three possible clauses:
102 <code class="option">key</code>, <code class="option">port</code> and
103 <code class="option">addresses</code>. The key name must match the
104 name of a key statement in the file. The port number
105 specifies the port to connect to. If an <code class="option">addresses</code>
106 clause is supplied these addresses will be used instead of
107 the server name. Each address can take an optional port.
108 If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
109 of supplied then these will be used to specify the IPv4 and IPv6
110 source addresses respectively.
113 The <code class="option">key</code> statement begins with an identifying
114 string, the name of the key. The statement has two clauses.
115 <code class="option">algorithm</code> identifies the encryption algorithm
116 for <span class="command"><strong>rndc</strong></span> to use; currently only HMAC-MD5
118 supported. This is followed by a secret clause which contains
119 the base-64 encoding of the algorithm's encryption key. The
120 base-64 string is enclosed in double quotes.
123 There are two common ways to generate the base-64 string for the
124 secret. The BIND 9 program <span class="command"><strong>rndc-confgen</strong></span>
126 be used to generate a random key, or the
127 <span class="command"><strong>mmencode</strong></span> program, also known as
128 <span class="command"><strong>mimencode</strong></span>, can be used to generate a
130 string from known input. <span class="command"><strong>mmencode</strong></span> does
132 ship with BIND 9 but is available on many systems. See the
133 EXAMPLE section for sample command lines for each.
136 <div class="refsection">
137 <a name="id-1.14.22.8"></a><h2>EXAMPLE</h2>
138 <pre class="programlisting">
140 default-server localhost;
141 default-key samplekey;
146 <pre class="programlisting">
153 <pre class="programlisting">
156 addresses { localhost port 5353; };
161 <pre class="programlisting">
164 secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
169 <pre class="programlisting">
172 secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
178 In the above example, <span class="command"><strong>rndc</strong></span> will by
180 the server at localhost (127.0.0.1) and the key called samplekey.
181 Commands to the localhost server will use the samplekey key, which
182 must also be defined in the server's configuration file with the
183 same name and secret. The key statement indicates that samplekey
184 uses the HMAC-MD5 algorithm and its secret clause contains the
185 base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
188 If <span class="command"><strong>rndc -s testserver</strong></span> is used then <span class="command"><strong>rndc</strong></span> will
189 connect to server on localhost port 5353 using the key testkey.
192 To generate a random secret with <span class="command"><strong>rndc-confgen</strong></span>:
194 <p><strong class="userinput"><code>rndc-confgen</code></strong>
197 A complete <code class="filename">rndc.conf</code> file, including
199 randomly generated key, will be written to the standard
200 output. Commented-out <code class="option">key</code> and
201 <code class="option">controls</code> statements for
202 <code class="filename">named.conf</code> are also printed.
205 To generate a base-64 secret with <span class="command"><strong>mmencode</strong></span>:
207 <p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
210 <div class="refsection">
211 <a name="id-1.14.22.9"></a><h2>NAME SERVER CONFIGURATION</h2>
213 The name server must be configured to accept rndc connections and
214 to recognize the key specified in the <code class="filename">rndc.conf</code>
215 file, using the controls statement in <code class="filename">named.conf</code>.
216 See the sections on the <code class="option">controls</code> statement in the
217 BIND 9 Administrator Reference Manual for details.
220 <div class="refsection">
221 <a name="id-1.14.22.10"></a><h2>SEE ALSO</h2>
222 <p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
223 <span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
224 <span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
225 <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
229 <div class="navfooter">
231 <table width="100%" summary="Navigation footer">
233 <td width="40%" align="left">
234 <a accesskey="p" href="man.rndc.html">Prev</a> </td>
235 <td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
236 <td width="40%" align="right"> <a accesskey="n" href="man.rndc-confgen.html">Next</a>
240 <td width="40%" align="left" valign="top">
241 <span class="application">rndc</span> </td>
242 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
243 <td width="40%" align="right" valign="top"> <span class="application">rndc-confgen</span>
248 <p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.9.9-P3 (Extended Support Version)</p>