Type : System
Operating System : Redhat,Fedora,Centos
BIND (Berkeley Internet Name Domain) is of the most popular solution for the implamatation of a DNS solution on internet, and for linux and unix like systems.
Bind provide all tools and parameters to a complete DNS solution like : IPV4,IPV6, cache server, delegation, sub domain, remote control, security access, view, recursion, authority zone and DNSSEC (DNS Security Extensions).
Network port : 53
#yum install bind
Now you have to enable the service like that
#chkconfig named on
We can start the configuration of the DNS cache server.
CONFIGURATION
The first step is to create the base file for the bind daemon.
You can find below the base file and put it in /var/named/data.
Now we can see to create the named config file : /etc/named.conf
Example of named.conf :
options
{
directory "/var/named";
statistics-file "data/named.stats";
zone-statistics yes;
listen-on { any; };
listen-on-v6 { none; };
allow-transfer { none; };
tcp-clients 100;
recursive-clients 1000;
// dig version.bind txt chaos
version "Secured";
max-cache-ttl 86400;
};
key "rndc-key" {
algorithm hmac-md5;
secret "12345678910";
};
key "rndc-key-remote" {
algorithm hmac-md5;
secret "12345678910";
};
controls {
inet 127.0.0.1 port 954
allow { 127.0.0.1; } keys { "rndc-key"; };
};
logging {
channel default_syslog {
// Send most of the named messages to syslog.
syslog local2;
severity info;
};
channel audit_log {
// Send the security related messages to a separate file.
file "data/audit.log" versions 3 size 5m;
severity dynamic;
print-time yes;
print-category yes;
print-severity no;
};
category default { default_syslog; };
category general { default_syslog; };
category security { default_syslog; };
category config { default_syslog; };
category resolver { audit_log; };
category lame-servers { null; };
};
zone "." IN {
type hint;
file "data/named.ca";
};
zone "localhost" IN {
type master;
file "data/localhost.zone";
allow-update { none; };
notify no;
};
zone "127.in-addr.arpa" IN {
type master;
file "data/127.zone";
allow-update { none; };
notify no;
};
With this file you have a DNS cache server with a cache during 1 day.
For the control of your named server you have to create thoses files :
#vi /etc/rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "12345678910";
};
options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
#vi /etc/rndc.key
key "rndckey" {
algorithm hmac-md5;
secret "12345678910";
};
RNDC is an important command to manage you named server with this command you can flush or reload a zone.
rndc flush
rndc reload
















































