Use your DirectAdmin with Cpanel DNSONLY

vall

New member
Joined
May 30, 2010
Messages
3
Hello people,

I wanted to use my Cpanel DNSONLY servers with DirectAdmin and Cpanel so i made a modified version of master2slave.

I believe in sharing with others so here it is .

The following script is derived from master2slave, I just modified so that you can use Cpanel DNSONLY servers with your DirectAdmin and Cpanel

Make sure you read the README file and you should be ok, but if you get into problems just ask here and i will reply.

You can download the archive from http://www.hostbull.net/downloads/master2slave-0.1.4-RC6.tar.gz

Have a nice day :)
 
Is there a reason why the original didn't work with cPanel DNSONLY serves? It was written to work with generic DNS, independent of any control panel.

We've successfully installed it on Plesk and Cobalt servers, as well as on generic DNS servers, but we've never tried it on cPanel.

The only difference I've found based on the README.txt file is the allowance for using views, it should work for any server using Views.

I'm presuming that you've not hijacked the license, and that I can use your code in fuure revisions. If this is incorrect, please post to let me know.

Thanks.

Jeff
 
Hello,

Maybe you understood me wrong, using master2slave (the modified version) you can create a DNS cluster made of 1 (or more ) Cpanel DNSONLY server + 1 (or more) DirectAdmin server.

And there are some differences between a BIND installed by DirectAdmin and Cpanel, the main one would be the usage of views in Cpanel and Directadmin is using directly the zones.

I haven't hijacked the license in any way you can use the code as you wish is still the same license.

My modifications are just a few, i tried different approaches for 2 days till I managed to make this work using the views mode. This way nothing is broken and no DNS errors appear like : Lame server, Recursion, or any other.

The purpose of this script is to allow you to make a cluster no matter what you use (DirectAdmin or Cpanel/Cpanel DNSONLY)

If you have questions ask freely . :)
 
Thanks very much for this contribution, i'm just looking for this... I'm going to try.

Greetings...
 
I'm getting this permission denied when i run the test in the slave server...

any idea??

Thanks!!


root@ns1 [/home/namedftp]# su - namedftp -c './getmaster2slave.dns.sh'
Server: xx.xx.xx.xx
mkdir: `/var/named/slaves/namedftp/xx.xx.xx.xx': Permission denied
-------------------------

thank you.. goodbye
mode of `/home/namedftp/zones/slaves.named.conf' changed to 0644 (rw-r--r--)
./in.sh: line 76: /etc/named.conf: Permission denied
Working...
./in.sh: line 76: /etc/named.conf: Permission denied
Done!
root@ns1 [/home/namedftp]#


I dont stand this..

5) Configure the line number for the external and internal views in named.conf
# nano /etc/named.conf
# Go to "view internal" and go the a blank line after all the comments use ctrl+c to see the line number
# Go to "view external" and repeat the step above.
# Go and edit getmaster2slave.dns.sh and edit the values 91(internal view) and 410(external view) if they dont match for your named.conf

can you explain me to do exactly in this step?

Thanks!!
 
Last edited:
Thanks jlasman for your response and help!!

Code:
mkdir: `/var/named/slaves/namedftp/xx.xx.xx.xx': Permission denied

I solved this... a problem with permisions.
Now is OK.

Code:
root@ns1 [/var/named/slaves]# ls -l
total 20
drwxrwx--- 3 named    named  4096 Jun  5 04:23 ./
drwxrwxr-x 5 root     named 12288 Jun  5 21:15 ../
drwxrw-rw- 3 namedftp named  4096 Jun  6 01:29 namedftp/
root@ns1 [/var/named/slaves]# cd namedftp/
root@ns1 [/var/named/slaves/namedftp]# ls -l
total 12
drwxrw-rw- 3 namedftp named 4096 Jun  6 01:29 ./
drwxrwx--- 3 named    named 4096 Jun  5 04:23 ../
drwxrw-rw- 2 namedftp named 4096 Jun  6 01:29 xx.xx.xx.xx/
root@ns1 [/var/named/slaves/namedftp]#


===============

But i continue with this issue:


Code:
root@ns1 [/home/namedftp]# su - namedftp -c './getmaster2slave.dns.sh'
Server: xx.xx.xx.xx
-------------------------

 thank you.. goodbye
mode of `/home/namedftp/zones/slaves.named.conf' changed to 0644 (rw-r--r--)
./in.sh: line 76: /etc/named.conf: Permission denied
Working...
./in.sh: line 76: /etc/named.conf: Permission denied
Done!
root@ns1 [/home/namedftp]#


I think the problem is in the step 5... but i'm not sure

Code:
nano /etc/named.conf

Code:
view "internal" {
/* This view will contain zones you want to serve only to "internal" clients
   that connect via your directly attached LAN interfaces - "localnets" .
 */
    match-clients        { localnets; }; [B]<== this is the line 72[/B]
    match-destinations    { localnets; };
    recursion yes;

    zone "." IN {
        type hint;
        file "/var/named/named.ca";
    };

Code:
view    "external" {
/* This view will contain zones you want to serve only to "external" clients
 * that have addresses that are not on your directly attached LAN interface sub$
 */
    recursion no; [B]<== this is the line 1212[/B]
    // you'd probably want to deny recursion to external clients, so you don't
    // end up providing free DNS service to all takers

    // all views must contain the root hints zone:
    zone "." IN {
        type hint;
        file "/var/named/named.ca";
    };


In the master (DirectAdmin server)

Code:
# nano /etc/named.conf

Code:
        allow-transfer { IP-of-ns1; IP-of-ns2 };
        allow-recursion { localnets; };

Any idea?? Thanks!!!
 
Looking in /etc/named.conf I see the zone is created OK


Code:
zone "domain.com" {
        type slave;
        file "/var/named/slaves/namedftp/xx.xx.xx.xx/domain.com.db";
        masters { xx.xx.xx.xx; };
        };


but this directory is empty :(

Code:
root@ns1 [/var/named/slaves/namedftp/xx.xx.xx.xx]# ls
./  ../
root@ns1 [/var/named/slaves/namedftp/xx.xx.xx.xx]#



In the step 6 you say:

6) Edit & configure sortdomains.pl for sendmail location.


but this file dont exist... are you sure is not a bug??
 
Last edited:
I don't know how that error crept into the file. The name of the file to change is not sortdomains.pl, but rather checkdomains.pl.

Jeff
 
Download link does not work, can you please share the archive again?
Anyone has an alternative for cPanel DNS Only / DA DNS Cluster, please advise.
 
Last edited:
I'd be happy to fix mine to work with cPanel but I'd need access to TWO cPanel-equipped VPS servers. And I don't want to pay for them :).

Jeff
 
Back
Top