rndc.conf.html revision d4ef65050feac78554addf6e16a06c6e2e0bd331
4400N/A<!--
4793N/A - Copyright (C) 2001 Internet Software Consortium.
4400N/A -
4400N/A - Permission to use, copy, modify, and distribute this software for any
4400N/A - purpose with or without fee is hereby granted, provided that the above
4400N/A - copyright notice and this permission notice appear in all copies.
4400N/A -
4400N/A - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
4400N/A - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
4400N/A - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
4400N/A - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
4400N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
4400N/A - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4400N/A - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4400N/A - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4400N/A-->
4400N/A
4400N/A<!-- $Id: rndc.conf.html,v 1.2 2001/04/10 21:50:54 bwelling Exp $ -->
4400N/A
4400N/A<HTML
4400N/A><HEAD
4400N/A><TITLE
4793N/A>rndc.conf</TITLE
4400N/A><META
4400N/ANAME="GENERATOR"
4400N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.63
4400N/A"></HEAD
4400N/A><BODY
4400N/ACLASS="REFENTRY"
4793N/ABGCOLOR="#FFFFFF"
4400N/ATEXT="#000000"
4400N/ALINK="#0000FF"
4400N/AVLINK="#840084"
4400N/AALINK="#0000FF"
4400N/A><H1
4400N/A><A
4793N/ANAME="AEN1"
4400N/A><TT
4400N/ACLASS="FILENAME"
4793N/A>rndc.conf</TT
4400N/A></A
4400N/A></H1
4793N/A><DIV
4400N/ACLASS="REFNAMEDIV"
4793N/A><A
4400N/ANAME="AEN9"
4400N/A></A
4400N/A><H2
4400N/A>Name</H2
4400N/A><TT
4400N/ACLASS="FILENAME"
4400N/A>rndc.conf</TT
4400N/A>&nbsp;--&nbsp;rndc configuration file</DIV
4400N/A><DIV
4400N/ACLASS="REFSYNOPSISDIV"
4793N/A><A
4400N/ANAME="AEN13"
4400N/A></A
4400N/A><H2
4400N/A>Synopsis</H2
4400N/A><P
4400N/A><B
4400N/ACLASS="COMMAND"
4400N/A>rndc.conf</B
4400N/A> </P
4400N/A></DIV
4400N/A><DIV
4400N/ACLASS="REFSECT1"
4400N/A><A
4400N/ANAME="AEN16"
4400N/A></A
4400N/A><H2
4400N/A>DESCRIPTION</H2
4400N/A><P
4400N/A> <TT
4400N/ACLASS="FILENAME"
4400N/A>rndc.conf</TT
4400N/A> is the configuration file
4400N/A for <B
4400N/ACLASS="COMMAND"
4400N/A>rndc</B
4793N/A>, the BIND 9 name server control
4793N/A utility. This file has a similar structure and syntax to
4400N/A <TT
4400N/ACLASS="FILENAME"
4400N/A>named.conf</TT
4400N/A>. Statements are enclosed
4400N/A in braces and terminated with a semi-colon. Clauses in
4400N/A the statements are also semi-colon terminated. The usual
4400N/A comment styles are supported:
4400N/A </P
4400N/A><P
4400N/A> C style: /* */
4400N/A </P
4400N/A><P
4400N/A> C++ style: // to end of line
4400N/A </P
4400N/A><P
4400N/A> Unix style: # to end of line
4400N/A </P
4400N/A><P
4400N/A> <TT
4400N/ACLASS="FILENAME"
4400N/A>rndc.conf</TT
4400N/A> is much simpler than
4400N/A <TT
4400N/ACLASS="FILENAME"
4400N/A>named.conf</TT
4400N/A>. The file uses three
4400N/A statements: an options statement, a server statement
4400N/A and a key statement.
4400N/A </P
4400N/A><P
4400N/A> The <TT
4400N/ACLASS="OPTION"
4400N/A>options</TT
4400N/A> statement contains three clauses.
4400N/A The <TT
4400N/ACLASS="OPTION"
4400N/A>default-server</TT
4400N/A> clause is followed by the
4400N/A name or address of a name server. This host will be used when
4400N/A no name server is given as an argument to
4400N/A <B
4400N/ACLASS="COMMAND"
4400N/A>rndc</B
4400N/A>. The <TT
4400N/ACLASS="OPTION"
4400N/A>default-key</TT
4400N/A>
4400N/A clause is followed by the name of a key which is identified by
4400N/A a <TT
4400N/ACLASS="OPTION"
4400N/A>key</TT
4400N/A> statement. If no
4400N/A <TT
4400N/ACLASS="OPTION"
4400N/A>keyid</TT
4400N/A> is provided on the rndc command line,
4400N/A and no <TT
4400N/ACLASS="OPTION"
4400N/A>key</TT
4400N/A> clause is found in a matching
4400N/A <TT
4400N/ACLASS="OPTION"
4400N/A>server</TT
4400N/A> statement, this default key will be
4400N/A used to authenticate the server's commands and responses. The
4400N/A <TT
4400N/ACLASS="OPTION"
4400N/A>default-port</TT
4400N/A> clause is followed by the port
4400N/A to connect to on the remote name server. If no
4400N/A <TT
4400N/ACLASS="OPTION"
4400N/A>port</TT
4400N/A> option is provided on the rndc command
4400N/A line, and no <TT
4400N/ACLASS="OPTION"
4400N/A>port</TT
4400N/A> clause is found in a
4400N/A matching <TT
4400N/ACLASS="OPTION"
4400N/A>server</TT
4400N/A> statement, this default port
4400N/A will be used to connect.
4400N/A </P
4400N/A><P
4400N/A> After the <TT
4400N/ACLASS="OPTION"
4400N/A>server</TT
4400N/A> keyword, the server statement
4400N/A includes a string which is the hostname or address for a name
4400N/A server. The statement has two possible clauses:
4400N/A <TT
4400N/ACLASS="OPTION"
4400N/A>key</TT
4400N/A> and <TT
4400N/ACLASS="OPTION"
4400N/A>port</TT
4400N/A>. The key name must
4400N/A match the name of a key statement in the file. The port number
4400N/A specifies the port to connect to.
4400N/A </P
4400N/A><P
4400N/A> The <TT
4400N/ACLASS="OPTION"
4400N/A>key</TT
4400N/A> statement begins with an identifying
4400N/A string, the name of the key. The statement has two clauses.
4400N/A <TT
4400N/ACLASS="OPTION"
4400N/A>algorithm</TT
4400N/A> identifies the encryption algorithm
4400N/A for <B
4400N/ACLASS="COMMAND"
4400N/A>rndc</B
4400N/A> to use; currently only HMAC-MD5 is
4400N/A supported. This is followed by a secret clause which contains
4400N/A the base-64 encoding of the algorithm's encryption key. The
4400N/A base-64 string is enclosed in double quotes.
4400N/A </P
4400N/A><P
4400N/A> There are two common ways to generate the base-64 string for the
4400N/A secret. The BIND 9 program <B
4400N/ACLASS="COMMAND"
4400N/A>dnssec-keygen</B
4400N/A> can
4400N/A be used to generate a random key, or the
4400N/A <B
4400N/ACLASS="COMMAND"
4400N/A>mmencode</B
4400N/A> program, also known as
4400N/A <B
4400N/ACLASS="COMMAND"
4400N/A>mimencode</B
4400N/A>, can be used to generate a base-64
4400N/A string from known input. <B
4400N/ACLASS="COMMAND"
4400N/A>mmencode</B
4400N/A> does not
4400N/A ship with BIND 9 but is available on many systems. See the
4400N/A EXAMPLE section for sample command lines for each.
4400N/A </P
4400N/A></DIV
4400N/A><DIV
4400N/ACLASS="REFSECT1"
4400N/A><A
4400N/ANAME="AEN54"
4400N/A></A
4400N/A><H2
4400N/A>EXAMPLE</H2
4400N/A><PRE
4400N/ACLASS="PROGRAMLISTING"
4400N/A> options {
4400N/A default-server localhost;
4400N/A default-key samplekey;
4400N/A };
4400N/A
server localhost {
key samplekey;
};
key samplekey {
algorithm hmac-md5;
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};
</PRE
><P
> In the above example, <B
CLASS="COMMAND"
>rndc</B
> will by default use
the server at localhost (127.0.0.1) and the key called samplekey.
Commands to the localhost server will use the samplekey key, which
must also be defined in the server's configuration file with the
same name and secret. The key statement indicates that samplekey
uses the HMAC-MD5 algorithm and its secret clause contains the
base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
</P
><P
> To generate a random secret with <B
CLASS="COMMAND"
>dnssec-keygen</B
>:
</P
><P
> <TT
CLASS="USERINPUT"
><B
>$ dnssec-keygen -a hmac-md5 -b 128 -n user rndc</B
></TT
>
</P
><P
> The base-64 string will appear in two files,
<TT
CLASS="FILENAME"
>Krndc.+157.+{random}.key</TT
> and
<TT
CLASS="FILENAME"
>Krndc.+157.+{random}.private</TT
>. After
extracting the key to be placed in the
<TT
CLASS="FILENAME"
>rndc.conf</TT
> and
<TT
CLASS="FILENAME"
>named.conf</TT
> key statements, the
.key and .private files can be removed.
</P
><P
> To generate a random secret with <B
CLASS="COMMAND"
>mmencode</B
>:
</P
><P
> <TT
CLASS="USERINPUT"
><B
>$ echo "known plaintext for a secret" | mmencode</B
></TT
>
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN72"
></A
><H2
>NAME SERVER CONFIGURATION</H2
><P
> The name server must be configured to accept rndc connections and
to recognize the key specified in the <TT
CLASS="FILENAME"
>rndc.conf</TT
>
file, using the controls statement in <TT
CLASS="FILENAME"
>named.conf</TT
>.
See the sections on the <TT
CLASS="OPTION"
>controls</TT
> statement in the
BIND 9 Administrator Reference Manual for details.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN78"
></A
><H2
>SEE ALSO</H2
><P
> <SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>rndc</SPAN
>(8)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>dnssec-keygen</SPAN
>(8)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>mmencode</SPAN
>(1)</SPAN
>,
<I
CLASS="CITETITLE"
>BIND 9 Administrator Reference Manual</I
>.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN91"
></A
><H2
>AUTHOR</H2
><P
> Internet Software Consortium
</P
></DIV
></BODY
></HTML
>