rndc.conf.html revision 33d0a7767d53cb366039fd0ac4f63cf8a9c351b0
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - Copyright (C) 2004, 2005, 2007, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - Copyright (C) 2000, 2001 Internet Software Consortium.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - Permission to use, copy, modify, and/or distribute this software for any
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - purpose with or without fee is hereby granted, provided that the above
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - copyright notice and this permission notice appear in all copies.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail - PERFORMANCE OF THIS SOFTWARE.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy<a name="man.rndc.conf"></a><div class="titlepage"></div>
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail<p><code class="filename">rndc.conf</code> — rndc configuration file</p>
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy<p><code class="filename">rndc.conf</code> is the configuration file
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy for <span class="command"><strong>rndc</strong></span>, the BIND 9 name server control
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy utility. This file has a similar structure and syntax to
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy <code class="filename">named.conf</code>. Statements are enclosed
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy in braces and terminated with a semi-colon. Clauses in
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy the statements are also semi-colon terminated. The usual
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy comment styles are supported:
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy C style: /* */
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy C++ style: // to end of line
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald Unix style: # to end of line
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald<p><code class="filename">rndc.conf</code> is much simpler than
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="filename">named.conf</code>. The file uses three
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald statements: an options statement, a server statement
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy and a key statement.
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald The <code class="option">options</code> statement contains five clauses.
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy The <code class="option">default-server</code> clause is followed by the
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald name or address of a name server. This host will be used when
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald no name server is given as an argument to
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <span class="command"><strong>rndc</strong></span>. The <code class="option">default-key</code>
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald clause is followed by the name of a key which is identified by
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald a <code class="option">key</code> statement. If no
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">keyid</code> is provided on the rndc command line,
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald and no <code class="option">key</code> clause is found in a matching
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">server</code> statement, this default key will be
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald used to authenticate the server's commands and responses. The
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">default-port</code> clause is followed by the port
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald to connect to on the remote name server. If no
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">port</code> option is provided on the rndc command
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald line, and no <code class="option">port</code> clause is found in a
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy matching <code class="option">server</code> statement, this default port
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald will be used to connect.
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald The <code class="option">default-source-address</code> and
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">default-source-address-v6</code> clauses which
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy can be used to set the IPv4 and IPv6 source addresses
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald respectively.
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald After the <code class="option">server</code> keyword, the server
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald statement includes a string which is the hostname or address
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald for a name server. The statement has three possible clauses:
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">key</code>, <code class="option">port</code> and
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald <code class="option">addresses</code>. The key name must match the
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald name of a key statement in the file. The port number
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald specifies the port to connect to. If an <code class="option">addresses</code>
7256a34efe9df75b638b9e812912ef7c5c68e208Dan McDonald clause is supplied these addresses will be used instead of
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail the server name. Each address can take an optional port.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail If an <code class="option">source-address</code> or <code class="option">source-address-v6</code>
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail of supplied then these will be used to specify the IPv4 and IPv6
8887b57dc579de11464fc6c74163d2595ce073afGirish Moodalbail source addresses respectively.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail The <code class="option">key</code> statement begins with an identifying
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail string, the name of the key. The statement has two clauses.
8887b57dc579de11464fc6c74163d2595ce073afGirish Moodalbail <code class="option">algorithm</code> identifies the authentication algorithm
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail for <span class="command"><strong>rndc</strong></span> to use; currently only HMAC-MD5
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail (for compatibility), HMAC-SHA1, HMAC-SHA224, HMAC-SHA256
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail (default), HMAC-SHA384 and HMAC-SHA512 are
8887b57dc579de11464fc6c74163d2595ce073afGirish Moodalbail supported. This is followed by a secret clause which contains
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail the base-64 encoding of the algorithm's authentication key. The
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail base-64 string is enclosed in double quotes.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail There are two common ways to generate the base-64 string for the
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail secret. The BIND 9 program <span class="command"><strong>rndc-confgen</strong></span>
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail be used to generate a random key, or the
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail <span class="command"><strong>mmencode</strong></span> program, also known as
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail <span class="command"><strong>mimencode</strong></span>, can be used to generate a
8887b57dc579de11464fc6c74163d2595ce073afGirish Moodalbail string from known input. <span class="command"><strong>mmencode</strong></span> does
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail ship with BIND 9 but is available on many systems. See the
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail EXAMPLE section for sample command lines for each.
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail default-server localhost;
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail default-key samplekey;
8887b57dc579de11464fc6c74163d2595ce073afGirish Moodalbail server localhost {
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail key samplekey;
299625c6492013aa7bd163862f0d181854f69b3cSebastien Roy server testserver {
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail addresses { localhost port 5353; };
8887b57dc579de11464fc6c74163d2595ce073afGirish Moodalbail key samplekey {
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail algorithm hmac-sha256;
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail algorithm hmac-sha256;
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
6e91bba0d6c6bdabbba62cefae583715a4a58e2aGirish Moodalbail In the above example, <span class="command"><strong>rndc</strong></span> will by