1170222Sdougb<!--
2254402Serwin - Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
3170222Sdougb - Copyright (C) 2000-2003 Internet Software Consortium.
4170222Sdougb - 
5204619Sdougb - Permission to use, copy, modify, and/or distribute this software for any
6170222Sdougb - purpose with or without fee is hereby granted, provided that the above
7170222Sdougb - copyright notice and this permission notice appear in all copies.
8170222Sdougb - 
9170222Sdougb - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10170222Sdougb - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11170222Sdougb - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12170222Sdougb - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13170222Sdougb - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14170222Sdougb - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15170222Sdougb - PERFORMANCE OF THIS SOFTWARE.
16170222Sdougb-->
17234010Sdougb<!-- $Id$ -->
18170222Sdougb<html>
19170222Sdougb<head>
20170222Sdougb<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21170222Sdougb<title>rndc.conf</title>
22170222Sdougb<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23170222Sdougb<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
24170222Sdougb<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
25170222Sdougb<link rel="prev" href="man.rndc.html" title="rndc">
26170222Sdougb<link rel="next" href="man.rndc-confgen.html" title="rndc-confgen">
27170222Sdougb</head>
28170222Sdougb<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29170222Sdougb<div class="navheader">
30170222Sdougb<table width="100%" summary="Navigation header">
31170222Sdougb<tr><th colspan="3" align="center"><code class="filename">rndc.conf</code></th></tr>
32170222Sdougb<tr>
33170222Sdougb<td width="20%" align="left">
34170222Sdougb<a accesskey="p" href="man.rndc.html">Prev</a>�</td>
35170222Sdougb<th width="60%" align="center">Manual pages</th>
36170222Sdougb<td width="20%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
37170222Sdougb</td>
38170222Sdougb</tr>
39170222Sdougb</table>
40170222Sdougb<hr>
41170222Sdougb</div>
42170222Sdougb<div class="refentry" lang="en">
43170222Sdougb<a name="man.rndc.conf"></a><div class="titlepage"></div>
44170222Sdougb<div class="refnamediv">
45170222Sdougb<h2>Name</h2>
46170222Sdougb<p><code class="filename">rndc.conf</code> &#8212; rndc configuration file</p>
47170222Sdougb</div>
48170222Sdougb<div class="refsynopsisdiv">
49170222Sdougb<h2>Synopsis</h2>
50170222Sdougb<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
51170222Sdougb</div>
52170222Sdougb<div class="refsect1" lang="en">
53262706Serwin<a name="id2644379"></a><h2>DESCRIPTION</h2>
54170222Sdougb<p><code class="filename">rndc.conf</code> is the configuration file
55170222Sdougb      for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
56170222Sdougb      utility.  This file has a similar structure and syntax to
57170222Sdougb      <code class="filename">named.conf</code>.  Statements are enclosed
58170222Sdougb      in braces and terminated with a semi-colon.  Clauses in
59170222Sdougb      the statements are also semi-colon terminated.  The usual
60170222Sdougb      comment styles are supported:
61170222Sdougb    </p>
62170222Sdougb<p>
63170222Sdougb      C style: /* */
64170222Sdougb    </p>
65170222Sdougb<p>
66170222Sdougb      C++ style: // to end of line
67170222Sdougb    </p>
68170222Sdougb<p>
69170222Sdougb      Unix style: # to end of line
70170222Sdougb    </p>
71170222Sdougb<p><code class="filename">rndc.conf</code> is much simpler than
72170222Sdougb      <code class="filename">named.conf</code>.  The file uses three
73170222Sdougb      statements: an options statement, a server statement
74170222Sdougb      and a key statement.
75170222Sdougb    </p>
76170222Sdougb<p>
77170222Sdougb      The <code class="option">options</code> statement contains five clauses.
78170222Sdougb      The <code class="option">default-server</code> clause is followed by the
79170222Sdougb      name or address of a name server.  This host will be used when
80170222Sdougb      no name server is given as an argument to
81170222Sdougb      <span><strong class="command">rndc</strong></span>.  The <code class="option">default-key</code>
82170222Sdougb      clause is followed by the name of a key which is identified by
83170222Sdougb      a <code class="option">key</code> statement.  If no
84170222Sdougb      <code class="option">keyid</code> is provided on the rndc command line,
85170222Sdougb      and no <code class="option">key</code> clause is found in a matching
86170222Sdougb      <code class="option">server</code> statement, this default key will be
87170222Sdougb      used to authenticate the server's commands and responses.  The
88170222Sdougb      <code class="option">default-port</code> clause is followed by the port
89170222Sdougb      to connect to on the remote name server.  If no
90170222Sdougb      <code class="option">port</code> option is provided on the rndc command
91170222Sdougb      line, and no <code class="option">port</code> clause is found in a
92170222Sdougb      matching <code class="option">server</code> statement, this default port
93170222Sdougb      will be used to connect.
94170222Sdougb      The <code class="option">default-source-address</code> and
95170222Sdougb      <code class="option">default-source-address-v6</code> clauses which
96170222Sdougb      can be used to set the IPv4 and IPv6 source addresses
97170222Sdougb      respectively.
98170222Sdougb    </p>
99170222Sdougb<p>
100170222Sdougb      After the <code class="option">server</code> keyword, the server
101170222Sdougb      statement includes a string which is the hostname or address
102170222Sdougb      for a name server.  The statement has three possible clauses:
103170222Sdougb      <code class="option">key</code>, <code class="option">port</code> and
104170222Sdougb      <code class="option">addresses</code>. The key name must match the
105170222Sdougb      name of a key statement in the file.  The port number
106170222Sdougb      specifies the port to connect to.  If an <code class="option">addresses</code>
107170222Sdougb      clause is supplied these addresses will be used instead of
108174187Sdougb      the server name.  Each address can take an optional port.
109170222Sdougb      If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
110170222Sdougb      of supplied then these will be used to specify the IPv4 and IPv6
111170222Sdougb      source addresses respectively.
112170222Sdougb    </p>
113170222Sdougb<p>
114170222Sdougb      The <code class="option">key</code> statement begins with an identifying
115170222Sdougb      string, the name of the key.  The statement has two clauses.
116170222Sdougb      <code class="option">algorithm</code> identifies the encryption algorithm
117170222Sdougb      for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5
118170222Sdougb      is
119170222Sdougb      supported.  This is followed by a secret clause which contains
120170222Sdougb      the base-64 encoding of the algorithm's encryption key.  The
121170222Sdougb      base-64 string is enclosed in double quotes.
122170222Sdougb    </p>
123170222Sdougb<p>
124170222Sdougb      There are two common ways to generate the base-64 string for the
125170222Sdougb      secret.  The BIND 9 program <span><strong class="command">rndc-confgen</strong></span>
126170222Sdougb      can
127170222Sdougb      be used to generate a random key, or the
128170222Sdougb      <span><strong class="command">mmencode</strong></span> program, also known as
129170222Sdougb      <span><strong class="command">mimencode</strong></span>, can be used to generate a
130170222Sdougb      base-64
131170222Sdougb      string from known input.  <span><strong class="command">mmencode</strong></span> does
132170222Sdougb      not
133170222Sdougb      ship with BIND 9 but is available on many systems.  See the
134170222Sdougb      EXAMPLE section for sample command lines for each.
135170222Sdougb    </p>
136170222Sdougb</div>
137170222Sdougb<div class="refsect1" lang="en">
138262706Serwin<a name="id2644551"></a><h2>EXAMPLE</h2>
139170222Sdougb<pre class="programlisting">
140170222Sdougb      options {
141170222Sdougb        default-server  localhost;
142170222Sdougb        default-key     samplekey;
143170222Sdougb      };
144170222Sdougb</pre>
145170222Sdougb<p>
146170222Sdougb    </p>
147170222Sdougb<pre class="programlisting">
148170222Sdougb      server localhost {
149170222Sdougb        key             samplekey;
150170222Sdougb      };
151170222Sdougb</pre>
152170222Sdougb<p>
153170222Sdougb    </p>
154170222Sdougb<pre class="programlisting">
155170222Sdougb      server testserver {
156170222Sdougb        key		testkey;
157170222Sdougb        addresses	{ localhost port 5353; };
158170222Sdougb      };
159170222Sdougb</pre>
160170222Sdougb<p>
161170222Sdougb    </p>
162170222Sdougb<pre class="programlisting">
163170222Sdougb      key samplekey {
164170222Sdougb        algorithm       hmac-md5;
165170222Sdougb        secret          "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
166170222Sdougb      };
167170222Sdougb</pre>
168170222Sdougb<p>
169170222Sdougb    </p>
170170222Sdougb<pre class="programlisting">
171170222Sdougb      key testkey {
172170222Sdougb        algorithm	hmac-md5;
173170222Sdougb        secret		"R3HI8P6BKw9ZwXwN3VZKuQ==";
174174187Sdougb      };
175170222Sdougb    </pre>
176170222Sdougb<p>
177170222Sdougb    </p>
178170222Sdougb<p>
179170222Sdougb      In the above example, <span><strong class="command">rndc</strong></span> will by
180170222Sdougb      default use
181170222Sdougb      the server at localhost (127.0.0.1) and the key called samplekey.
182170222Sdougb      Commands to the localhost server will use the samplekey key, which
183170222Sdougb      must also be defined in the server's configuration file with the
184170222Sdougb      same name and secret.  The key statement indicates that samplekey
185170222Sdougb      uses the HMAC-MD5 algorithm and its secret clause contains the
186170222Sdougb      base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
187170222Sdougb    </p>
188170222Sdougb<p>
189170222Sdougb      If <span><strong class="command">rndc -s testserver</strong></span> is used then <span><strong class="command">rndc</strong></span> will
190170222Sdougb      connect to server on localhost port 5353 using the key testkey.
191170222Sdougb    </p>
192170222Sdougb<p>
193170222Sdougb      To generate a random secret with <span><strong class="command">rndc-confgen</strong></span>:
194170222Sdougb    </p>
195170222Sdougb<p><strong class="userinput"><code>rndc-confgen</code></strong>
196170222Sdougb    </p>
197170222Sdougb<p>
198170222Sdougb      A complete <code class="filename">rndc.conf</code> file, including
199170222Sdougb      the
200170222Sdougb      randomly generated key, will be written to the standard
201174187Sdougb      output.  Commented-out <code class="option">key</code> and
202170222Sdougb      <code class="option">controls</code> statements for
203170222Sdougb      <code class="filename">named.conf</code> are also printed.
204170222Sdougb    </p>
205170222Sdougb<p>
206170222Sdougb      To generate a base-64 secret with <span><strong class="command">mmencode</strong></span>:
207170222Sdougb    </p>
208170222Sdougb<p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
209170222Sdougb    </p>
210170222Sdougb</div>
211170222Sdougb<div class="refsect1" lang="en">
212262706Serwin<a name="id2645014"></a><h2>NAME SERVER CONFIGURATION</h2>
213170222Sdougb<p>
214170222Sdougb      The name server must be configured to accept rndc connections and
215170222Sdougb      to recognize the key specified in the <code class="filename">rndc.conf</code>
216170222Sdougb      file, using the controls statement in <code class="filename">named.conf</code>.
217170222Sdougb      See the sections on the <code class="option">controls</code> statement in the
218170222Sdougb      BIND 9 Administrator Reference Manual for details.
219170222Sdougb    </p>
220170222Sdougb</div>
221170222Sdougb<div class="refsect1" lang="en">
222262706Serwin<a name="id2645040"></a><h2>SEE ALSO</h2>
223170222Sdougb<p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
224170222Sdougb      <span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
225170222Sdougb      <span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
226170222Sdougb      <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
227170222Sdougb    </p>
228170222Sdougb</div>
229170222Sdougb<div class="refsect1" lang="en">
230262706Serwin<a name="id2645078"></a><h2>AUTHOR</h2>
231170222Sdougb<p><span class="corpauthor">Internet Systems Consortium</span>
232170222Sdougb    </p>
233170222Sdougb</div>
234170222Sdougb</div>
235170222Sdougb<div class="navfooter">
236170222Sdougb<hr>
237170222Sdougb<table width="100%" summary="Navigation footer">
238170222Sdougb<tr>
239170222Sdougb<td width="40%" align="left">
240170222Sdougb<a accesskey="p" href="man.rndc.html">Prev</a>�</td>
241170222Sdougb<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
242170222Sdougb<td width="40%" align="right">�<a accesskey="n" href="man.rndc-confgen.html">Next</a>
243170222Sdougb</td>
244170222Sdougb</tr>
245170222Sdougb<tr>
246170222Sdougb<td width="40%" align="left" valign="top">
247170222Sdougb<span class="application">rndc</span>�</td>
248170222Sdougb<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
249170222Sdougb<td width="40%" align="right" valign="top">�<span class="application">rndc-confgen</span>
250170222Sdougb</td>
251170222Sdougb</tr>
252170222Sdougb</table>
253170222Sdougb</div>
254170222Sdougb</body>
255170222Sdougb</html>
256