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