Centos6.5-Win2012R2 – Setup Windows as your Master DNS and Bind as your Slave DNS.

This tutorial show how to setup Windows 2012-R2 as a Master DNS and how to set up Centos 6 as a slave DNS.

PRIMARY DNS NAME AND IP: AD1.SFENTONA.LOL  / 10.0.0.6
SLAVE   DNS NAME AND IP: DNS1.SFENTONA.LOL /10.0.0.10

Centos DNS CONFIG STEPS

———————————————————————————————————-
The following config files have been used in order to get DNS services up and running in Centos 6.

vi /etc/resolv.conf
nameserver 127.0.0.1
search sfentona.lol
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dns1.sfentona.lol
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:CA:90:ED
TYPE=Ethernet
UUID=49076518-17fb-4416-be14-de64aa36843a
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.0.0.10
NETMASK=255.255.255.192
GATEWAY=10.0.0.1
DNS1=127.0.0.1
DOMAIN="sfentona.lol"
vi /etc/named.conf

Under Options you will have to specify the IP address of your Centos DNS server and from which network you will accept queries.

listen-on port 53 { 127.0.0.1; 10.0.0.10; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; 10.0.0.10/26; };
//allow-transfer { 10.0.0.0/26; };
recursion yes;

Under Zones you will have to create your forward lookup and reverse lookup zones. Between the sections LOGGING and ZONE include the following lines. We are essentially telling to our Centos DNS service that it is of type slave and the IP of the master DNS. We are also telling where the location of the zone files will be located

/var/named/slaves

sfentona.lol.zone

zone "sfentona.lol" IN {
type slave;
masters { 10.0.0.6; };
allow-query { any; };
file "slaves/sfentona.lol.zone";
};

sfentona.lol.rr.zone

zone "0.0.10.in-addr.arpa" IN {
type slave;
masters { 10.0.0.6; };
allow-query { any; };
file "slaves/sfentona.lol.rr.zone";
};

 

 

Windows DNS CONFIG STEPS

———————————————————————————————————-

  • On your maind DNS properties settings tree check “Enable Bind Secondaries”
  • You will have enter as Name Server your Linux Server for both your Forward and Reverse Lookup zones.
  • On your DNS Zone (in this case sfentona.lol) under properties settings enable “Zone Transfer”. Specify your slave DNS or you can opt to update all available DNS servers. Make to do this for both your Forward and Reverse lookup zones for your Domain.
Share Button