Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Install tinydns (which is included with djbdns) and other required packages:

aptitude install djbdns daemontools-run make

Once the daemontools-run package is installed, we need to start it manually the first time (it will start automatically on boot):

initctl start svscan

tinydns needs two users to run. Create them now:

adduser --system --no-create-home --disabled-login --group tinydns
adduser --system --no-create-home --disabled-login --group dnslog

Create the service configuration directory in the standard location:

mkdir -p /etc/sv

Run tinydns-conf to create the skeleton for the service:

tinydns-conf tinydns dnslog /etc/sv/tinydns <server-ip>

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 (analagous 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:

dig @<server-ip> <your-domain-name> ANY
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.