Angelo Resources

 
 

Bind (named) configuration

This document was created to explain how I installed a dynamic name-server using Bind, MySQL and an addin module called Bind-DLZ. I have however changed since to the bind-sdb RPM from the reason that I run BIND on a production server and having a costum compiled version of BIND means that I cannot automatic update it with the use of excisting RPM packages. The module is only experimental and should not be used on a produiction machine or with great caution.

My aim is now to create a server with only released RPM's so automatic update is an option, and that is why I am going to look at BIND-SDB. I had to change from MySQL to PostGreSQL, but as I am recoding my software anyway at the moment didn 't see that as a stumbling block.

I do however recommend the Bind DLZ project and it worked very well for about 8 months for me. I am not sure what activity there is on the project and if it will support future BIND versions. Please look at BIND DLZ Home for more information?!

Installation and configuration of Bind-SDB

I started configuring the Bind_SDB driver for the Bind Nameserver after looking for some time around the internet for information on this. The documentation warns that this is only an experimetal driver, and should not be used on production machines and is off course at own risk. I didn't find any information about the performance of the driver, so decided to give it a go and install it on my test server!

The installation of bind is very straigh forward with yum:

[root@lucky Luuk]# yum install bind- sdb

Configuring BIND to use  SDB (and PostgreSQL)

Turning the SDB layer on (on Fedora) is done in the file nano /etc/sysconfig/named, by putting adding the configuration parameter ENABLE_SDB=yes.

We now have to edit /etc/named.conf to use the database backend. This can be done by adding the following to the named.conf file.

zone "pgdb.net." IN {
        type master;
        database "pgsql  bind        pgdb     localhost pguser pgpasswd";
        #                ^- DB name  ^-Table  ^-host    ^-user ^-password
};

 

Setup of the database

The first thing is to create a database and a database user for the DNS records. 

The table itself can be created using the tool zonetodb, but I created the manually. Bind needs the following fields:

  • name
  • ttl
  • rdtype
  • rdata
I made them all of the type character varying, except TTL as integer.

Restart BIND with SDB 

Now (re)start Bind (/sbin/sevice named restart) to load names_sdb! 

Additionl information on Bind-SDB can be found in: /usr/share/doc/bind-sdb-*/ 

Switch to PowerDNS

I have been working on the BIND configuration for some while, but fuond information on the SDB backend very limited. It worked fine for me with the installation above, but this only allowes to update de records of a domain declared in the named.conf file.

I was more looking for an application where I could also manage domains itself, and did not have to make changes to the named.conf file and reload if I add a domain to the system. I found the DNS server PowerDNS and am trying this one now. Literature suggests it is a bit slower, but this is not an issue for my applicaitons as I don't expect 1000's of requirest a second.

Bind-DLZ is going to be intergrated into the Bind distrobution I think (mean to have read that on the website), but as it is only in the alpha release of Bind, I decided to look for a stable DNS server first. PowerDNS  seems to have a lot of good and suefull functionallities I like!

The only drawback so far is the poor documentation (or at least, hard to scan through and find the anwsers, as I was looking for a quick install, config and test to see if it suited me). I guess I should take my time and actually read it!


     
Last modification: 2006-08-09

Loading, please wait...

Stats tracker

Generated: 1.176 sec.
Generated with: ATFM Solutions CMS system
(85.92.137.43)