MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: rsakhale 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
-
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:
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'.
-
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 : ;))
-
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.
-
@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/
-
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.
-
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'.
-
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'.
-
Previous Bind using primary/secondary term and then change to master/slave.
But, many providers still using primary/secondary term. I follow it.
-
@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:
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'.
-
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?
-
Make sure IP from 'secondary dns' server list in 'A record' for ns.
-
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.
-
@mustafa, should i go back to using DNS master on server2 with rsync (from server1) as i had before?
-
@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)
-
Yes, i understand that, but it seems it receives all the zones. But it seems they are not saved at server2.
I think it should be saved at /opt/configs/nsd/conf/slave, but i'm not sure.
So Kloxo-MR at server2 is supposed to create the zone defintions in /opt/configs/bind/conf/defaults/named.slave.conf?
I tried restart-dns, there is no difference since there is NO zone files at server2.
What do you mean by "make sure domain alteady listed in list.slave.conf"?
You probably mean listed in /opt/configs/bind/conf/defaults/named.slave.conf?
Do we need to do something manually first to get this working?
@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)
-
So Kloxo-MR at server2 is supposed to create the zone defintions in /opt/configs/bind/conf/defaults/named.slave.conf?
Yes.
-
Alright. Is the creation of slave zones triggered by zones transfers from master?
I.e when the DNS master transfers zones to slave/server2, Kloxo-MR understands it and runs /opt/configs/bind/tpl/list.slave.conf.tpl?
I don't understand why this shouldn't work. I suspect it's Kloxo-MR not working as it should. Bind seems to do it's work both master and slave, but Kloxo-MR obviously is not creating the slave zone files!
So Kloxo-MR at server2 is supposed to create the zone defintions in /opt/configs/bind/conf/defaults/named.slave.conf?
Yes.
-
Make sure add domain 'secondary dns' from client where locate to server2.
-
Sorry, i didn't understand this :-\
Make sure add domain 'secondary dns' from client where locate to server2.
-
Have you got "secondary dns" to work as slave DNS server with Kloxo-MR?
-
'Secondary DNS' available for all client. So, if we want domain in master also have 'secondary dns', select one of client where in slave server and click 'secondary dns'.
-
I see. But when you have 2 servers, say server1 (main Kloxo-MR server and DNS master) and server2 (Kloxo-MR server, but added to server1 in "Servers"), all clients are created ONLY at server1, but we can choose to have web, MySQL, mail and DNS at server2.
Now i add a client in server1 with web, MySQL and mail choosen at server2, but DNS will be local (server1).
When clients are added this way, they are NOT visible under clients in server2.
So i wonder how we can deal with "Secondary DNS" for this client in server2?
'Secondary DNS' available for all client. So, if we want domain in master also have 'secondary dns', select one of client where in slave server and click 'secondary dns'.
-
@mustafa, now i also tried to use the "DNS Servers" Under Servers for a client, by adding localhost and server2 (IP addr) as the DNS servers.
In the DNS template in server1, i have A record for ns1 and server1 IP and another A record for ns2 and server2 IP.
When i create a client using this setup, Kloxo-MR is behaving totally strange when it comes to handling DNS servers. First, when a domain in creating under this client, it's DNS record is only created in server2. Then when i create a subdomain, it gets added to server1 and server2. So now, server1 ONLY has DNS records for this sub domain, while server2 has for both main domain and subdomain! Very strange.
I want to have all on both servers.
And when i delete the domain, the DNS records in server2 is NOT DELETED, only in server1. What a TOTAL MESS this is.
Do you have any plans to fix this @mustafa, please? DNS is so critical when dealing with a control panel IMO.
I'm willing to contribute and donate to solving this issue and to create a fully working DNS master -master or master-slave setup.
-
I am not testing 'secondary dns' on master-slave but master-master. I am not sure what's happen for master-slave for 'secondary dns'.
-
Ok. Now i went back to using server2 as DNS master with rsync of zone files from server1.
It works ok for now.
I am not testing 'secondary dns' on master-slave but master-master. I am not sure what's happen for master-slave for 'secondary dns'.
-
I will try change 'secondary dns' based on server (it's make possible change target server).
-
Yeah, a master Kloxo-MR server with master DNS zones should not have "secondary DNS" right?
Anyway i'm very much interested to help you test/support/discuss to get this supported :)
I will try change 'secondary dns' based on server (it's make possible change target server).