]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/doc/arm/man.rndc.conf.html
MFV r306384:
[FreeBSD/stable/9.git] / contrib / bind9 / doc / arm / man.rndc.conf.html
1 <!--
2  - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003 Internet Software Consortium.
4  - 
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.
8  - 
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.
16 -->
17 <html>
18 <head>
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">
26 </head>
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>
31 <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>
36 </td>
37 </tr>
38 </table>
39 <hr>
40 </div>
41 <div class="refentry">
42 <a name="man.rndc.conf"></a><div class="titlepage"></div>
43 <div class="refnamediv">
44 <h2>Name</h2>
45 <p><code class="filename">rndc.conf</code> &#8212; rndc configuration file</p>
46 </div>
47 <div class="refsynopsisdiv">
48 <h2>Synopsis</h2>
49 <div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
50 </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:
60     </p>
61 <p>
62       C style: /* */
63     </p>
64 <p>
65       C++ style: // to end of line
66     </p>
67 <p>
68       Unix style: # to end of line
69     </p>
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
73       and a key statement.
74     </p>
75 <p>
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
96       respectively.
97     </p>
98 <p>
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.
111     </p>
112 <p>
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
117       is
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.
121     </p>
122 <p>
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>
125       can
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
129       base-64
130       string from known input.  <span class="command"><strong>mmencode</strong></span> does
131       not
132       ship with BIND 9 but is available on many systems.  See the
133       EXAMPLE section for sample command lines for each.
134     </p>
135 </div>
136 <div class="refsection">
137 <a name="id-1.14.22.8"></a><h2>EXAMPLE</h2>
138 <pre class="programlisting">
139       options {
140         default-server  localhost;
141         default-key     samplekey;
142       };
143 </pre>
144 <p>
145     </p>
146 <pre class="programlisting">
147       server localhost {
148         key             samplekey;
149       };
150 </pre>
151 <p>
152     </p>
153 <pre class="programlisting">
154       server testserver {
155         key             testkey;
156         addresses       { localhost port 5353; };
157       };
158 </pre>
159 <p>
160     </p>
161 <pre class="programlisting">
162       key samplekey {
163         algorithm       hmac-md5;
164         secret          "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
165       };
166 </pre>
167 <p>
168     </p>
169 <pre class="programlisting">
170       key testkey {
171         algorithm       hmac-md5;
172         secret          "R3HI8P6BKw9ZwXwN3VZKuQ==";
173       };
174     </pre>
175 <p>
176     </p>
177 <p>
178       In the above example, <span class="command"><strong>rndc</strong></span> will by
179       default use
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.
186     </p>
187 <p>
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.
190     </p>
191 <p>
192       To generate a random secret with <span class="command"><strong>rndc-confgen</strong></span>:
193     </p>
194 <p><strong class="userinput"><code>rndc-confgen</code></strong>
195     </p>
196 <p>
197       A complete <code class="filename">rndc.conf</code> file, including
198       the
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.
203     </p>
204 <p>
205       To generate a base-64 secret with <span class="command"><strong>mmencode</strong></span>:
206     </p>
207 <p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
208     </p>
209 </div>
210 <div class="refsection">
211 <a name="id-1.14.22.9"></a><h2>NAME SERVER CONFIGURATION</h2>
212 <p>
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.
218     </p>
219 </div>
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>.
226     </p>
227 </div>
228 </div>
229 <div class="navfooter">
230 <hr>
231 <table width="100%" summary="Navigation footer">
232 <tr>
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>
237 </td>
238 </tr>
239 <tr>
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>
244 </td>
245 </tr>
246 </table>
247 </div>
248 <p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.9.9-P3 (Extended Support Version)</p>
249 </body>
250 </html>