RNDC-CONFGEN(8) BIND 9 RNDC-CONFGEN(8)

# [NAME](#NAME)

rndc-confgen - rndc key generation tool

# [SYNOPSIS](#SYNOPSIS)

**rndc-confgen** \[**-a**] \[**-A** algorithm] \[**-b** keysize] \[**-c** keyfile] \[**-h**] \[**-k** keyname] \[**-p** port] \[**-s** address] \[**-t** chrootdir] \[**-u** user]

# [DESCRIPTION](#DESCRIPTION)

**rndc-confgen** generates configuration files for **rndc** &lt;#std-iscman-rndc&gt;. It can be used as a convenient alternative to writing the **rndc.conf** &lt;#std-iscman-rndc.conf&gt; file and the corresponding **controls** and **key** statements in **named.conf** &lt;#std-iscman-named.conf&gt; by hand. Alternatively, it can be run with the **-a** option to set up a **rndc.key** file and avoid the need for a **rndc.conf** &lt;#std-iscman-rndc.conf&gt; file and a **controls** statement altogether.

# [OPTIONS](#OPTIONS)

[**-a**](#a)

This option sets automatic **rndc** &lt;#std-iscman-rndc&gt; configuration, which creates a file **/etc/bind/rndc.key** that is read by both **rndc** &lt;#std-iscman-rndc&gt; and **named** &lt;#std-iscman-named&gt; on startup. The **rndc.key** file defines a default command channel and authentication key allowing **rndc** &lt;#std-iscman-rndc&gt; to communicate with **named** &lt;#std-iscman-named&gt; on the local host with no further configuration.

If a more elaborate configuration than that generated by **rndc-confgen -a** is required, for example if rndc is to be used remotely, run **rndc-confgen** without the **-a** option and set up **rndc.conf** &lt;#std-iscman-rndc.conf&gt; and **named.conf** &lt;#std-iscman-named.conf&gt; as directed.

[**-A algorithm**](#A)

This option specifies the algorithm to use for the TSIG key. Available choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, and hmac-sha512. The default is hmac-sha256.

[**-b keysize**](#b)

This option specifies the size of the authentication key in bits. The size must be between 1 and 512 bits; the default is the hash size.

[**-c keyfile**](#c)

This option is used with the **-a** option to specify an alternate location for **rndc.key**.

[**-h**](#h)

This option prints a short summary of the options and arguments to **rndc-confgen**.

[**-k keyname**](#k)

This option specifies the key name of the **rndc** &lt;#std-iscman-rndc&gt; authentication key. This must be a valid domain name and will be sanitized using the domain name semantics. The default is **rndc-key**.

[**-p port**](#p)

This option specifies the command channel port where **named** &lt;#std-iscman-named&gt; listens for connections from **rndc** &lt;#std-iscman-rndc&gt;. The default is 953.

[**-q**](#q)

This option prevets printing the written path in automatic configuration mode.

[**-s address**](#s)

This option specifies the IP address where **named** &lt;#std-iscman-named&gt; listens for command-channel connections from **rndc** &lt;#std-iscman-rndc&gt;. The default is the loopback address 127.0.0.1.

[**-t chrootdir**](#t)

This option is used with the **-a** option to specify a directory where **named** &lt;#std-iscman-named&gt; runs chrooted. An additional copy of the **rndc.key** is written relative to this directory, so that it is found by the chrooted **named** &lt;#std-iscman-named&gt;.

[**-u user**](#u)

This option is used with the **-a** option to set the owner of the generated **rndc.key** file. If **-t** is also specified, only the file in the chroot area has its owner changed.

# [EXAMPLES](#EXAMPLES)

To allow **rndc** &lt;#std-iscman-rndc&gt; to be used with no manual configuration, run:

**rndc-confgen -a**

To print a sample **rndc.conf** &lt;#std-iscman-rndc.conf&gt; file and the corresponding **controls** and **key** statements to be manually inserted into **named.conf** &lt;#std-iscman-named.conf&gt;, run:

**rndc-confgen**

# [SEE ALSO](#SEE_ALSO)

[**rndc(8)**](/man/os/bind/rndc.8) &lt;#std-iscman-rndc&gt;, [**rndc.conf(5)**](/man/os/bind/rndc.conf.5) &lt;#std-iscman-rndc.conf&gt;, [**named(8)**](/man/os/bind/named.8) &lt;#std-iscman-named&gt;, BIND 9 Administrator Reference Manual.

# [Author](#Author)

Internet Systems Consortium

# [Copyright](#Copyright)

2026, Internet Systems Consortium

2026-11-05 9.20.30

---

Document: rndc-confgen(8) from bind 9.20.30-r1 (Chainguard OS)
Source: https://gitlab.isc.org/isc-projects/bind9.git
