Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-16, 20:28:25

Author Topic: Setting up multiple DNS server  (Read 9779 times)

0 Members and 1 Guest are viewing this topic.

Offline rsakhale

  • Valuable Member
  • *
  • Posts: 103
  • Karma: +1/-0
  • Gender: Male
  • Rohan Sakhale
    • View Profile
    • Rohan Rajan Sangita Sakhale
Setting up multiple DNS server
« on: 2017-05-02, 09:05:15 »
Dear Mustafa,

Could you please help understand or redirect to proper documentation that helps understand how can we achieve multiple DNS server.

Also, will Master/Slave functionality help achieve multiple DNS servers?

Regards
Rohan

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Setting up multiple DNS server
« Reply #1 on: 2017-05-02, 09:25:17 »
Let say you have server1 (IP 111.111.111.111) and server2 (IP 222.222.222.222) and domain.com.

In server1, set dns as:
Code: [Select]
ns1 IN A 111.111.111.111
ns2 IN A 222.222.222.222
__base__ IN NS ns1.domain.com.
__base__ IN NS ns2.domain.com.

and then in server2, go to 'admin > secondary dns' and add 'Primary IP' as '111.111.111.111' and 'Domain' ad 'domain.com'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #2 on: 2017-05-02, 23:25:05 »
Problem is, the ns2.domain.com will be useless for all the zone records you add to server1.
We need a way to sync the zone records from server1 to server2. I'm using simple rsync for that.

@mustafa, again, we need a wiki for this. If you are not interested or see how useful a wiki is, i'll create one to help users + to have it as a documentation for myself :  ;))
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Setting up multiple DNS server
« Reply #3 on: 2017-05-03, 06:42:06 »
No, if you set ns2 to IP from other server, dns server in Kloxo-MR will be notify to this other server (after you add domain via 'secondary dns' in other server).

Remember, only bind, nsd and pdns can handle 'dns clustering'.

In your situation, try 'sh /script/restart-dns' in server1 dan then the same way in server2.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline rsakhale

  • Valuable Member
  • *
  • Posts: 103
  • Karma: +1/-0
  • Gender: Male
  • Rohan Sakhale
    • View Profile
    • Rohan Rajan Sangita Sakhale
Re: Setting up multiple DNS server
« Reply #4 on: 2017-05-03, 07:17:06 »
@mustafa, again, we need a wiki for this. If you are not interested or see how useful a wiki is, i'll create one to help users + to have it as a documentation for myself :  ;))
Even I am interested in documenting for Kloxo-MR, had already began it for myself available at https://notes.saiashirwad.org/Kloxo-MR/

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #5 on: 2017-05-03, 10:19:48 »
Oh so Kloxo-MR actually supports  DNS slaves in the right way. I wasn't aware of that.

Does it mean we can add more slaves by adding Kloxo-MR servers and using "secondary dns"?



No, if you set ns2 to IP from other server, dns server in Kloxo-MR will be notify to this other server (after you add domain via 'secondary dns' in other server).

Remember, only bind, nsd and pdns can handle 'dns clustering'.

In your situation, try 'sh /script/restart-dns' in server1 dan then the same way in server2.
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Setting up multiple DNS server
« Reply #6 on: 2017-05-03, 10:28:29 »
Idea for 'secondary dns' is make possible Kloxo-MR 7.0 as 'secondary dns' from 'primary dns'. You can use other panel (like CPanel) as 'primary dns'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #7 on: 2017-05-03, 11:27:53 »
Ah ok. Then it means, as far as i understand based on what you write @mustafa and without any testing so far, the "secondary dns" is a straight DNS slave getting zone files from the master via inotify.
"secondary dns" is quite confusing here!

I think you can consider changing ""secondary dns"  to something like "DNS slave" if it doesn't break anything @mustafa. IMO, such is important to promote Kloxo-MR so that users/reviewers/future potential users dont' get confused and actually see that Kloxo-MR supports DNS slaves :) This a big feature IMO!  8)


