FreeBSD DJBDNS: Tinydns Add Additional Domain Names

How do I add additional domains names such as cyberciti.com and nixcraft.com to my existing tinydns servers ns1.nixcraft.in and ns2.nixcraft.in?

You can add additional domains to the same data config file as follows.

Open /var/ns1.nixcraft.in/root/data file, enter:
# vi /var/ns1.nixcraft.in/root/data
Append cyberciti.com and nixcraft.com as follows:

##########################
# cyberciti.com zone
##########################
.cyberciti.com::ns1.nixcraft.in
.cyberciti.com::ns2.nixcraft.in
#define mx for cyberciti.com
@cyberciti.com::mail01.nixcraft.in:10
@cyberciti.com::mail02.nixcraft.in:20
#define A and www for cybercit.com
+cyberciti.com:74.86.48.99
+www.cyberciti.com:74.86.48.99


##########################
# nixcraft zone
##########################
.nixcraft.com::ns1.nixcraft.in
.nixcraft.com::ns2.nixcraft.in
#define mx for cyberciti.com
@nixcraft.com::mail01.nixcraft.in:10
@nixcraft.com::mail02.nixcraft.in:20
#define A and www for cybercit.com
+nixcraft.com:75.126.168.152
+nixcraft.com:75.126.168.152

Save and close the file. cd to /var/ns1.nixcraft.in/root and run “make”. This compiles the data.cdb which tinydns reads:
# cd /var/ns1.nixcraft.in/root
# make

Again test newly added domain using host or other tools:
# host www.cyberciti.com
OR
# dnsip nixcraft.com

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.