]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind9/bin/rndc/rndc.conf.docbook
This commit was generated by cvs2svn to compensate for changes in r169695,
[FreeBSD/FreeBSD.git] / contrib / bind9 / bin / rndc / rndc.conf.docbook
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
2                "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
3                [<!ENTITY mdash "&#8212;">]>
4 <!--
5  - Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
6  - Copyright (C) 2000, 2001  Internet Software Consortium.
7  -
8  - Permission to use, copy, modify, and 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.4.206.4 2005/05/12 21:36:04 sra Exp $ -->
22
23 <refentry>
24   <refentryinfo>
25     <date>June 30, 2000</date>
26   </refentryinfo>
27
28   <refmeta>
29     <refentrytitle><filename>rndc.conf</filename></refentrytitle>
30     <manvolnum>5</manvolnum>
31     <refmiscinfo>BIND9</refmiscinfo>
32   </refmeta>
33
34   <docinfo>
35     <copyright>
36       <year>2004</year>
37       <year>2005</year>
38       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
39     </copyright>
40     <copyright>
41       <year>2000</year>
42       <year>2001</year>
43       <holder>Internet Software Consortium.</holder>
44     </copyright>
45   </docinfo>
46
47   <refnamediv>
48     <refname><filename>rndc.conf</filename></refname>
49     <refpurpose>rndc configuration file</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <cmdsynopsis>
54       <command>rndc.conf</command>
55     </cmdsynopsis>
56   </refsynopsisdiv>
57
58   <refsect1>
59     <title>DESCRIPTION</title>
60     <para>
61         <filename>rndc.conf</filename> is the configuration file
62         for <command>rndc</command>, the BIND 9 name server control
63         utility.  This file has a similar structure and syntax to
64         <filename>named.conf</filename>.  Statements are enclosed
65         in braces and terminated with a semi-colon.  Clauses in
66         the statements are also semi-colon terminated.  The usual
67         comment styles are supported:
68     </para>
69     <para>
70         C style: /* */
71     </para>
72     <para>
73         C++ style: // to end of line
74     </para>
75     <para>
76         Unix style: # to end of line
77     </para>
78     <para>
79         <filename>rndc.conf</filename> is much simpler than
80         <filename>named.conf</filename>.  The file uses three
81         statements: an options statement, a server statement
82         and a key statement.
83     </para>
84     <para>
85         The <option>options</option> statement contains three clauses.
86         The <option>default-server</option> clause is followed by the
87         name or address of a name server.  This host will be used when
88         no name server is given as an argument to
89         <command>rndc</command>.  The <option>default-key</option>
90         clause is followed by the name of a key which is identified by
91         a <option>key</option> statement.  If no
92         <option>keyid</option> is provided on the rndc command line,
93         and no <option>key</option> clause is found in a matching
94         <option>server</option> statement, this default key will be
95         used to authenticate the server's commands and responses.  The
96         <option>default-port</option> clause is followed by the port
97         to connect to on the remote name server.  If no
98         <option>port</option> option is provided on the rndc command
99         line, and no <option>port</option> clause is found in a
100         matching <option>server</option> statement, this default port
101         will be used to connect.
102     </para>
103     <para>
104         After the <option>server</option> keyword, the server statement
105         includes a string which is the hostname or address for a name
106         server.  The statement has two possible clauses:
107         <option>key</option> and <option>port</option>. The key name must
108         match the name of a key statement in the file.  The port number
109         specifies the port to connect to.
110     </para>
111     <para>
112         The <option>key</option> statement begins with an identifying
113         string, the name of the key.  The statement has two clauses.
114         <option>algorithm</option> identifies the encryption algorithm
115         for <command>rndc</command> to use; currently only HMAC-MD5 is
116         supported.  This is followed by a secret clause which contains
117         the base-64 encoding of the algorithm's encryption key.  The
118         base-64 string is enclosed in double quotes.
119     </para>
120     <para>
121         There are two common ways to generate the base-64 string for the
122         secret.  The BIND 9 program <command>rndc-confgen</command> can
123         be used to generate a random key, or the
124         <command>mmencode</command> program, also known as
125         <command>mimencode</command>, can be used to generate a base-64
126         string from known input.  <command>mmencode</command> does not
127         ship with BIND 9 but is available on many systems.  See the
128         EXAMPLE section for sample command lines for each.
129     </para>
130   </refsect1>
131
132   <refsect1>
133     <title>EXAMPLE</title>
134
135     <programlisting>
136     options {
137         default-server  localhost;
138         default-key     samplekey;
139       };
140
141       server localhost {
142         key             samplekey;
143       };
144
145       key samplekey {
146         algorithm       hmac-md5;
147         secret          "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
148       };
149     </programlisting>
150
151     <para>
152         In the above example, <command>rndc</command> will by default use
153         the server at localhost (127.0.0.1) and the key called samplekey.
154         Commands to the localhost server will use the samplekey key, which
155         must also be defined in the server's configuration file with the
156         same name and secret.  The key statement indicates that samplekey
157         uses the HMAC-MD5 algorithm and its secret clause contains the
158         base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
159     </para>
160     <para>
161         To generate a random secret with <command>rndc-confgen</command>:
162     </para>
163     <para>
164         <userinput>rndc-confgen</userinput>
165     </para>
166     <para>
167         A complete <filename>rndc.conf</filename> file, including the
168         randomly generated key, will be written to the standard
169         output.  Commented out <option>key</option> and
170         <option>controls</option> statements for
171         <filename>named.conf</filename> are also printed.
172     </para>
173     <para>
174         To generate a base-64 secret with <command>mmencode</command>:
175     </para>
176     <para>
177         <userinput>echo "known plaintext for a secret" | mmencode</userinput>
178     </para>
179   </refsect1>
180
181   <refsect1>
182     <title>NAME SERVER CONFIGURATION</title>
183     <para>
184         The name server must be configured to accept rndc connections and
185         to recognize the key specified in the <filename>rndc.conf</filename>
186         file, using the controls statement in <filename>named.conf</filename>.
187         See the sections on the <option>controls</option> statement in the
188         BIND 9 Administrator Reference Manual for details.
189     </para>
190   </refsect1>
191
192   <refsect1>
193     <title>SEE ALSO</title>
194     <para>
195       <citerefentry>
196         <refentrytitle>rndc</refentrytitle>
197         <manvolnum>8</manvolnum>
198       </citerefentry>,
199       <citerefentry>
200         <refentrytitle>rndc-confgen</refentrytitle>
201         <manvolnum>8</manvolnum>
202       </citerefentry>,
203       <citerefentry>
204         <refentrytitle>mmencode</refentrytitle>
205         <manvolnum>1</manvolnum>
206       </citerefentry>,
207       <citetitle>BIND 9 Administrator Reference Manual</citetitle>.
208     </para>
209   </refsect1>
210
211   <refsect1>
212     <title>AUTHOR</title>
213     <para>
214         <corpauthor>Internet Systems Consortium</corpauthor>
215     </para>
216   </refsect1>
217
218 </refentry>
219
220 <!--
221  - Local variables:
222  - mode: sgml
223  - End:
224 -->
225