Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Master-Slave DNS  (Read 2692 times)

0 Members and 1 Guest are viewing this topic.

Godwin

  • Guest
Master-Slave DNS
« on: December 15, 2014, 07:08:30 pm »
These are the steps to configure a master-slave DNS

Master : 192.30.164.122
Slave: 216.224.181.98


MASTER
-------------

>> yum install bind [ to install bind software ]
>> vim "/etc/named.conf" : Add the following lines
acl "trusted" {
192.30.164.122; #ns1
216.224.181.98; #ns2
};

options {
listen-on port 53 { 192.30.164.122; };

> Below allow-query
recursion yes;
allow-recursion { trusted; };
allow-transfer { none; };
forwarders {
8.8.8.8;
8.8.4.4;
};



> At the bottom

zone "goddu.com" {
type master;
file "db.goddu.com";
allow-transfer { 216.224.181.98; };
};


>> :wq

>> vim "/var/named/db.goddu.com" : Enter the following

$TTL 1D


@ IN SOA ns1.goddu.com. admin.goddu.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum

IN NS ns1.goddu.com.
IN NS ns2.goddu.com.

ns1.goddu.com. IN A 192.30.164.122

ns2.goddu.com. IN A 216.224.181.98


>> :wq

>> change nameserver to VPS IP

SLAVE
---------

>> ssh to slave VPS
>> vim "/etc/named.conf" : Add the following lines

    zone "goddu.com" {
    type slave;
    file "db.goddu.com";
    allow-transfer { 192.30.164.122; };
    masters { 192.30.164.122; };
    };
>> :wq

>> service named restart
>> dig ns1.goddu.com
>> dig ns2.goddu.com


NB: Make sure that the /var/named has got writing permission.If not, give permission using chmod command.