/contrib/bind9/bin/rndc/rndc.conf.5
Unknown | 214 lines | 214 code | 0 blank | 0 comment | 0 complexity | dc0bb0bb23530b02210e5a13ae522a77 MD5 | raw file
1.\" Copyright (C) 2004, 2005, 2007 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.\" $Id$ 17.\" 18.hy 0 19.ad l 20.\" Title: \fIrndc.conf\fR 21.\" Author: 22.\" Generator: DocBook XSL Stylesheets v1.71.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" 33rndc.conf \- rndc configuration file 34.SH "SYNOPSIS" 35.HP 10 36\fBrndc.conf\fR 37.SH "DESCRIPTION" 38.PP 39\fIrndc.conf\fR 40is 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 44C style: /* */ 45.PP 46C++ style: // to end of line 47.PP 48Unix style: # to end of line 49.PP 50\fIrndc.conf\fR 51is much simpler than 52\fInamed.conf\fR. The file uses three statements: an options statement, a server statement and a key statement. 53.PP 54The 55\fBoptions\fR 56statement contains five clauses. The 57\fBdefault\-server\fR 58clause 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 61clause is followed by the name of a key which is identified by a 62\fBkey\fR 63statement. If no 64\fBkeyid\fR 65is provided on the rndc command line, and no 66\fBkey\fR 67clause is found in a matching 68\fBserver\fR 69statement, this default key will be used to authenticate the server's commands and responses. The 70\fBdefault\-port\fR 71clause is followed by the port to connect to on the remote name server. If no 72\fBport\fR 73option is provided on the rndc command line, and no 74\fBport\fR 75clause is found in a matching 76\fBserver\fR 77statement, this default port will be used to connect. The 78\fBdefault\-source\-address\fR 79and 80\fBdefault\-source\-address\-v6\fR 81clauses which can be used to set the IPv4 and IPv6 source addresses respectively. 82.PP 83After the 84\fBserver\fR 85keyword, the server statement includes a string which is the hostname or address for a name server. The statement has three possible clauses: 86\fBkey\fR, 87\fBport\fR 88and 89\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 90\fBaddresses\fR 91clause is supplied these addresses will be used instead of the server name. Each address can take an optional port. If an 92\fBsource\-address\fR 93or 94\fBsource\-address\-v6\fR 95of supplied then these will be used to specify the IPv4 and IPv6 source addresses respectively. 96.PP 97The 98\fBkey\fR 99statement begins with an identifying string, the name of the key. The statement has two clauses. 100\fBalgorithm\fR 101identifies the encryption algorithm for 102\fBrndc\fR 103to 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. 104.PP 105There are two common ways to generate the base\-64 string for the secret. The BIND 9 program 106\fBrndc\-confgen\fR 107can be used to generate a random key, or the 108\fBmmencode\fR 109program, also known as 110\fBmimencode\fR, can be used to generate a base\-64 string from known input. 111\fBmmencode\fR 112does not ship with BIND 9 but is available on many systems. See the EXAMPLE section for sample command lines for each. 113.SH "EXAMPLE" 114.PP 115.RS 4 116.nf 117 options { 118 default\-server localhost; 119 default\-key samplekey; 120 }; 121.fi 122.RE 123.sp 124.PP 125.RS 4 126.nf 127 server localhost { 128 key samplekey; 129 }; 130.fi 131.RE 132.sp 133.PP 134.RS 4 135.nf 136 server testserver { 137 key testkey; 138 addresses { localhost port 5353; }; 139 }; 140.fi 141.RE 142.sp 143.PP 144.RS 4 145.nf 146 key samplekey { 147 algorithm hmac\-md5; 148 secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz"; 149 }; 150.fi 151.RE 152.sp 153.PP 154.RS 4 155.nf 156 key testkey { 157 algorithm hmac\-md5; 158 secret "R3HI8P6BKw9ZwXwN3VZKuQ=="; 159 }; 160.fi 161.RE 162.sp 163.PP 164In the above example, 165\fBrndc\fR 166will 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. 167.PP 168If 169\fBrndc \-s testserver\fR 170is used then 171\fBrndc\fR 172will connect to server on localhost port 5353 using the key testkey. 173.PP 174To generate a random secret with 175\fBrndc\-confgen\fR: 176.PP 177\fBrndc\-confgen\fR 178.PP 179A complete 180\fIrndc.conf\fR 181file, including the randomly generated key, will be written to the standard output. Commented\-out 182\fBkey\fR 183and 184\fBcontrols\fR 185statements for 186\fInamed.conf\fR 187are also printed. 188.PP 189To generate a base\-64 secret with 190\fBmmencode\fR: 191.PP 192\fBecho "known plaintext for a secret" | mmencode\fR 193.SH "NAME SERVER CONFIGURATION" 194.PP 195The name server must be configured to accept rndc connections and to recognize the key specified in the 196\fIrndc.conf\fR 197file, using the controls statement in 198\fInamed.conf\fR. See the sections on the 199\fBcontrols\fR 200statement in the BIND 9 Administrator Reference Manual for details. 201.SH "SEE ALSO" 202.PP 203\fBrndc\fR(8), 204\fBrndc\-confgen\fR(8), 205\fBmmencode\fR(1), 206BIND 9 Administrator Reference Manual. 207.SH "AUTHOR" 208.PP 209Internet Systems Consortium 210.SH "COPYRIGHT" 211Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") 212.br 213Copyright \(co 2000, 2001 Internet Software Consortium. 214.br