PageRenderTime 39ms CodeModel.GetById 11ms app.highlight 19ms RepoModel.GetById 2ms app.codeStats 0ms

/contrib/bind9/doc/arm/man.rndc.conf.html

https://bitbucket.org/freebsd/freebsd-head/
HTML | 255 lines | 238 code | 0 blank | 17 comment | 0 complexity | 6face3cd4bd78f3ee73aab24ef285c3a MD5 | raw file
  1<!--
  2 - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
  3 - Copyright (C) 2000-2003 Internet Software Consortium.
  4 - 
  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.
  8 - 
  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.
 16-->
 17<!-- $Id$ -->
 18<html>
 19<head>
 20<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 21<title>rndc.conf</title>
 22<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
 23<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
 24<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
 25<link rel="prev" href="man.rndc.html" title="rndc">
 26<link rel="next" href="man.rndc-confgen.html" title="rndc-confgen">
 27</head>
 28<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 29<div class="navheader">
 30<table width="100%" summary="Navigation header">
 31<tr><th colspan="3" align="center"><code class="filename">rndc.conf</code></th></tr>
 32<tr>
 33<td width="20%" align="left">
 34<a accesskey="p" href="man.rndc.html">Prev</a> </td>
 35<th width="60%" align="center">Manual pages</th>
 36<td width="20%" align="right"> <a accesskey="n" href="man.rndc-confgen.html">Next</a>
 37</td>
 38</tr>
 39</table>
 40<hr>
 41</div>
 42<div class="refentry" lang="en">
 43<a name="man.rndc.conf"></a><div class="titlepage"></div>
 44<div class="refnamediv">
 45<h2>Name</h2>
 46<p><code class="filename">rndc.conf</code> &#8212; rndc configuration file</p>
 47</div>
 48<div class="refsynopsisdiv">
 49<h2>Synopsis</h2>
 50<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
 51</div>
 52<div class="refsect1" lang="en">
 53<a name="id2641106"></a><h2>DESCRIPTION</h2>
 54<p><code class="filename">rndc.conf</code> is the configuration file
 55      for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
 56      utility.  This file has a similar structure and syntax to
 57      <code class="filename">named.conf</code>.  Statements are enclosed
 58      in braces and terminated with a semi-colon.  Clauses in
 59      the statements are also semi-colon terminated.  The usual
 60      comment styles are supported:
 61    </p>
 62<p>
 63      C style: /* */
 64    </p>
 65<p>
 66      C++ style: // to end of line
 67    </p>
 68<p>
 69      Unix style: # to end of line
 70    </p>
 71<p><code class="filename">rndc.conf</code> is much simpler than
 72      <code class="filename">named.conf</code>.  The file uses three
 73      statements: an options statement, a server statement
 74      and a key statement.
 75    </p>
 76<p>
 77      The <code class="option">options</code> statement contains five clauses.
 78      The <code class="option">default-server</code> clause is followed by the
 79      name or address of a name server.  This host will be used when
 80      no name server is given as an argument to
 81      <span><strong class="command">rndc</strong></span>.  The <code class="option">default-key</code>
 82      clause is followed by the name of a key which is identified by
 83      a <code class="option">key</code> statement.  If no
 84      <code class="option">keyid</code> is provided on the rndc command line,
 85      and no <code class="option">key</code> clause is found in a matching
 86      <code class="option">server</code> statement, this default key will be
 87      used to authenticate the server's commands and responses.  The
 88      <code class="option">default-port</code> clause is followed by the port
 89      to connect to on the remote name server.  If no
 90      <code class="option">port</code> option is provided on the rndc command
 91      line, and no <code class="option">port</code> clause is found in a
 92      matching <code class="option">server</code> statement, this default port
 93      will be used to connect.
 94      The <code class="option">default-source-address</code> and
 95      <code class="option">default-source-address-v6</code> clauses which
 96      can be used to set the IPv4 and IPv6 source addresses
 97      respectively.
 98    </p>
 99<p>
