$linuxjunkies
>

rndc(8)

Controls operation of a BIND DNS server by sending commands to the rndc socket.

UbuntuDebianFedoraArch

Synopsis

rndc [-c config-file] [-k key-file] [-s server] [-p port] [-V] [-t timeout] command [command-args]

Description

rndc is a utility for administering BIND nameservers. It sends control commands to a nameserver on a remote host or the local machine, communicates with the server through a TCP connection, and authenticates commands using digital signatures.

rndc requires a configuration file to determine how to contact the nameserver and what cryptographic key to use when sending commands. By default, rndc looks for /etc/rndc.conf and /etc/rndc.key.

The nameserver must be configured to listen on a control port and must have matching key configuration. A default key and control channel are often generated automatically during BIND installation.

Common options

FlagWhat it does
-c config-fileUse alternate configuration file (default /etc/rndc.conf)
-k key-fileUse alternate key file for authentication (default /etc/rndc.key)
-s serverConnect to specified nameserver (default localhost)
-p portConnect to specified port on nameserver (default 953)
-VPrint rndc version number and exit
-t timeoutSet timeout for replies in seconds
-hDisplay help message and exit

Examples

Reload the BIND configuration and zone files without stopping the server

rndc reload

Stop and restart the BIND nameserver

rndc restart

Flush all DNS cache entries from the server

rndc flush

Show the current status of the nameserver

rndc status

Enable query logging to track incoming DNS queries

rndc querylog on

Reload the nameserver running on a remote host

rndc -s 192.168.1.100 reload

Flush all cache entries for a specific domain

rndc flushname example.com

Cleanly shut down the BIND nameserver

rndc stop

Related commands