]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/bind9/bin/rndc/rndc.conf.docbook
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / bind9 / bin / rndc / rndc.conf.docbook
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3                [<!ENTITY mdash "&#8212;">]>
4 <!--
5  - Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
6  - Copyright (C) 2000, 2001  Internet Software Consortium.
7  -
8  - Permission to use, copy, modify, and/or distribute this software for any
9  - purpose with or without fee is hereby granted, provided that the above
10  - copyright notice and this permission notice appear in all copies.
11  -
12  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  - PERFORMANCE OF THIS SOFTWARE.
19 -->
20
21 <!-- $Id: rndc.conf.docbook,v 1.17 2007/06/18 23:47:25 tbox Exp $ -->
22 <refentry id="man.rndc.conf">
23   <refentryinfo>
24     <date>June 30, 2000</date>
25   </refentryinfo>
26
27   <refmeta>
28     <refentrytitle><filename>rndc.conf</filename></refentrytitle>
29     <manvolnum>5</manvolnum>
30     <refmiscinfo>BIND9</refmiscinfo>
31   </refmeta>
32
33   <refnamediv>
34     <refname><filename>rndc.conf</filename></refname>
35     <refpurpose>rndc configuration file</refpurpose>
36   </refnamediv>
37
38   <docinfo>
39     <copyright>
40       <year>2004</year>
41       <year>2005</year>
42       <year>2007</year>
43       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
44     </copyright>
45     <copyright>
46       <year>2000</year>
47       <year>2001</year>
48       <holder>Internet Software Consortium.</holder>
49     </copyright>
50   </docinfo>
51
52   <refsynopsisdiv>
53     <cmdsynopsis>
54       <command>rndc.conf</command>
55     </cmdsynopsis>
56   </refsynopsisdiv>
57
58   <refsect1>
59     <title>DESCRIPTION</title>
60     <para><filename>rndc.conf</filename> is the configuration file
61       for <command>rndc</command>, the BIND 9 name server control
62       utility.  This file has a similar structure and syntax to
63       <filename>named.conf</filename>.  Statements are enclosed
64       in braces and terminated with a semi-colon.  Clauses in
65       the statements are also semi-colon terminated.  The usual
66       comment styles are supported:
67     </para>
68     <para>
69       C style: /* */
70     </para>
71     <para>
72       C++ style: // to end of line
73     </para>
74     <para>
75       Unix style: # to end of line
76     </para>
77     <para><filename>rndc.conf</filename> is much simpler than
78       <filename>named.conf</filename>.  The file uses three
79       statements: an options statement, a server statement
80       and a key statement.
81     </para>
82     <para>
83       The <option>options</option> statement contains five clauses.
84       The <option>default-server</option> clause is followed by the
85       name or address of a name server.  This host will be used when
86       no name server is given as an argument to
87       <command>rndc</command>.  The <option>default-key</option>
88       clause is followed by the name of a key which is identified by
89       a <option>key</option> statement.  If no
90       <option>keyid</option> is provided on the rndc command line,
91       and no <option>key</option> clause is found in a matching
92       <option>server</option> statement, this default key will be
93       used to authenticate the server's commands and responses.  The
94       <option>default-port</option> clause is followed by the port
95       to connect to on the remote name server.  If no
96       <option>port</option> option is provided on the rndc command
97       line, and no <option>port</option> clause is found in a
98       matching <option>server</option> statement, this default port
99       will be used to connect.
100       The <option>default-source-address</option> and
101       <option>default-source-address-v6</option> clauses which
102       can be used to set the IPv4 and IPv6 source addresses
103       respectively.
104     </para>
105     <para>
106       After the <option>server</option> keyword, the server
107       statement includes a string which is the hostname or address
108       for a name server.  The statement has three possible clauses:
109       <option>key</option>, <option>port</option> and
110       <option>addresses</option>. The key name must match the
111       name of a key statement in the file.  The port number
112       specifies the port to connect to.  If an <option>addresses</option>
113       clause is supplied these addresses will be used instead of
114       the server name.  Each address can take an optional port.
115       If an <option>source-address</option> or <option>source-address-v6</option>
116       of supplied then these will be used to specify the IPv4 and IPv6
117       source addresses respectively.
118     </para>
119     <para>
120       The <option>key</option> statement begins with an identifying
121       string, the name of the key.  The statement has two clauses.
122       <option>algorithm</option> identifies the encryption algorithm
123       for <command>rndc</command> to use; currently only HMAC-MD5
124       is
125       supported.  This is followed by a secret clause which contains
126       the base-64 encoding of the algorithm's encryption key.  The
127       base-64 string is enclosed in double quotes.
128     </para>
129     <para>
130       There are two common ways to generate the base-64 string for the
131       secret.  The BIND 9 program <command>rndc-confgen</command>
132       can
133       be used to generate a random key, or the
134       <command>mmencode</command> program, also known as
135       <command>mimencode</command>, can be used to generate a
136       base-64
137       string from known input.  <command>mmencode</command> does
138       not
139       ship with BIND 9 but is available on many systems.  See the
140       EXAMPLE section for sample command lines for each.
141     </para>
142   </refsect1>
143
144   <refsect1>
145     <title>EXAMPLE</title>
146
147     <para><programlisting>
148       options {
149         default-server  localhost;
150         default-key     samplekey;
151       };
152 </programlisting>
153     </para>
154     <para><programlisting>
155       server localhost {
156         key             samplekey;
157       };
158 </programlisting>
159     </para>
160     <para><programlisting>
161       server testserver {
162         key             testkey;
163         addresses       { localhost port 5353; };
164       };
165 </programlisting>
166     </para>
167     <para><programlisting>
168       key samplekey {
169         algorithm       hmac-md5;
170         secret          "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
171       };
172 </programlisting>
173     </para>
174     <para><programlisting>
175       key testkey {
176         algorithm       hmac-md5;
177         secret          "R3HI8P6BKw9ZwXwN3VZKuQ==";
178       };
179     </programlisting>
180     </para>
181
182     <para>
183       In the above example, <command>rndc</command> will by
184       default use
185       the server at localhost (127.0.0.1) and the key called samplekey.
186       Commands to the localhost server will use the samplekey key, which
187       must also be defined in the server's configuration file with the
188       same name and secret.  The key statement indicates that samplekey
189       uses the HMAC-MD5 algorithm and its secret clause contains the
190       base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
191     </para>
192     <para>
193       If <command>rndc -s testserver</command> is used then <command>rndc</command> will
194       connect to server on localhost port 5353 using the key testkey.
195     </para>
196     <para>
197       To generate a random secret with <command>rndc-confgen</command>:
198     </para>
199     <para><userinput>rndc-confgen</userinput>
200     </para>
201     <para>
202       A complete <filename>rndc.conf</filename> file, including
203       the
204       randomly generated key, will be written to the standard
205       output.  Commented-out <option>key</option> and
206       <option>controls</option> statements for
207       <filename>named.conf</filename> are also printed.
208     </para>
209     <para>
210       To generate a base-64 secret with <command>mmencode</command>:
211     </para>
212     <para><userinput>echo "known plaintext for a secret" | mmencode</userinput>
213     </para>
214   </refsect1>
215
216   <refsect1>
217     <title>NAME SERVER CONFIGURATION</title>
218     <para>
219       The name server must be configured to accept rndc connections and
220       to recognize the key specified in the <filename>rndc.conf</filename>
221       file, using the controls statement in <filename>named.conf</filename>.
222       See the sections on the <option>controls</option> statement in the
223       BIND 9 Administrator Reference Manual for details.
224     </para>
225   </refsect1>
226
227   <refsect1>
228     <title>SEE ALSO</title>
229     <para><citerefentry>
230         <refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
231       </citerefentry>,
232       <citerefentry>
233         <refentrytitle>rndc-confgen</refentrytitle><manvolnum>8</manvolnum>
234       </citerefentry>,
235       <citerefentry>
236         <refentrytitle>mmencode</refentrytitle><manvolnum>1</manvolnum>
237       </citerefentry>,
238       <citetitle>BIND 9 Administrator Reference Manual</citetitle>.
239     </para>
240   </refsect1>
241
242   <refsect1>
243     <title>AUTHOR</title>
244     <para><corpauthor>Internet Systems Consortium</corpauthor>
245     </para>
246   </refsect1>
247
248 </refentry><!--
249  - Local variables:
250  - mode: sgml
251  - End:
252 -->