MySQL BIND SDB Driver

Introduction

The MySQL BIND SDB driver provides a MySQL database backend for the BIND 9 Domain Name Server (DNS). Normally, BIND is configured with complex configuration files that become difficult to maintain with large domains and are very error prone. BIND must also be restarted whenever changes are made to its configuration files.

The MySQL BIND SDB driver gets around these limitations by allowing the DNS server to read the domain information directly from a MySQL database. Any changes to the zones in the database are immediately seen by BIND making reloads unnecessary.

The code for this driver was derived from the example PostgreSql driver contained in the BIND distribution. It is similar in code and function to the unmaintained BIND-MySQL project and the database format is compatible since it appears to also have been derived from the PostgreSQL example driver.

Potential Uses

The project was started so that we could automatically create sub-domains for user's homepages on account creation. This was done by adding the SQL to add the domain to the PHP account creation script. It is also a simple way to provide a web administration interface to BIND using dnsSQLpanel. A client and server could also be written to add and remove DNS entries as a computer comes online or goes offline. This would allow people with dynamic IPs (like dialup and many DSL users) to run a web or ftp server from their home computer.

I would like to expand this project to include at least example code for some of the above applications. Any contributions or suggestions would be appreciated.

License

The MySQL BIND SDB driver is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Requirements

You must have the MySQL development libraries installed on the machine that you are building BIND on and a MySQL database installed on a system that is accessible from your DNS servers. You must also have a C compiler such as GCC and feel comfortable building software from source.

Supported Systems

The MySQL BIND SDB driver should build on any system that you can build BIND 9 on. So far, it has only been tested on SuSE Linux 8.2 and Red Hat Linux 7.2, but it should also work on the following systems;

  • AIX
  • COMPAQ Tru64 UNIX
  • FreeBSD, NetBSD, OpenBSD & BSD/OS
  • HP-UX except for 11.11
  • IRIX64
  • Red Hat, SuSE, Slackware & Debian GNU/Linux
  • Solaris
  • OpenUNIX

It may also be possible to compile on the following systems,

  • Mac OS X 10.1
  • Windows NT/W2K/XP/2003