Add BIND 9.2.4rc7.
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / rndc / rndc.conf.5
1 .\" Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000, 2001  Internet Software Consortium.
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\" $Id: rndc.conf.5,v 1.21.2.2 2004/06/03 05:21:15 marka Exp $
17 .\"
18 .TH "RNDC.CONF" "5" "June 30, 2000" "BIND9" ""
19 .SH NAME
20 rndc.conf \- rndc configuration file
21 .SH SYNOPSIS
22 .sp
23 \fBrndc.conf\fR
24 .SH "DESCRIPTION"
25 .PP
26 \fIrndc.conf\fR is the configuration file
27 for \fBrndc\fR, the BIND 9 name server control
28 utility. This file has a similar structure and syntax to
29 \fInamed.conf\fR. Statements are enclosed
30 in braces and terminated with a semi-colon. Clauses in
31 the statements are also semi-colon terminated. The usual
32 comment styles are supported:
33 .PP
34 C style: /* */
35 .PP
36 C++ style: // to end of line
37 .PP
38 Unix style: # to end of line
39 .PP
40 \fIrndc.conf\fR is much simpler than
41 \fInamed.conf\fR. The file uses three
42 statements: an options statement, a server statement
43 and a key statement.
44 .PP
45 The \fBoptions\fR statement contains three clauses.
46 The \fBdefault-server\fR clause is followed by the
47 name or address of a name server. This host will be used when
48 no name server is given as an argument to
49 \fBrndc\fR. The \fBdefault-key\fR
50 clause is followed by the name of a key which is identified by
51 a \fBkey\fR statement. If no
52 \fBkeyid\fR is provided on the rndc command line,
53 and no \fBkey\fR clause is found in a matching
54 \fBserver\fR statement, this default key will be
55 used to authenticate the server's commands and responses. The
56 \fBdefault-port\fR clause is followed by the port
57 to connect to on the remote name server. If no
58 \fBport\fR option is provided on the rndc command
59 line, and no \fBport\fR clause is found in a
60 matching \fBserver\fR statement, this default port
61 will be used to connect.
62 .PP
63 After the \fBserver\fR keyword, the server statement
64 includes a string which is the hostname or address for a name
65 server. The statement has two possible clauses:
66 \fBkey\fR and \fBport\fR. The key name must
67 match the name of a key statement in the file. The port number
68 specifies the port to connect to.
69 .PP
70 The \fBkey\fR statement begins with an identifying
71 string, the name of the key. The statement has two clauses.
72 \fBalgorithm\fR identifies the encryption algorithm
73 for \fBrndc\fR to use; currently only HMAC-MD5 is
74 supported. This is followed by a secret clause which contains
75 the base-64 encoding of the algorithm's encryption key. The
76 base-64 string is enclosed in double quotes.
77 .PP
78 There are two common ways to generate the base-64 string for the
79 secret. The BIND 9 program \fBrndc-confgen\fR can
80 be used to generate a random key, or the
81 \fBmmencode\fR program, also known as
82 \fBmimencode\fR, can be used to generate a base-64
83 string from known input. \fBmmencode\fR does not
84 ship with BIND 9 but is available on many systems. See the
85 EXAMPLE section for sample command lines for each.
86 .SH "EXAMPLE"
87 .sp
88 .nf
89     options {
90         default-server  localhost;
91         default-key     samplekey;
92       };
93
94       server localhost {
95         key             samplekey;
96       };
97
98       key samplekey {
99         algorithm       hmac-md5;
100         secret          "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
101       };
102     
103 .sp
104 .fi
105 .PP
106 In the above example, \fBrndc\fR will by default use
107 the server at localhost (127.0.0.1) and the key called samplekey.
108 Commands to the localhost server will use the samplekey key, which
109 must also be defined in the server's configuration file with the
110 same name and secret. The key statement indicates that samplekey
111 uses the HMAC-MD5 algorithm and its secret clause contains the
112 base-64 encoding of the HMAC-MD5 secret enclosed in double quotes.
113 .PP
114 To generate a random secret with \fBrndc-confgen\fR:
115 .PP
116 \fBrndc-confgen\fR
117 .PP
118 A complete \fIrndc.conf\fR file, including the
119 randomly generated key, will be written to the standard
120 output. Commented out \fBkey\fR and
121 \fBcontrols\fR statements for
122 \fInamed.conf\fR are also printed.
123 .PP
124 To generate a base-64 secret with \fBmmencode\fR:
125 .PP
126 \fBecho "known plaintext for a secret" | mmencode\fR
127 .SH "NAME SERVER CONFIGURATION"
128 .PP
129 The name server must be configured to accept rndc connections and
130 to recognize the key specified in the \fIrndc.conf\fR
131 file, using the controls statement in \fInamed.conf\fR.
132 See the sections on the \fBcontrols\fR statement in the
133 BIND 9 Administrator Reference Manual for details.
134 .SH "SEE ALSO"
135 .PP
136 \fBrndc\fR(8),
137 \fBrndc-confgen\fR(8),
138 \fBmmencode\fR(1),
139 \fIBIND 9 Administrator Reference Manual\fR.
140 .SH "AUTHOR"
141 .PP
142 Internet Systems Consortium