05-RNDC
05-RNDC
* rndc.conf is the config file for rndc*, the BIND 9 name server control util.
Note : The name server must be configured to accept rndc connections and to
recognize the key specified in the rndc.conf file, using the controls
statement in named.conf.
=====================================
PART I - The practical Stuff to Do !
5 Steps
=====================================
2. Generate /etc/rndc.conf
# rndc-confgen > /etc/rndc.conf
3. Configure /etc/rndc.conf
Change : default-server 127.0.0.1;
to whatever your IP is
/etc/named.conf
===============
Before :
======
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
After :
=====
controls {
inet 192.168.1.3 allow { localhost; 192.168.1.3; } keys { rndc-key; };
};
#include "/etc/rndc-key";
Done !!
7. rndc status
number of zones: 4
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running
Testing Done !!
=====================================
PART II - /etc/rndc.conf
=====================================
This file has a similar structure and syntax to named.conf but simpler.
- an 'options' statement
default-server clause
default-key clause
default-port clause
- a server statement
key clause
port clause
- a key statement
algorithm clause
secret clause
Details :
==========
The /etc/rndc.conf file uses three statements:
The clauses :
- a server statement
After the server keyword, the server statement includes a string which
is the hostname or address for a name server.
Two clauses :
key : The key name must match the name of a key statement
in the file.
- a key statement
The key statement begins with an identifying string, the name of the
key.
Two clauses :
unix :
A Unix domain socket that the NS creates on the local FS; rndc
then sends msgs to the NS by writing to the Unix domain socket
inet :
A TCP socket that the NS listens on; rndc sends msgs to the NS
by connecting to the TCP socket
BIND 9 uses port 953 by default and supports only inet [TCP sockets]
********************