You are here: Home Tech Use DJBDNS to slave a zone from a master

Use DJBDNS to slave a zone from a master

by Chris Shenton last modified Sep 24, 2009 04:45 PM
It's not like BIND but it's not hard either. Master-IP-based directories hold domain-name files that tell the "puller" where and what to get.

Change to the TinyDNS root dir:

cd /var/service/tinydns/root

Create a dir named for the IP of DNS zone master server:


cd into that dir:


Touch a file for each domain name to be slaved, axfr.$DOMAINNAME:


Go up to the root and run the slaver; it's a perl script written by Russ Nelson that looks for dirs named for masters' IP addresses with files named axfr.* in them and pull from the address the named domain:

/usr/local/bin/ -D

The -D shows you what it's doing. This can be slow depending on the response time of ALL the masters it's querying. I don't know of a way to tell it to slave only one zone.

This is the same thing as cron runs to slave periodically:

55 * * * *    /usr/bin/cd /var/service/tinydns/root && env PATH=/bin:/sbin:/usr/bin:/usr/local/bin /usr/local/bin/

It does not respond to signals from the master to pull records. DJB doesn't believe in this complexity and would prefer slaves to pull from masters using simple scp or rsync instead of inventing new protocols.


cshenton@Asylum/~$ dig

; (1 server found)
;; ANSWER SECTION:    86400   IN      A

;; AUTHORITY SECTION:    86400   IN      NS

;; ADDITIONAL SECTION:     86400   IN      A

Share this: