rndc
is the client utility for managing BIND servers. However, before you can use it, both rndc
and BIND need to be configured. This recipe shows you how to configure them and then shows you a few commands for managing the server's cache.
This recipe requires a CentOS system with BIND installed and configured as described in the previous recipes. Administrative privileges are also required, either by logging in with the root
account or through the use of sudo
.
Follow these steps to configure rndc:
Use the
rndc-confgen
utility to generate the necessary key file:rndc-confgen -a -c /etc/rndc.key
Create the
/etc/rndc.conf
file with the following content:include "/etc/rndc.key"; options { default-key "rndc-key"; default-server 127.0.0.1; default-port 953; };
Ensure the correct ownership and access permissions for
rndc.key
andrndc.conf
:chown root.named...