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 Box and 2 external DNS Server Setup ?

Discussion in 'Bind / DNS / Nameserver Issues' started by yongkyung, Oct 14, 2002.

  1. yongkyung

    yongkyung Registered

    Joined:
    Jan 16, 2002
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Ok, before I go off scouring the web for information on this, I thought I'd post and see if anybody has a similar setup, and would share their knowledge... Yeah..I'm being lazy.

    The setup:

    1 - Cpanel box
    2 - Seperate DNS boxes as ns1 and ns2 NOT running Cpanel

    What I need it to do:

    When I create an account in WHM it'll transfer and update the zone records for both the Master and Slave nameservers which are each on seperate boxes NOT running Cpanel.

    I currently have 2 cpanel boxes running ns1 and ns2 respectively... Pretty easy to get zones to transfer. Just not sure how to do it on two external dns boxes not running cpanel.

    Any insight or a hand held walkthrough would be greatly appreciated. Plus if you're ever in Chicago, I'll buy ya enough Tequila to drown an elephant. ;-)

    tia,

    Yong
     
  2. netarus

    netarus Well-Known Member

    Joined:
    Oct 27, 2002
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Any progress?

    yongkyung, any progress on this post?
     
  3. yong

    yong Registered

    Joined:
    Dec 11, 2001
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    NO Responses

    Nothing yet man.

    Starting the project in another week. Haven't really researched any further. Was hoping that somebody had a quick and easy walkthrough.

    Looks like I'll be hitting the Bind books for now. I'll post 'my' process after I've gotten it all working.

    peace,

    Yong
     
  4. ivanoats

    ivanoats Member

    Joined:
    Feb 20, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Seattle, Washington, United States
    Did you figure this out?

    I'd be really interested in your solution for this if you have one. Thanks!
     
  5. ldm

    ldm Registered

    Joined:
    Sep 11, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I tried to do a similar setup - with the cPanel free DNSONLY being used for a DNS, however for some reason it's refusing to connect, even though I did everything according to the cPanel's documentation.

    I don't think it will work with BIND alone because you need to create the slave zones configs for each primary domain zone created at the cPanel, something BIND won't do on it's own - cPanel's DNSONLY is supposed to do exactly that.

    Otherwise you need a custom script that will create these zones for BIND.
     
  6. MrHits

    MrHits Well-Known Member

    Joined:
    Oct 31, 2001
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    i've been doing this for years....

    1) create an include file for servername.zones

    2) put this script in /var/named/zones.pl
    #!/usr/bin/perl

    my $outfile ="/var/named/servername.zones";
    my @files = glob("/var/named/*");
    open (OUTFILE, ">$outfile");
    foreach my $file (@files)
    {
    $file =~ s/\/var\/named\///;
    my ($file_wo_ext) = ($file =~ /^(.+?)\.db$/);
    unless ($file_wo_ext eq "")
    {
    #print OUTFILE join("\t", ('zone ', $file_wo_ext, "SERVERNAME/$file")).

    print OUTFILE "zone \"$file_wo_ext\" \{
    type master\;
    file \"\/var\/named\/colo3\/$file\"\;
    \}\;\n
    ";
    }
    }
    close(OUTFILE);


    3) make a rsyn script to sync the /var/named folder to the include folder on /var/named/SERVERNAME/

    your /etc/named/conf file will include the files in your /var/named/SERVERNAME/servername.zones files

    bada bing..... the reason why I put SERVERNAME is because I have a lot of servers...so be sure to replace SERVERNAME with the servername (only part far left to the octet..so server5.yourdomain.com would be server5)
     
    #6 MrHits, Sep 13, 2010
    Last edited: Sep 13, 2010
  7. MrHits

    MrHits Well-Known Member

    Joined:
    Oct 31, 2001
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    oh ya..and it should be noted...i recently switched to using the cpanel only dns setup with clustering..... I like it a lot.. any reason why you don't want to use it? its free!
     
Loading...

Share This Page