FreeBSD tinydns: Sets Up a DNS Publication / Authoritative Name Server

by on July 8, 2007 · 1 comment· LAST UPDATED July 8, 2009

in , ,

How do I setup primary dns name server using tinydns under FreeBSD operating systems?

You need to create a zone file for your domain which will provide the following data:

  1. Your name server IP address.
  2. Your mail server IP address and pointer to mx.
  3. Your AAAA and A records etc.

Step # 1: Create Directory For Your Zone File

Type the following command:
# mkdir /var/

Step # 2: Set Up a DNS Publication Service

You need to use your IP and directory /var/ as follows
# tinydns-conf tinydns dnslog /var/
Above will create all required directories and default zone data file.

Step # 3: Start TinyDNS Server

Type the following command:
# ln -s /var/ /var/service/
Verify that UDP port # 53, opened:
# sockstat -4
# sockstat -4 -p 53

Now, all you've to do is create a zone file for your domain

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 1 comment… read it below or add one }

1 Sam July 10, 2010 at 7:31 am

I am running FreeBSD 8. When following this guide I noticed a few things:

Step 1 – Do not create the directory as it will conflict with Step 2.
Step 2 – Use the directory in the command, if it exists, it won’t work. If it dosen’t exist, it will create it.


[root@vps ~]# mkdir /var/
[root@vps ~]# tinydns-conf tinydns dnslog /var/
tinydns-conf: fatal: unable to create /var/ file already exists


Leave a Comment

Tagged as:

Previous Faq:

Next Faq: