How do I create a zone file for my domain under tinydns server?
You need to update /var/ns1.nixcraft.in/root/data file to define your zone. The DNS information in data file is nothing but a series of lines. Each line starts with a special character and continues with a series of colon-separated fields. Each line contains a ttl (time to live) specifying the number of seconds that the line's DNS records may be cached. You may omit ttl and it will use the default value.
Sample Zone File For nixcraft.in Domain
Edit /var/ns1.nixcraft.in/root/data file using a text editor such as vi, enter:
# vi /var/ns1.nixcraft.in/root/data
Update it as follows:
#define ns for domain .nixcraft.in::ns1.nixcraft.in .nixcraft.in::ns2.nixcraft.in #define mx for domain @nixcraft.in::mail01.nixcraft.in:10 @nixcraft.in::mail02.nixcraft.in:20 #define A for ns1, ns2, mail01, mail02 and www for our dns +ns1.nixcraft.in:202.54.1.1 +ns2.nixcraft.in:203.51.2.1 +mail01.nixcraft.in:209.1.2.5 +mail02.nixcraft.in:208.1.5.1 +nixcraft.in:201.1.2.54 +www.nixcraft.in:201.1.2.54
Save and close the file.
Where,
- The first line defines an NS (ns1.nixcraft.in and ns2.nixcraft.in) for our domain
- @ defines two mx records for domain nixcraft.in with priority.
- + defines A record for each host name.
To create binary dns database (data.cdb file) simply type make command (in /var/ns1.nixcraft.in/root/ directory itself):
# make
You can now test your setup using standard dns tools:
# host nixcraft.in
You can also use djbdns client tool called dnsip to lookup IP addresses:
# dnsip ns1.nixcraft.in
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


