Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14120 reviews 1680 hosting providers

Questions & Answers

Adding a DNS Zone in BIND

Apr 20, 2012 by darkshark
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 votes
Apr 20, 2012 by SmartHost
1.first you have to add the following to your configuration file (/etc/named.conf)
zone "domain.com" IN {
file "pri.domain.com";
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
domain.com. IN SOA ns1.something.com.
admin.server1.something.com. (
2006051901
10800
3600
604800
86400
)
domain.com. IN NS ns1.something.com.
domain.com. IN NS ns2.something.com.
; End
SOA Header
domain.com. IN A 1.2.3.4
www. IN A 1.2.3.5
mail. IN CNAME mail16.safesecureweb.com.
domain.com. IN MX 30 mail.domain.com.
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