Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

editing dns zone manually.

Discussion in 'Bind/DNS/Nameserver' started by p_s_p, Dec 25, 2005.

  1. p_s_p

    p_s_p Member

    Joined:
    Feb 8, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    151
    Hello,
    Can someone guide me to resolve the following problem or guide to the appopriate forum, link or url? Here's what I want to do?

    I have my primary & secondary dns hosted on the cpanel servers all my linux servers use these dns successfully without any problems. I also have a window server with Plesk control panel. I want my windows to use the nameservers that are hosted on the cpanel server. Presently I am adding the zones for the domains that I create on the windows server through whm with the IP of windows server and site starts resolving successfully.

    The problem now starts when any user adds or removes subdomains to the plesk server, the dns on the cpanel server need to be modified manually through whm. I want to automate this process. I found the script "adddns" using which I can add new dns zone successfully from the command line, but I am not able to find the script that is actually used for "Editing" the dns zone. Can anyone please let me know what script is used when "Edit DNS Zone" link is clicked in WHM and what parameters are passed to it?

    I know this sounds quite strange, but the advantage of doing this are :
    1. I will not have to get other nameservers.
    2. I can move the accounts freely across the network.

    Thanks!
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,755
    Likes Received:
    87
    Trophy Points:
    353
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    edit zone script is coded into cpanel you can't view it
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    166
    Wildcard A record. Then the only time someone would need to manually change the zone is if the specific A record doesn't point to the same IP.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. p_s_p

    p_s_p Member

    Joined:
    Feb 8, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    151
    Thanks fwwebs, this can be a better solution, but this would mean that I will have to modify the default zone template, hence the wildcard will get applied even for the domains hosted on the linux servers. Moreover after adding the wildcard even non-existing subdmains would be shown as resolving, for eg. doesnotexist.mydomain.com would even resolve to mydomain.com even when there is no 'doesnotexist' -- will it not?

    I know that when "Edit DNS ZONE" is clicked it internally calls /usr/local/cpanel/whostmgr/bin/whostmgr ./editzone but I dont now what command line pararmeters are to be passed over here.
     
  5. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    166
    They're variable, because the zone is rewritten each time, so each record has it's own variables.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice