I’ve now switched to PowerDNS, running on a MySQL backend, and controllable using the pretty-damn-good PowerDNS On Rails.
Reasons for switching:
- I am sick and fucking tired of editing and backing up countless arcane zone files. It might be “hard core” and “old school” but it’s also annoying as hell, and I can never remember the syntax or forget something stupid like updating the serial, or whatever.
- A database is the natural storage container for numerous data files of the same syntax and consistent references, and is far more convenient. I can take snapshots of my entire DNS setup, one file, ready to import at a moment’s notice elsewhere.
- Furthermore, a database is amenable to controlling with a web interface, which is far more convenient (and less prone to error) than ssh’ing in and editing files manually
- I have one less thing to back up (actually, about 30 less things)
- BIND has a terrible security record
- PowerDNS has some neat other features such as dynamic lookup that I am eager to start playing with.
I’ve been considering this for a while, decided to make the jump today. First I got it set up and running perfectly on an unprivileged port; then turned off BIND and turned on PowerDNS. Total downtime: under 5 seconds.
Here are the steps to install on RHEL5:
$ yum install pdns pdns-backend-mysql pdns-backend-pipe pdns-backend-sqlite
# create a mysql user & db "powerdns"
# edit /etc/pdns/pdns.conf to increase port, add gmysql backend and add db credentials
# create the dir to put powerdns-on-rails in, go to it
$ git clone git://github.com/kennethkalmer/powerdns-on-rails.git
# enter DB creds into config/database.yml and create the DB
$ rake db:migrate
$ rake db:seed
# import zone files
# note: you may need to temporarily cp them to /var/named/
$ zone2sql --named-conf=/var/named/chroot/etc/named.conf --gmysql > zones.sql
# import the sql into MySQL via whatever means customary
# start and test powerdns at this point, see the docs
# then revert the port
# add the web app in Apache or whatever you use, log in, bingo
$ service named stop
$ service pdns start
$ chkconfig named off
$ chkconfig pdns on # make sure mysqld is on too ...
There are some more tips here if you want to have a look.