| 1 |
.\" Man page generated from reStructuredText |
| 2 |
.\" by the Docutils 0.22.4 manpage writer. |
| 3 |
. |
| 4 |
. |
| 5 |
.nr rst2man-indent-level 0 |
| 6 |
. |
| 7 |
.de1 rstReportMargin |
| 8 |
\\$1 \\n[an-margin] |
| 9 |
level \\n[rst2man-indent-level] |
| 10 |
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 11 |
- |
| 12 |
\\n[rst2man-indent0] |
| 13 |
\\n[rst2man-indent1] |
| 14 |
\\n[rst2man-indent2] |
| 15 |
.. |
| 16 |
.de1 INDENT |
| 17 |
.\" .rstReportMargin pre: |
| 18 |
. RS \\$1 |
| 19 |
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 20 |
. nr rst2man-indent-level +1 |
| 21 |
.\" .rstReportMargin post: |
| 22 |
.. |
| 23 |
.de UNINDENT |
| 24 |
. RE |
| 25 |
.\" indent \\n[an-margin] |
| 26 |
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 27 |
.nr rst2man-indent-level -1 |
| 28 |
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 29 |
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 30 |
.. |
| 31 |
.TH "RNDC.CONF" "5" "@RELEASE_DATE@" "@PACKAGE_VERSION@" "BIND 9" |
| 32 |
.SH NAME |
| 33 |
rndc.conf \- rndc configuration file |
| 34 |
.SH SYNOPSIS |
| 35 |
.sp |
| 36 |
\fBrndc.conf\fP |
| 37 |
.SH DESCRIPTION |
| 38 |
.sp |
| 39 |
\fBrndc.conf\fP is the configuration file for \fBrndc\fP \%<#\:std-iscman-rndc>, the BIND 9 name |
| 40 |
server control utility. This file has a similar structure and syntax to |
| 41 |
\fBnamed.conf\fP \%<#\:std-iscman-named\:.conf>\&. Statements are enclosed in braces and terminated with a |
| 42 |
semi\-colon. Clauses in the statements are also semi\-colon terminated. |
| 43 |
The usual comment styles are supported: |
| 44 |
.sp |
| 45 |
C style: /* */ |
| 46 |
.sp |
| 47 |
C++ style: // to end of line |
| 48 |
.sp |
| 49 |
Unix style: # to end of line |
| 50 |
.sp |
| 51 |
\fBrndc.conf\fP is much simpler than \fBnamed.conf\fP \%<#\:std-iscman-named\:.conf>\&. The file uses three |
| 52 |
statements: an options statement, a server statement, and a key |
| 53 |
statement. |
| 54 |
.sp |
| 55 |
The \fBoptions\fP statement contains five clauses. The \fBdefault\-server\fP |
| 56 |
clause is followed by the name or address of a name server. This host |
| 57 |
is used when no name server is given as an argument to \fBrndc\fP \%<#\:std-iscman-rndc>\&. |
| 58 |
The \fBdefault\-key\fP clause is followed by the name of a key, which is |
| 59 |
identified by a \fBkey\fP statement. If no \fBkeyid\fP is provided on the |
| 60 |
rndc command line, and no \fBkey\fP clause is found in a matching |
| 61 |
\fBserver\fP statement, this default key is used to authenticate the |
| 62 |
server\(aqs commands and responses. The \fBdefault\-port\fP clause is followed |
| 63 |
by the port to connect to on the remote name server. If no \fBport\fP |
| 64 |
option is provided on the rndc command line, and no \fBport\fP clause is |
| 65 |
found in a matching \fBserver\fP statement, this default port is used |
| 66 |
to connect. The \fBdefault\-source\-address\fP and |
| 67 |
\fBdefault\-source\-address\-v6\fP clauses can be used to set the IPv4 |
| 68 |
and IPv6 source addresses respectively. |
| 69 |
.sp |
| 70 |
After the \fBserver\fP keyword, the server statement includes a string |
| 71 |
which is the hostname or address for a name server. The statement has |
| 72 |
three possible clauses: \fBkey\fP, \fBport\fP, and \fBaddresses\fP\&. The key |
| 73 |
name must match the name of a key statement in the file. The port number |
| 74 |
specifies the port to connect to. If an \fBaddresses\fP clause is supplied, |
| 75 |
these addresses are used instead of the server name. Each address |
| 76 |
can take an optional port. If an \fBsource\-address\fP or |
| 77 |
\fBsource\-address\-v6\fP is supplied, it is used to specify the |
| 78 |
IPv4 and IPv6 source address, respectively. |
| 79 |
.sp |
| 80 |
The \fBkey\fP statement begins with an identifying string, the name of the |
| 81 |
key. The statement has two clauses. \fBalgorithm\fP identifies the |
| 82 |
authentication algorithm for \fBrndc\fP \%<#\:std-iscman-rndc> to use; currently only HMAC\-MD5 |
| 83 |
(for compatibility), HMAC\-SHA1, HMAC\-SHA224, HMAC\-SHA256 (default), |
| 84 |
HMAC\-SHA384, and HMAC\-SHA512 are supported. This is followed by a secret |
| 85 |
clause which contains the base\-64 encoding of the algorithm\(aqs |
| 86 |
authentication key. The base\-64 string is enclosed in double quotes. |
| 87 |
.sp |
| 88 |
There are two common ways to generate the base\-64 string for the secret. |
| 89 |
The BIND 9 program \fBrndc\-confgen\fP \%<#\:std-iscman-rndc-confgen> can be used to generate a random |
| 90 |
key, or the \fBmmencode\fP program, also known as \fBmimencode\fP, can be |
| 91 |
used to generate a base\-64 string from known input. \fBmmencode\fP does |
| 92 |
not ship with BIND 9 but is available on many systems. See the Example |
| 93 |
section for sample command lines for each. |
| 94 |
.SH EXAMPLE |
| 95 |
.INDENT 0.0 |
| 96 |
.INDENT 3.5 |
| 97 |
.sp |
| 98 |
.EX |
| 99 |
options { |
| 100 |
default\-server localhost; |
| 101 |
default\-key samplekey; |
| 102 |
}; |
| 103 |
.EE |
| 104 |
.UNINDENT |
| 105 |
.UNINDENT |
| 106 |
.INDENT 0.0 |
| 107 |
.INDENT 3.5 |
| 108 |
.sp |
| 109 |
.EX |
| 110 |
server localhost { |
| 111 |
key samplekey; |
| 112 |
}; |
| 113 |
.EE |
| 114 |
.UNINDENT |
| 115 |
.UNINDENT |
| 116 |
.INDENT 0.0 |
| 117 |
.INDENT 3.5 |
| 118 |
.sp |
| 119 |
.EX |
| 120 |
server testserver { |
| 121 |
key testkey; |
| 122 |
addresses { localhost port 5353; }; |
| 123 |
}; |
| 124 |
.EE |
| 125 |
.UNINDENT |
| 126 |
.UNINDENT |
| 127 |
.INDENT 0.0 |
| 128 |
.INDENT 3.5 |
| 129 |
.sp |
| 130 |
.EX |
| 131 |
key samplekey { |
| 132 |
algorithm hmac\-sha256; |
| 133 |
secret \(dq6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz\(dq; |
| 134 |
}; |
| 135 |
.EE |
| 136 |
.UNINDENT |
| 137 |
.UNINDENT |
| 138 |
.INDENT 0.0 |
| 139 |
.INDENT 3.5 |
| 140 |
.sp |
| 141 |
.EX |
| 142 |
key testkey { |
| 143 |
algorithm hmac\-sha256; |
| 144 |
secret \(dqR3HI8P6BKw9ZwXwN3VZKuQ==\(dq; |
| 145 |
}; |
| 146 |
.EE |
| 147 |
.UNINDENT |
| 148 |
.UNINDENT |
| 149 |
.sp |
| 150 |
In the above example, \fBrndc\fP \%<#\:std-iscman-rndc> by default uses the server at |
| 151 |
localhost (127.0.0.1) and the key called \(dqsamplekey\(dq. Commands to the |
| 152 |
localhost server use the \(dqsamplekey\(dq key, which must also be defined |
| 153 |
in the server\(aqs configuration file with the same name and secret. The |
| 154 |
key statement indicates that \(dqsamplekey\(dq uses the HMAC\-SHA256 algorithm |
| 155 |
and its secret clause contains the base\-64 encoding of the HMAC\-SHA256 |
| 156 |
secret enclosed in double quotes. |
| 157 |
.sp |
| 158 |
If \fBrndc \-s testserver\fP \%<#\:cmdoption-rndc-s> is used, then \fBrndc\fP \%<#\:std-iscman-rndc> connects to the server |
| 159 |
on localhost port 5353 using the key \(dqtestkey\(dq. |
| 160 |
.sp |
| 161 |
To generate a random secret with \fBrndc\-confgen\fP \%<#\:std-iscman-rndc-confgen>: |
| 162 |
.sp |
| 163 |
\fBrndc\-confgen\fP \%<#\:std-iscman-rndc-confgen> |
| 164 |
.sp |
| 165 |
A complete \fBrndc.conf\fP file, including the randomly generated key, |
| 166 |
is written to the standard output. Commented\-out \fBkey\fP and |
| 167 |
\fBcontrols\fP statements for \fBnamed.conf\fP \%<#\:std-iscman-named\:.conf> are also printed. |
| 168 |
.sp |
| 169 |
To generate a base\-64 secret with \fBmmencode\fP: |
| 170 |
.sp |
| 171 |
\fBecho \(dqknown plaintext for a secret\(dq | mmencode\fP |
| 172 |
.SH NAME SERVER CONFIGURATION |
| 173 |
.sp |
| 174 |
The name server must be configured to accept rndc connections and to |
| 175 |
recognize the key specified in the \fBrndc.conf\fP file, using the |
| 176 |
controls statement in \fBnamed.conf\fP \%<#\:std-iscman-named\:.conf>\&. See the sections on the |
| 177 |
\fBcontrols\fP statement in the BIND 9 Administrator Reference Manual for |
| 178 |
details. |
| 179 |
.SH SEE ALSO |
| 180 |
.sp |
| 181 |
\fBrndc(8)\fP \%<#\:std-iscman-rndc>, \fBrndc\-confgen(8)\fP \%<#\:std-iscman-rndc-confgen>, \fBmmencode(1)\fP, BIND 9 Administrator Reference Manual. |
| 182 |
.SH Author |
| 183 |
Internet Systems Consortium |
| 184 |
.SH Copyright |
| 185 |
2026, Internet Systems Consortium |
| 186 |
.\" End of generated man page. |