Adding a DNS Zone in BIND

asked Apr 20, 2012 in General by darkshark (1,500 points)
Greetings all,
I want to add a DNS Zone in Bind but I’m not sure how. Can someone please help me out?

Appreciate your support

1 Answer

0 like 0 dislike
answered Apr 20, 2012 by SmartHost (9,060 points)
1.first you have to add the following to your configuration file (/etc/named.conf)
zone "" IN {
file "";
allow-update { none; };
this tells BIND that it will be hosting DNS for said domain
2. create the zone. A typical zone with an MX record, and A record, and a CNAME might look like this:
$TTL 86400 IN SOA (
; End
SOA Header IN A
www. IN A
mail. IN CNAME IN MX 30
Where TTL is the Time To Live and 86400 is 86,400 seconds (1 day) determines how long this record is good for
The SOA is very important and must be the first record in the zone. The first number listed under there is the serial number. This determines whether or not the zone has been updated.
So, if a slave has a zone with a serial of 1 and the master has a zone with a serial of 2 -- the slave will accept an update.
Generally this number can be set using the format yyyymmddss -- That's the year, month, date, and serial So a zone that is first create Jan 1, 2012 might have a serial 2012010100 When this zone is updated, the serial must be changed to 2012010101