Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / bind-9.3 / bin / rndc / rndc.conf.5
1 .\" Copyright (C) 2004, 2005 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.206.6 2006/06/29 13:02:31 marka Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: \fIrndc.conf\fR
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
23 .\"      Date: June 30, 2000
24 .\"    Manual: BIND9
25 .\"    Source: BIND9
26 .\"
27 .TH "\fIRNDC.CONF\fR" "5" "June 30, 2000" "BIND9" "BIND9"
28 .\" disable hyphenation
29 .nh
30 .\" disable justification (adjust text to left margin only)
31 .ad l
32 .SH "NAME"
33 rndc.conf \- rndc configuration file
34 .SH "SYNOPSIS"
35 .HP 10
36 \fBrndc.conf\fR
37 .SH "DESCRIPTION"
38 .PP
39 \fIrndc.conf\fR
40 is the configuration file for
41 \fBrndc\fR, the BIND 9 name server control utility. This file has a similar structure and syntax to
42 \fInamed.conf\fR. Statements are enclosed in braces and terminated with a semi\-colon. Clauses in the statements are also semi\-colon terminated. The usual comment styles are supported:
43 .PP
44 C style: /* */
45 .PP
46 C++ style: // to end of line
47 .PP
48 Unix style: # to end of line
49 .PP
50 \fIrndc.conf\fR
51 is much simpler than
52 \fInamed.conf\fR. The file uses three statements: an options statement, a server statement and a key statement.
53 .PP
54 The
55 \fBoptions\fR
56 statement contains three clauses. The
57 \fBdefault\-server\fR
58 clause is followed by the name or address of a name server. This host will be used when no name server is given as an argument to
59 \fBrndc\fR. The
60 \fBdefault\-key\fR
61 clause is followed by the name of a key which is identified by a
62 \fBkey\fR
63 statement. If no
64 \fBkeyid\fR
65 is provided on the rndc command line, and no
66 \fBkey\fR
67 clause is found in a matching
68 \fBserver\fR
69 statement, this default key will be used to authenticate the server's commands and responses. The
70 \fBdefault\-port\fR
71 clause is followed by the port to connect to on the remote name server. If no
72 \fBport\fR
73 option is provided on the rndc command line, and no
74 \fBport\fR
75 clause is found in a matching
76 \fBserver\fR
77 statement, this default port will be used to connect.
78 .PP
79 After the
80 \fBserver\fR
81 keyword, the server statement includes a string which is the hostname or address for a name server. The statement has two possible clauses:
82 \fBkey\fR
83 and
84 \fBport\fR. The key name must match the name of a key statement in the file. The port number specifies the port to connect to.
85 .PP
86 The
87 \fBkey\fR
88 statement begins with an identifying string, the name of the key. The statement has two clauses.
89 \fBalgorithm\fR
90 identifies the encryption algorithm for
91 \fBrndc\fR
92 to use; currently only HMAC\-MD5 is supported. This is followed by a secret clause which contains the base\-64 encoding of the algorithm's encryption key. The base\-64 string is enclosed in double quotes.
93 .PP
94 There are two common ways to generate the base\-64 string for the secret. The BIND 9 program
95 \fBrndc\-confgen\fR
96 can be used to generate a random key, or the
97 \fBmmencode\fR
98 program, also known as
99 \fBmimencode\fR, can be used to generate a base\-64 string from known input.
100 \fBmmencode\fR
101 does not ship with BIND 9 but is available on many systems. See the EXAMPLE section for sample command lines for each.
102 .SH "EXAMPLE"
103 .sp
104 .RS 3n
105 .nf
106     options {
107         default\-server  localhost;
108         default\-key     samplekey;
109       };
110       server localhost {
111         key             samplekey;
112       };
113       key samplekey {
114         algorithm       hmac\-md5;
115         secret          "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
116       };
117 .fi
118 .RE
119 .PP
120 In the above example,
121 \fBrndc\fR
122 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.
123 .PP
124 To generate a random secret with
125 \fBrndc\-confgen\fR:
126 .PP
127 \fBrndc\-confgen\fR
128 .PP
129 A complete
130 \fIrndc.conf\fR
131 file, including the randomly generated key, will be written to the standard output. Commented out
132 \fBkey\fR
133 and
134 \fBcontrols\fR
135 statements for
136 \fInamed.conf\fR
137 are also printed.
138 .PP
139 To generate a base\-64 secret with
140 \fBmmencode\fR:
141 .PP
142 \fBecho "known plaintext for a secret" | mmencode\fR
143 .SH "NAME SERVER CONFIGURATION"
144 .PP
145 The name server must be configured to accept rndc connections and to recognize the key specified in the
146 \fIrndc.conf\fR
147 file, using the controls statement in
148 \fInamed.conf\fR. See the sections on the
149 \fBcontrols\fR
150 statement in the BIND 9 Administrator Reference Manual for details.
151 .SH "SEE ALSO"
152 .PP
153 \fBrndc\fR(8),
154 \fBrndc\-confgen\fR(8),
155 \fBmmencode\fR(1),
156 BIND 9 Administrator Reference Manual.
157 .SH "AUTHOR"
158 .PP
159 Internet Systems Consortium
160 .SH "COPYRIGHT"
161 Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")