]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/bin/rndc/rndc.conf.5
MFC r363988:
[FreeBSD/stable/9.git] / contrib / bind9 / bin / rndc / rndc.conf.5
1 .\" Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000, 2001 Internet Software Consortium.
3 .\" 
4 .\" Permission to use, copy, modify, and/or 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 .hy 0
17 .ad l
18 '\" t
19 .\"     Title: rndc.conf
20 .\"    Author: 
21 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
22 .\"      Date: 2007-06-18
23 .\"    Manual: BIND9
24 .\"    Source: ISC
25 .\"  Language: English
26 .\"
27 .TH "RNDC\&.CONF" "5" "2007\-06\-18" "ISC" "BIND9"
28 .\" -----------------------------------------------------------------
29 .\" * Define some portability stuff
30 .\" -----------------------------------------------------------------
31 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 .\" http://bugs.debian.org/507673
33 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 .ie \n(.g .ds Aq \(aq
36 .el       .ds Aq '
37 .\" -----------------------------------------------------------------
38 .\" * set default formatting
39 .\" -----------------------------------------------------------------
40 .\" disable hyphenation
41 .nh
42 .\" disable justification (adjust text to left margin only)
43 .ad l
44 .\" -----------------------------------------------------------------
45 .\" * MAIN CONTENT STARTS HERE *
46 .\" -----------------------------------------------------------------
47 .SH "NAME"
48 rndc.conf \- rndc configuration file
49 .SH "SYNOPSIS"
50 .HP \w'\fBrndc\&.conf\fR\ 'u
51 \fBrndc\&.conf\fR
52 .SH "DESCRIPTION"
53 .PP
54 rndc\&.conf
55 is the configuration file for
56 \fBrndc\fR, the BIND 9 name server control utility\&. This file has a similar structure and syntax to
57 named\&.conf\&. 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:
58 .PP
59 C style: /* */
60 .PP
61 C++ style: // to end of line
62 .PP
63 Unix style: # to end of line
64 .PP
65 rndc\&.conf
66 is much simpler than
67 named\&.conf\&. The file uses three statements: an options statement, a server statement and a key statement\&.
68 .PP
69 The
70 \fBoptions\fR
71 statement contains five clauses\&. The
72 \fBdefault\-server\fR
73 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
74 \fBrndc\fR\&. The
75 \fBdefault\-key\fR
76 clause is followed by the name of a key which is identified by a
77 \fBkey\fR
78 statement\&. If no
79 \fBkeyid\fR
80 is provided on the rndc command line, and no
81 \fBkey\fR
82 clause is found in a matching
83 \fBserver\fR
84 statement, this default key will be used to authenticate the server\*(Aqs commands and responses\&. The
85 \fBdefault\-port\fR
86 clause is followed by the port to connect to on the remote name server\&. If no
87 \fBport\fR
88 option is provided on the rndc command line, and no
89 \fBport\fR
90 clause is found in a matching
91 \fBserver\fR
92 statement, this default port will be used to connect\&. The
93 \fBdefault\-source\-address\fR
94 and
95 \fBdefault\-source\-address\-v6\fR
96 clauses which can be used to set the IPv4 and IPv6 source addresses respectively\&.
97 .PP
98 After the
99 \fBserver\fR
100 keyword, the server statement includes a string which is the hostname or address for a name server\&. The statement has three possible clauses:
101 \fBkey\fR,
102 \fBport\fR
103 and
104 \fBaddresses\fR\&. The key name must match the name of a key statement in the file\&. The port number specifies the port to connect to\&. If an
105 \fBaddresses\fR
106 clause is supplied these addresses will be used instead of the server name\&. Each address can take an optional port\&. If an
107 \fBsource\-address\fR
108 or
109 \fBsource\-address\-v6\fR
110 of supplied then these will be used to specify the IPv4 and IPv6 source addresses respectively\&.
111 .PP
112 The
113 \fBkey\fR
114 statement begins with an identifying string, the name of the key\&. The statement has two clauses\&.
115 \fBalgorithm\fR
116 identifies the encryption algorithm for
117 \fBrndc\fR
118 to use; currently only HMAC\-MD5 is supported\&. This is followed by a secret clause which contains the base\-64 encoding of the algorithm\*(Aqs encryption key\&. The base\-64 string is enclosed in double quotes\&.
119 .PP
120 There are two common ways to generate the base\-64 string for the secret\&. The BIND 9 program
121 \fBrndc\-confgen\fR
122 can be used to generate a random key, or the
123 \fBmmencode\fR
124 program, also known as
125 \fBmimencode\fR, can be used to generate a base\-64 string from known input\&.
126 \fBmmencode\fR
127 does not ship with BIND 9 but is available on many systems\&. See the EXAMPLE section for sample command lines for each\&.
128 .SH "EXAMPLE"
129 .PP
130 .if n \{\
131 .RS 4
132 .\}
133 .nf
134       options {
135         default\-server  localhost;
136         default\-key     samplekey;
137       };
138 .fi
139 .if n \{\
140 .RE
141 .\}
142 .PP
143 .if n \{\
144 .RS 4
145 .\}
146 .nf
147       server localhost {
148         key             samplekey;
149       };
150 .fi
151 .if n \{\
152 .RE
153 .\}
154 .PP
155 .if n \{\
156 .RS 4
157 .\}
158 .nf
159       server testserver {
160         key             testkey;
161         addresses       { localhost port 5353; };
162       };
163 .fi
164 .if n \{\
165 .RE
166 .\}
167 .PP
168 .if n \{\
169 .RS 4
170 .\}
171 .nf
172       key samplekey {
173         algorithm       hmac\-md5;
174         secret          "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
175       };
176 .fi
177 .if n \{\
178 .RE
179 .\}
180 .PP
181 .if n \{\
182 .RS 4
183 .\}
184 .nf
185       key testkey {
186         algorithm       hmac\-md5;
187         secret          "R3HI8P6BKw9ZwXwN3VZKuQ==";
188       };
189 .fi
190 .if n \{\
191 .RE
192 .\}
193 .PP
194 In the above example,
195 \fBrndc\fR
196 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\*(Aqs 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\&.
197 .PP
198 If
199 \fBrndc \-s testserver\fR
200 is used then
201 \fBrndc\fR
202 will connect to server on localhost port 5353 using the key testkey\&.
203 .PP
204 To generate a random secret with
205 \fBrndc\-confgen\fR:
206 .PP
207 \fBrndc\-confgen\fR
208 .PP
209 A complete
210 rndc\&.conf
211 file, including the randomly generated key, will be written to the standard output\&. Commented\-out
212 \fBkey\fR
213 and
214 \fBcontrols\fR
215 statements for
216 named\&.conf
217 are also printed\&.
218 .PP
219 To generate a base\-64 secret with
220 \fBmmencode\fR:
221 .PP
222 \fBecho "known plaintext for a secret" | mmencode\fR
223 .SH "NAME SERVER CONFIGURATION"
224 .PP
225 The name server must be configured to accept rndc connections and to recognize the key specified in the
226 rndc\&.conf
227 file, using the controls statement in
228 named\&.conf\&. See the sections on the
229 \fBcontrols\fR
230 statement in the BIND 9 Administrator Reference Manual for details\&.
231 .SH "SEE ALSO"
232 .PP
233 \fBrndc\fR(8),
234 \fBrndc-confgen\fR(8),
235 \fBmmencode\fR(1),
236 BIND 9 Administrator Reference Manual\&.
237 .SH "AUTHOR"
238 .PP
239 \fBInternet Systems Consortium, Inc\&.\fR
240 .SH "COPYRIGHT"
241 .br
242 Copyright \(co 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
243 .br
244 Copyright \(co 2000, 2001 Internet Software Consortium.
245 .br