Building a Local DNS Server

Step 1: Install BIND9
Step 2: Basic Configuration
Step 3: Test DNS Server
Last updated

Last updated
sudo -i
apt-get install bind9
# verify the service is running once the install is complete//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "AJ.labz"{
type master;
//file "/etc/bind/zones/db.domain.com";
file "/etc/bind/zones/db.aj.labz
};
//reverse lookup zone
zone "3.2.1.in-addr.arpa" {
type master;
//file "/etc/bind/zones/rev.db.in-addr.arpa";
file "/etc/bind/zones/db.50.24.10";
};
$TTL 900
@ IN SOA ns1.aj.labz. admin.aj.labz. (
1 ;<serial-number>
900 ;<time-to-refresh>
900 ;<time-to-retry>
604800 ;<time-to-expire>
900 ) ; <minimum-TTL>
;List Nameservers
IN NS ns1.aj.labz.
IN NS ns2.aj.labz.
;address to name mapping
esxi.aj.labz. IN A 10.24.50.100
vsphere.aj.labz. IN A 10.24.50.101
ns1.aj.labz. IN A 10.24.50.2
ns2.aj.labz. IN A 10.24.50.2$TTL 900
@ IN SOA ns1.aj.labz. admin.aj.labz. (
2 ;<serial-number>
900 ;<time-to-refresh>
900 ;<time-to-retry>
604800 ;<time-to-expire>
900) ;<minimum-TTL>
; name servers
IN NS ns1.aj.labz.
IN NS ns2.aj.labz.
; PTR Records
101.50 IN PTR vsphere.aj.labz. ; 10.24.50.101
100.50 IN PTR esxi.aj.labz. ; 10.24.50.100