Yes, i'm aware i can simply use other DNS server to rsync the zone files and make them master DNS servers.

But my question is, if i install 2 more Kloxo-MR instances, they can all act like slaves (secondary dns) right?
Given i configure master with ns2, ns3 etc with correct IPs ofc :)
 




Idea for 'secondary dns' is make possible Kloxo-MR 7.0 as 'secondary dns' from 'primary dns'. You can use other panel (like CPanel) as 'primary dns'.
« Last Edit: 2017-05-03, 11:33:52 by fossxplorer »
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Setting up multiple DNS server
« Reply #8 on: 2017-05-03, 13:05:49 »
Previous Bind using primary/secondary term and then change to master/slave.

But, many providers still using primary/secondary term. I follow it.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #9 on: 2017-05-05, 10:00:38 »
@mustafa,
i just changed my server1 and server2 with such a setup, and i can see the notify in the logs of both servers.
But where are slave saving the config files as i don't see any?



On slave, the file is empty:
[root@kloxomrc7_01 bind]# cat conf/defaults/named.slave.conf
[root@kloxomrc7_01 bind]#


Also, before this change, i had rsynced all the Bind and Nsd config from master to "slave" to have "slave" serve all the zones as master.
So right now, the DNS sec keys are the same on slave. Should i delete the config files of Bind and Nsd and reinstall Bind and nsd?




[root@kloxomrc7_01 bind]# ll /opt/configs/nsd/conf/slave/
total 0
[root@kloxomrc7_01 bind]#



Let say you have server1 (IP 111.111.111.111) and server2 (IP 222.222.222.222) and domain.com.

In server1, set dns as:
Code: [Select]
ns1 IN A 111.111.111.111
ns2 IN A 222.222.222.222
__base__ IN NS ns1.domain.com.
__base__ IN NS ns2.domain.com.

and then in server2, go to 'admin > secondary dns' and add 'Primary IP' as '111.111.111.111' and 'Domain' ad 'domain.com'.
« Last Edit: 2017-05-05, 10:17:07 by fossxplorer »
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #10 on: 2017-05-05, 11:16:51 »
At the slave i see:
received notify for zone 'sub.domain.com': not authoritative
It's probably due to lack of the slave zone file which is lacking from /opt/configs/bind/conf/defaults/named.slave.conf.
There is nothing there now.

How does Kloxo-MR handle notify messages coming from master to slave?
I see the code here: cat /opt/configs/bind/tpl/list.slave.conf.tpl, but when is this triggered?
Also as i said, there is NOTHING in /opt/configs/nsd/conf/slave. Should the slave zones be automatically created after notification from master?

« Last Edit: 2017-05-05, 11:43:33 by fossxplorer »
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Setting up multiple DNS server
« Reply #11 on: 2017-05-05, 13:06:24 »
Make sure IP from 'secondary dns' server list in 'A record' for ns.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #12 on: 2017-05-05, 13:38:18 »
I have :
    __base__    NS    -    ns2.domain.com
    ns2    A    -    222.222.222.222


That should be enough i guess?   


Make sure IP from 'secondary dns' server list in 'A record' for ns.
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Setting up multiple DNS server
« Reply #13 on: 2017-05-05, 16:52:28 »
@mustafa, should i go back to using DNS master on server2 with rsync (from server1) as i had before?


« Last Edit: 2017-05-05, 16:57:13 by fossxplorer »
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Setting up multiple DNS server
« Reply #14 on: 2017-05-05, 17:05:48 »
@mustafa, should i go back to using DNS master on server2 with rsync (from server1) as i had before?
Request from server2 only work after dns full propagation. But, you can try 'sh /script/restart-dns' in server2 (make sure domain alteady listed in list.slave.conf)
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix

Page created in 0.041 seconds with 21 queries.

web stats analysis