Example DNS Zone File for BIND9

Valic —  August 18, 2011 — 2 Comments

Sample DNS zone file for BIND9 with a domain with two nameservers  ns1.example.com and ns2.example.com.

You can use this example to define your own name servers.Just make changes to the domain name and IP addresses.

Be sure to include first the following statement in named.conf:

zone "debian-tutorials.com" {
type master;
file "debian-tutorials.com.db";

The zone file looks like this:

$ORIGIN debian-tutorials.com.
@    IN    SOA    debian-tutorials.com.   contact@debian-tutorials.com. (
86400 )

NS        ns1.debian-tutorials.com.
NS        ns2.debian-tutorials.com.
MX 10        mail
debian-tutorials.com.   A
www                                             A
webmail                                      A
mail                                             A
*                                      CNAME        www



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

2 responses to Example DNS Zone File for BIND9

  1. Small question, where do you store your debian-tutorials.com.db file? is it in /etc/bind ?

  2. my zone files are in “/etc/bind/pri/” directory.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.