djbdns also ships with a number of user tools that make life easier.
Emerging djbdns on Gentoo will automatically setup the user accounts (dnscache, dnslog, tinydns) for you.
First, create a tinydns service:
mkdir /var/djbdns tinydns-conf tinydns dnslog /var/djbdns/tinydns <nameserver IP>
You can add a DNS local cache if you want, but it won't be used in this configuration.
Create a symlink for the service, and start service scan:
ln -s /var/djbdns/tinydns /service/tinydns /etc/init.d/svscan start
The documentation says that you will need to use ./add-ns
to claim in-addr.arpa names and serve reverse DNS names, but that is only necessary if you are in charge of an entire IP block.
Add a domain's NS records (a.ns.domain.com, b.ns.domain.com)
cd /service/tinydns/root ./add-ns domain.com 209.177.158.152 ./add-ns domain.com 209.177.157.176 make
Add the domain's first A record, also called the “host record”.
Note that this is only run once per IP address, so run it for the FQDN.
cd /service/tinydns/root ./add-host domain.com <IP address> make
cd /service/tinydns/root ./add-alias foo.domain.com <IP address> make
Decide which hostname is going to be the FQDN and add the host record and aliases as normal:
cd /service/tinydns/root ./add-host domain.com <IP address> ./add-alias foo.domain.com <IP address> make
Any extra domain names will be an alias A record. There can only be one host record per IP address.
cd /service/tinydns/root ./add-alias domain.com <IP address> ./add-alias foo.domain.com <IP address> make
cd /service/tinydns/root ./add-alias *.domain.com <IP address> make
You have to add it manually to the data
file. The syntax is:
Csub.domain.com:server.com.:<TTL>
Run make
when finished.