Cpanel/WHM and updating name servers

nyjimbo

Well-Known Member
Jan 25, 2003
1,136
1
168
New York
Ok, I am confused on how Cpanel can make updates to name servers. Here is my situation and questions if anyone can help me.

I run a small web hosting company, we have 1,100 accounts and do our own dns. So we have several thousand entries in our named.conf files on both dedicated name servers. These are normally updated manually and named is restarted manually to refresh.

We are now in the process of putting up Cpanel on our hosting servers and as everyone knows Cpanel offers updates and additions to db records of name servers so if a user wants to change or add some domain name or a A or MX record they can do so.

Questions:

1) Can a Cpanel enabled hosting server talk to a non-Cpanel dns system and update its named.conf files and restart named ?

2) Since you need TWO name servers to register a domain name with most registrars, if you CANNOT update a non-Cpanel nameserver does this mean you need TWO Cpanel enabled servers, one to act as primary dns and one to act as secondary dns ?

3) If you DO have to have two Cpanel servers and one acts as a master for dns and the other acts as a slave. If I add an hosting account to the &slave& server and a customer makes an update, where does the dns update go to?. Does it propagate to the &master& server and then come back to the slave?.

I may be wrong but I think there is little info on how this whole magical dns thing works with Cpanel and there should be more info for those of us who already have large dns servers and would like to know if we can use them for Cpanel updates.

Anyone have any answers, guidance or docs on in depth info on this stuff. (Please dont tell me to get the OReilly DNs & Bind book, I do dns 24 hours a day so I am very familiar with it).
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,136
1
168
New York
Well, I got something done, but not sure if it will work in the long term.

I first had to turn off Challenge authentication on one of the name servers SSHD since it was requesting Skeys from the Cpanel server. So with that done I was able to make the &trust&.
I kept getting this &Skey Password xxx nsxxxx ext& when doing the &establish trust& and it seems that if the ssh client can do Skeys it will require that with the SSHD host.

Next I made our regular dns server the master in the cpanel system and made the local cpanel the slave.

Upon adding an account it did (somehow, maybe NDC) created a 'named.conf' on the non-cpanel name server (/etc/named.conf) and then created the domain record in /var/named. Normally our dns servers put them as /etc/namedb/named.conf and /etc/namedb/masters or /etc/namedb/slaves depending
on if its a master or slave system.

Whats interesting is that it was able to restart the dns on the non-cpanel server so:

1) All I have to do is do an include on the main named.conf (/etc/namedb/named.conf) to include /etc/named.conf so that
when namedb restarts it will suck in the cpanel-edited named.conf and therefore allow for the db records hiding in the alternate db storage area (/var/named/*) as well as use the db records we manually create (/etc/namedb/masters/*)

2) If I can change the filename of the new named.conf to something like named.panel and make the cpanel sofware/scripts deal with that then I will not likely delete it on the true dns server as if I see multiple &named.conf& files in different dirs its likely I will delete what I dont think is needed and that would kill the cpanel create domain names.

3) It seems that when you add/remove accounts, the cpanel system tries to run scripts. I dont know if it does it via a remote command OR if it does it via SSH, but things like /scripts/zoneexists fails as it doesnt exist on the true dns server. I have to see if copying the scripts over to the dns server will allow the functions to work even though that system is not running cpanel.

Too much to type, but when i am done AND if it works I will create a &how to& so newbies like me will be able to (if possible) run cpanel on hosting machines and send all the dns to primary and secondaries that are totally Cpanel unaware.