Using rndc

BIND includes a utility called rndc that allows you to administer the named daemon, locally or remotely, with command line statements. The rndc program uses the /etc/rndc.conf file for its configuration options, which can be overridden with command line options.

In order to prevent unauthorized users on other systems from controlling BIND on your server, a shared secret key method is used to explicitly grant privileges to particular hosts. In order for rndc to issue commands to any named, even on a local machine, the keys used in /etc/named.conf and /etc/rndc.conf must match.

When executing rndc on a properly configured localhost, the following commands are available:

halt — Stops the named service immediately.

querylog — Turns on logging of all queries made by clients to this nameserver.

refresh — Refreshes the nameserver’s database.

reload — Tells the nameserver to reload the zone files but keep all other previously cached responses. This allows you to make changes to zone files and have them take effect on your master and slave servers without losing all stored name resolutions.
If your changes only affected a particular zone, you can tell named to only reload that one zone. Type the name of the zone after the reload command.

stats — Dumps the current named stats to the /var/named/named.stats file.

stop — Stops the server gracefully, saving any dynamic update and IXFR data before exiting.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.