2 - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 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.
18 <!-- Converted by db4-upgrade version 1.0 -->
19 <refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.rndc.conf">
21 <date>2007-06-18</date>
24 <corpname>ISC</corpname>
25 <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
29 <refentrytitle><filename>rndc.conf</filename></refentrytitle>
30 <manvolnum>5</manvolnum>
31 <refmiscinfo>BIND9</refmiscinfo>
35 <refname><filename>rndc.conf</filename></refname>
36 <refpurpose>rndc configuration file</refpurpose>
46 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
51 <holder>Internet Software Consortium.</holder>
56 <cmdsynopsis sepchar=" ">
57 <command>rndc.conf</command>
61 <refsection><info><title>DESCRIPTION</title></info>
63 <para><filename>rndc.conf</filename> is the configuration file
64 for <command>rndc</command>, the BIND 9 name server control
65 utility. This file has a similar structure and syntax to
66 <filename>named.conf</filename>. Statements are enclosed
67 in braces and terminated with a semi-colon. Clauses in
68 the statements are also semi-colon terminated. The usual
69 comment styles are supported:
75 C++ style: // to end of line
78 Unix style: # to end of line
80 <para><filename>rndc.conf</filename> is much simpler than
81 <filename>named.conf</filename>. The file uses three
82 statements: an options statement, a server statement
86 The <option>options</option> statement contains five clauses.
87 The <option>default-server</option> clause is followed by the
88 name or address of a name server. This host will be used when
89 no name server is given as an argument to
90 <command>rndc</command>. The <option>default-key</option>
91 clause is followed by the name of a key which is identified by
92 a <option>key</option> statement. If no
93 <option>keyid</option> is provided on the rndc command line,
94 and no <option>key</option> clause is found in a matching
95 <option>server</option> statement, this default key will be
96 used to authenticate the server's commands and responses. The
97 <option>default-port</option> clause is followed by the port
98 to connect to on the remote name server. If no
99 <option>port</option> option is provided on the rndc command
100 line, and no <option>port</option> clause is found in a
101 matching <option>server</option> statement, this default port
102 will be used to connect.
103 The <option>default-source-address</option> and
104 <option>default-source-address-v6</option> clauses which
105 can be used to set the IPv4 and IPv6 source addresses
109 After the <option>server</option> keyword, the server
110 statement includes a string which is the hostname or address
111 for a name server. The statement has three possible clauses:
112 <option>key</option>, <option>port</option> and
113 <option>addresses</option>. The key name must match the
114 name of a key statement in the file. The port number
115 specifies the port to connect to. If an <option>addresses</option>
116 clause is supplied these addresses will be used instead of
117 the server name. Each address can take an optional port.
118 If an <option>source-address</option> or <option>source-address-v6</option>
119 of supplied then these will be used to specify the IPv4 and IPv6
120 source addresses respectively.
123 The <option>key</option> statement begins with an identifying
124 string, the name of the key. The statement has two clauses.
125 <option>algorithm</option> identifies the encryption algorithm
126 for <command>rndc</command> to use; currently only HMAC-MD5
128 supported. This is followed by a secret clause which contains
129 the base-64 encoding of the algorithm's encryption key. The
130 base-64 string is enclosed in double quotes.
133 There are two common ways to generate the base-64 string for the
134 secret. The BIND 9 program <command>rndc-confgen</command>
136 be used to generate a random key, or the
137 <command>mmencode</command> program, also known as
138 <command>mimencode</command>, can be used to generate a
140 string from known input. <command>mmencode</command> does
142 ship with BIND 9 but is available on many systems. See the
143 EXAMPLE section for sample command lines for each.
147 <refsection><info><title>EXAMPLE</title></info>
150 <para><programlisting>
152 default-server localhost;
153 default-key samplekey;
157 <para><programlisting>
163 <para><programlisting>
166 addresses { localhost port 5353; };
170 <para><programlisting>
173 secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
177 <para><programlisting>
180 secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
186 In the above example, <command>rndc</command> will by
188 the server at localhost (127.0.0.1) and the key called samplekey.
189 Commands to the localhost server will use the samplekey key, which
190 must also be defined in the server's configuration file with the
191 same name and secret. The key statement indicates that samplekey
192 uses the HMAC-MD5 algorithm and its secret clause contains the
193 base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
196 If <command>rndc -s testserver</command> is used then <command>rndc</command> will
197 connect to server on localhost port 5353 using the key testkey.
200 To generate a random secret with <command>rndc-confgen</command>:
202 <para><userinput>rndc-confgen</userinput>
205 A complete <filename>rndc.conf</filename> file, including
207 randomly generated key, will be written to the standard
208 output. Commented-out <option>key</option> and
209 <option>controls</option> statements for
210 <filename>named.conf</filename> are also printed.
213 To generate a base-64 secret with <command>mmencode</command>:
215 <para><userinput>echo "known plaintext for a secret" | mmencode</userinput>
219 <refsection><info><title>NAME SERVER CONFIGURATION</title></info>
222 The name server must be configured to accept rndc connections and
223 to recognize the key specified in the <filename>rndc.conf</filename>
224 file, using the controls statement in <filename>named.conf</filename>.
225 See the sections on the <option>controls</option> statement in the
226 BIND 9 Administrator Reference Manual for details.
230 <refsection><info><title>SEE ALSO</title></info>
233 <refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
236 <refentrytitle>rndc-confgen</refentrytitle><manvolnum>8</manvolnum>
239 <refentrytitle>mmencode</refentrytitle><manvolnum>1</manvolnum>
241 <citetitle>BIND 9 Administrator Reference Manual</citetitle>.