The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cpanel Dnsonly sync problem

Discussion in 'Bind / DNS / Nameserver Issues' started by jameshsi, Mar 29, 2009.

  1. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Hi!
    I use my script to create DNS zone files, why ? Cause I got some domains not in the server but I have to provide them DNS services, now, I try to use DNSonly and I found it seems only good for the domain is hosting on the server.

    Is there any API or /scripts/xxx.pl to let me change the zone files and it will also sync to the dnsonly servers ?

    Regards,

    James
     
  2. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
  3. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Anyone knows ?
     
  4. bigste

    bigste Member

    Joined:
    Jan 6, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cheshire, UK
    couldn't you just create accounts for these domains even though they don't live on your server. Then you could edit their Zones files to reflect where they do live.
    How many of these domains do you have?
     
  5. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    More than 1 thousand. :)
     
  6. acenetryan

    acenetryan Well-Known Member
    PartnerNOC

    Joined:
    Aug 21, 2005
    Messages:
    197
    Likes Received:
    1
    Trophy Points:
    18
    The cPanel API is a very handy tool for performing cPanel requests outside of the cPanel interfaces themselves. PHP is my language of choice and with a little coding, you can easily write a script to take your DNS modifications and mimic them to your server and cluster. Honestly, I don't know if there is an API call to the server which will automatically sync the DNS zone with the slave cluster. If not, you can just mimic the editdns API call to those servers as well within your script.

    Here are some of the helpful links I keep handy for when I want to go making API calls.

    http://www.cpanel.net/plugins/xmlapi/
    http://forums.cpanel.net/showthread.php?t=76995
    http://forums.cpanel.net/showpost.php?p=322538&postcount=6
    http://us2.php.net/manual/en/book.xml.php
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Zones added via the 'Add a DNS Zone' function with WHM will be synced in a cPanel DNSONLY environment.

    There is an XML API call for this, which you could use to add the Zones. If you go this route, you'll need to remove the zones from named.conf and /var/named before hand ( making backups of course ).

    Another quicker way that might work, but is untested and unrecommended, is to add the zone name ( e.g. example.com ) to root's user file in /var/cpanel/users. In the format DNS#=example.com where the # is an incremented number. That should create the ownership and necessary link within the product for them to be synced into the cluster.
     
Loading...

Share This Page