Configuring rndc to control BIND

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.

Getting ready

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.

How to do it...

Follow these steps to configure rndc:

  1. Use the rndc-confgen utility to generate the necessary key file:
    rndc-confgen -a -c /etc/rndc.key
    
  2. Create the /etc/rndc.conf file with the following content:
     include "/etc/rndc.key"; options { ...

Get CentOS 7 Server Deployment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.