rndc-Instructions for use
RNDC Settings (local)
Produce/etc/rndc.key
After executing the "rndc-confgen-a" command, the Rndc.key file is generated in the/etc directory,
The resulting file contents are as follows:
"Algorithm Hmac-md5" means that we use the "HMAC-MD5" algorithm to generate
Each execution of "secret" produces a different "secret".
Generate/etc/rndc.conf File
1. After executing the instruction, the rndc.conf file is generated in the/etc directory, and the secret in the file is replaced with Rndc.key secret. The contents of the replacement file are as follows:
Modify/etc/named.conf
As shown in the annotations later in the rndc.conf file, include in the/etc/named.conf file
Check/var/log/messages
After you restart bind, if you find it in/var/log/messages
Indicates that the setting was successful.
Test
This means that you can then use the "RNDC" command on the native side to control the management of BIND. For example :
RNDC after the status parameter can show the current DNS server information, can be taken by the parameters can be entered only "RNDC" without any parameters, after execution will list all the parameters can be followed.
RNDC Settings (remote)
Remote control management of bind means that on other computers through the "RNDC" command to the remote DNS server (BIND) to do set or manage the action, because through the RNDC way, so can increase the security of data transmission.
We have produced Rndc.key and rndc.conf when we set the local side, so we continue to use these 2 files.
Modify/etc/named.conf
In the named.conf file, add
allow{any;} Indicates that any computer is allowed to connect to this computer, and the inet is followed by the DNS server IP address.
Check/var/log/messages
After you restart bind, if you find it in/var/log/messages
That means you can then use the "RNDC" command on the remote computer to control bind.
Set the Rndc.key and rndc.conf of the remote computer
You can control the remote DNS server by setting the secret in the Rndc.key and rndc.conf files in the remote computer to the same secret as Rndc.key in the DNS server you want to control.
Test
Rndc–s is followed by the DNS server IP address (domain name also). After execution, you can list remote DNS server-related information.
BIND rndc-Usage Instructions