GenerationIP

Just for you

  • Increase font size
  • Default font size
  • Decrease font size
Home Documentation System Documentation How to install a cache DNS server with BIND

How to install a cache DNS server with BIND

E-mail Print PDF
User Rating: / 4
PoorBest 

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

 


INSTALLATION

#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.

127.zone

localhost.zone

named.ca

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";

};

TIPS & COMMAND

RNDC is an important command to manage you named server with this command you can flush or reload a zone.

rndc flush

rndc reload

 

Last Updated on Saturday, 30 January 2010 22:43  

Share this article:

Add to: Mr. Wong Add to: Webnews Add to: Icio Add to: Oneview Add to: Kledy.de Social Bookmarking Add to:  FAV!T Social Bookmarking Add to: Favoriten.de Add to: Seekxl Add to: Social Bookmark Portal Add to: BoniTrust Add to: Power-Oldie Add to: Bookmarks.cc Add to: Newskick Add to: Newsider Add to: Linksilo Add to: Readster Add to: Yigg Add to: Linkarena Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: Jumptags Add to: Upchuckr Add to: Simpy Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Furl Add to: Yahoo Add to: Blogmarks Add to: Diigo Add to: Technorati Add to: Newsvine Add to: Blinkbits Add to: Ma.Gnolia Add to: Smarking Add to: Netvouz Add to: Folkd Add to: Spurl Add to: Google Add to: Blinklist Information