HOWTO Configure a DNS server using BIND

This article was first written in May 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/261).

The config files

named.conf named.conf.local
zone "example.com" {
        type master;
        file "/etc/bind/db.example.com";
        allow-query { any; };
        allow-transfer { trusted; };
};
db.example.com

Some definitions

SOA Start Of Authority. ANSMXCNAME@ The @ is interpreted as the current domain name  [1]. The ending . What is the difference between example.com. and example.com? If the name doesn't end with a dot, BIND append the current domain name. So example.com. will define example.com while example.com will define example.com.example.com (which is probably not what you want ;-.
[1] BIND knows the current domain name because the db.* file is read based on the zone definition declared in the named.conf.local.