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 "—">]>
5 - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
6 - Copyright (C) 2000, 2001 Internet Software Consortium.
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.
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.
21 <!-- $Id: rndc.conf.docbook,v 1.5.18.12 2007/08/28 07:20:01 tbox Exp $ -->
22 <refentry id="man.rndc.conf">
24 <date>June 30, 2000</date>
28 <refentrytitle><filename>rndc.conf</filename></refentrytitle>
29 <manvolnum>5</manvolnum>
30 <refmiscinfo>BIND9</refmiscinfo>
34 <refname><filename>rndc.conf</filename></refname>
35 <refpurpose>rndc configuration file</refpurpose>
43 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
48 <holder>Internet Software Consortium.</holder>
54 <command>rndc.conf</command>
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:
72 C++ style: // to end of line
75 Unix style: # to end of line
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
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
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.
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
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.
130 There are two common ways to generate the base-64 string for the
131 secret. The BIND 9 program <command>rndc-confgen</command>
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
137 string from known input. <command>mmencode</command> does
139 ship with BIND 9 but is available on many systems. See the
140 EXAMPLE section for sample command lines for each.
145 <title>EXAMPLE</title>
147 <para><programlisting>
149 default-server localhost;
150 default-key samplekey;
154 <para><programlisting>
160 <para><programlisting>
163 addresses { localhost port 5353; };
167 <para><programlisting>
170 secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
174 <para><programlisting>
177 secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
183 In the above example, <command>rndc</command> will by
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.
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.
197 To generate a random secret with <command>rndc-confgen</command>:
199 <para><userinput>rndc-confgen</userinput>
202 A complete <filename>rndc.conf</filename> file, including
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.
210 To generate a base-64 secret with <command>mmencode</command>:
212 <para><userinput>echo "known plaintext for a secret" | mmencode</userinput>
217 <title>NAME SERVER CONFIGURATION</title>
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.
228 <title>SEE ALSO</title>
230 <refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
233 <refentrytitle>rndc-confgen</refentrytitle><manvolnum>8</manvolnum>
236 <refentrytitle>mmencode</refentrytitle><manvolnum>1</manvolnum>
238 <citetitle>BIND 9 Administrator Reference Manual</citetitle>.
243 <title>AUTHOR</title>
244 <para><corpauthor>Internet Systems Consortium</corpauthor>