Named/Bind: Creating rndc key and rndc conf file

by rajesh 2012-05-10 15:25:07

Installing bind will itself install rndc and rndc-confgen

Fist we should generate rndc.conf by using the command

#rndc-confgen -a -c /etc/rndc.conf

This will create a conf file with key in it.


In the file edit the line

key "rndckey" {

and change the value rndckey to any name that is used in named.conf inside the keys.

In the below example code form named.conf the keys used in rndc-key, so we will change the key name in rndc.conf to rndc-key

inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };



- Now copy the content of the conf file in to another file named /etc/rndc.key

- Now add the following code at the end of the file /etc/rndc.conf

options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};

1050
like
0
dislike
0
mail
flag

You must LOGIN to add comments