100      After the <code class="option">server</code> keyword, the server
101      statement includes a string which is the hostname or address
102      for a name server.  The statement has three possible clauses:
103      <code class="option">key</code>, <code class="option">port</code> and
104      <code class="option">addresses</code>. The key name must match the
105      name of a key statement in the file.  The port number
106      specifies the port to connect to.  If an <code class="option">addresses</code>
107      clause is supplied these addresses will be used instead of
108      the server name.  Each address can take an optional port.
109      If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
110      of supplied then these will be used to specify the IPv4 and IPv6
111      source addresses respectively.
112    </p>
113<p>
114      The <code class="option">key</code> statement begins with an identifying
115      string, the name of the key.  The statement has two clauses.
116      <code class="option">algorithm</code> identifies the encryption algorithm
117      for <span><strong class="command">rndc</strong></span> to use; currently only HMAC-MD5
118      is
119      supported.  This is followed by a secret clause which contains
120      the base-64 encoding of the algorithm's encryption key.  The
121      base-64 string is enclosed in double quotes.
122    </p>
123<p>
124      There are two common ways to generate the base-64 string for the
125      secret.  The BIND 9 program <span><strong class="command">rndc-confgen</strong></span>
126      can
127      be used to generate a random key, or the
128      <span><strong class="command">mmencode</strong></span> program, also known as
129      <span><strong class="command">mimencode</strong></span>, can be used to generate a
130      base-64
131      string from known input.  <span><strong class="command">mmencode</strong></span> does
132      not
133      ship with BIND 9 but is available on many systems.  See the
134      EXAMPLE section for sample command lines for each.
135    </p>
136</div>
137<div class="refsect1" lang="en">
138<a name="id2641346"></a><h2>EXAMPLE</h2>
139<pre class="programlisting">
140      options {
141        default-server  localhost;
142        default-key     samplekey;
143      };
144</pre>
145<p>
146    </p>
147<pre class="programlisting">
148      server localhost {
149        key             samplekey;
150      };
151</pre>
152<p>
153    </p>
154<pre class="programlisting">
155      server testserver {
156        key		testkey;
157        addresses	{ localhost port 5353; };
158      };
159</pre>
160<p>
161    </p>
162<pre class="programlisting">
163      key samplekey {
164        algorithm       hmac-md5;
165        secret          "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
166      };
167</pre>
168<p>
169    </p>
170<pre class="programlisting">
171      key testkey {
172        algorithm	hmac-md5;
173        secret		"R3HI8P6BKw9ZwXwN3VZKuQ==";
174      };
175    </pre>
176<p>
177    </p>
178<p>
179      In the above example, <span><strong class="command">rndc</strong></span> will by
180      default use
181      the server at localhost (127.0.0.1) and the key called samplekey.
182      Commands to the localhost server will use the samplekey key, which
183      must also be defined in the server's configuration file with the
184      same name and secret.  The key statement indicates that samplekey
185      uses the HMAC-MD5 algorithm and its secret clause contains the
186      base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
187    </p>
188<p>
189      If <span><strong class="command">rndc -s testserver</strong></span> is used then <span><strong class="command">rndc</strong></span> will
190      connect to server on localhost port 5353 using the key testkey.
191    </p>
192<p>
193      To generate a random secret with <span><strong class="command">rndc-confgen</strong></span>:
194    </p>
195<p><strong class="userinput"><code>rndc-confgen</code></strong>
196    </p>
197<p>
198      A complete <code class="filename">rndc.conf</code> file, including
199      the
200      randomly generated key, will be written to the standard
201      output.  Commented-out <code class="option">key</code> and
202      <code class="option">controls</code> statements for
203      <code class="filename">named.conf</code> are also printed.
204    </p>
205<p>
206      To generate a base-64 secret with <span><strong class="command">mmencode</strong></span>:
207    </p>
208<p><strong class="userinput"><code>echo "known plaintext for a secret" | mmencode</code></strong>
209    </p>
210</div>
211<div class="refsect1" lang="en">
212<a name="id2641672"></a><h2>NAME SERVER CONFIGURATION</h2>
213<p>
214      The name server must be configured to accept rndc connections and
215      to recognize the key specified in the <code class="filename">rndc.conf</code>
216      file, using the controls statement in <code class="filename">named.conf</code>.
217      See the sections on the <code class="option">controls</code> statement in the
218      BIND 9 Administrator Reference Manual for details.
219    </p>
220</div>
221<div class="refsect1" lang="en">
222<a name="id2641698"></a><h2>SEE ALSO</h2>
223<p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
224      <span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
225      <span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
226      <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
227    </p>
228</div>
229<div class="refsect1" lang="en">
230<a name="id2642419"></a><h2>AUTHOR</h2>
231<p><span class="corpauthor">Internet Systems Consortium</span>
232    </p>
233</div>
234</div>
235<div class="navfooter">
236<hr>
237<table width="100%" summary="Navigation footer">
238<tr>
239<td width="40%" align="left">
240<a accesskey="p" href="man.rndc.html">Prev</a> </td>
241<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
242<td width="40%" align="right"> <a accesskey="n" href="man.rndc-confgen.html">Next</a>
243</td>
244</tr>
245<tr>
246<td width="40%" align="left" valign="top">
247<span class="application">rndc</span> </td>
248<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
249<td width="40%" align="right" valign="top"> <span class="application">rndc-confgen</span>
250</td>
251</tr>
252</table>
253</div>
254</body>
255</html>