How do I setup an authoritative name server with tinydns?
772
I want to use tinydns to serve up DNS records for my domain name. What is a minimal example of how to set this up in Ubuntu? You can assume that I've already set the name server for the domain to point to the IP of my server.
where tinydns and dnslog are the names of the user accounts that we previously created; <server-ip> is the IP address on the server that tinydns will listen on.
An empty tinydns-data file (analogous to BIND's zone file) will have been created at /etc/sv/tinydns/root/data. You will need to edit it and enter in the details for your domain. See the official documentation and this for details on what to enter and example data files.
Whenever you make changes to the tinydns-data file, you must rebuild the tinydns database:
cd /etc/sv/tinydns/root
make
A file named data.cdb should have been created in the same directory.
Finally, enable the tinydns service by running:
update-service --add /etc/sv/tinydns
You should see tinydns running in ps. You can verify that your DNS server is serving up requests correctly by running something like this:
Install
tinydns
(which is included withdjbdns
) and other required packages:Once the
daemontools-run
package is installed, we need to start it manually the first time (it will start automatically on boot):tinydns
needs two users to run. Create them now:Create the service configuration directory in the standard location:
Run
tinydns-conf
to create the skeleton for the service:where
tinydns
anddnslog
are the names of the user accounts that we previously created;<server-ip>
is the IP address on the server thattinydns
will listen on.An empty
tinydns-data
file (analogous to BIND's zone file) will have been created at/etc/sv/tinydns/root/data
. You will need to edit it and enter in the details for your domain. See the official documentation and this for details on what to enter and example data files.Whenever you make changes to the
tinydns-data
file, you must rebuild thetinydns
database:A file named
data.cdb
should have been created in the same directory.Finally, enable the
tinydns
service by running:You should see
tinydns
running inps
. You can verify that your DNS server is serving up requests correctly by running something like this: