To create a secondary TinyDNS server using DJBDNS on a FreeBSD system, you will need to do the following:
pkg
package manager:# pkg install djbdns
pw
command:# pw groupadd tinydns # pw useradd tinydns -g tinydns -d /usr/local/tinydns -s /nonexistent -w no
# mkdir -p /usr/local/tinydns/secondary/data # mkdir /usr/local/tinydns/secondary/log # cd /usr/local/tinydns/secondary # touch log/main # touch log/status # touch data/data.cdb # cp /usr/local/djbdns/tinydns-data/secondary/Makefile .
Set up the DNS data for TinyDNS. You will need to create a DNS data file that specifies the DNS records for your domain. This file should be in a specific format, as described in the TinyDNS documentation. You can use the tinydns-data
utility to generate this file from a template.
Run the make
command to compile the DNS data file and create the necessary database files:
# cd /usr/local/tinydns/secondary # make
/etc/rc.conf
file:tinydns_secondary_enable="YES"
# service tinydns-secondary start
dig
command:# dig @localhost example.com
This should return the DNS records for the domain example.com
.
For more information about configuring and using the DJBDNS TinyDNS server, you can refer to the DJBDNS documentation.