5 Example Usage of the rndc Command
The rndc command enables you to administer the named service.
rndc(8)rndc-confgen(8)named(8)
Enable Remote Usage of rndc
The named service is administered locally. If the service is configured in the controls section of the /etc/named.conf file, then you can also use the command line to manage named remotely. To prevent unauthorized access to the service, rndc must be configured to listen on the selected port (by default, port 953), and both named and rndc must have access to the same key. To generate a suitable key, use the rndc-confgen command:
sudo rndc-confgen -a
The command creates the /etc/rndc.key file.
Check the Status of the named Service
Check the status of the named service as follows:
sudo rndc status
number of zones: 3
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
Reload Configuration Files after Changes
If you change the named configuration file or zone files, the rndc reload command instructs named to reload the files:
sudo rndc reload