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:

$TTL 3D
$ORIGIN debian-tutorials.com.
@    IN    SOA    debian-tutorials.com.   [email protected]. (
201108041
28800
7200
604800
86400 )

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

Enjoy!

Valic

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