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 & Trustix & nameservers

Discussion in 'Bind / DNS / Nameserver Issues' started by fjones, Mar 9, 2005.

  1. fjones

    fjones Member

    Joined:
    Jan 30, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    A couple of questions regarding Trustix and Cpanel.

    I've played with a trial and then bought CPanel/Trustix. Things are mostly ok. I am having some problems and concerns regarding named as I've had a few problems and it appears that CPanel does not like/use/understand "views" in the named.conf file.

    My server is on subnet A and I have other redhat/trustix boxen on the same subnet at my co-lo. When I configured the nameserver on the trustix/cpanel box (Only used the WHM/CPanel interface for configuration) all seemed to go well. I found out though that when using dig to query a domain configured on the CPanel box from another box on the same subnet (A) I would not get a valid response from the Cpanel box. If I did the same query from my home and query the CPanel box directly I got a valid response. Example query: "dig www.foo.com @mycpanel.ip"

    Wrote that up as Cpanel not dealing well with Trustix's chrooted/view configured setup.

    I then proceeded to setup a second Trustix box and install the DNS only cpanel. That went ok, but it was odd to find that imap/pop/spamassasin were also installed. Got past that since I'm concentrating on DNS and setup clustering with my cpanel box being the master and the dns only box being slave. Created a new account on the Cpanel box and the system appeared to sync the DNS zones without problem. I then found that named was not running on the dns only box. Tried to start it and it bombed out. Edited /etc/named.conf to point to the correct location for named.ca and then named bombed out again with permission denied on named.pid. Added a "options" section to the named.conf file to specify location of named.pid
    and bind started.

    So I end up with a DNS only box I have to hack at the config to get going and a CPanel box with views in the named.conf file that somewhat break things. It's worth mentining that the name.conf file on the dns only install does not have any "views" in it.

    As this is a non-production system at the moment I was wondering what is the final word on Trustix and Cpanel and DNS?

    I've read through the forum posts and found that folks have hacked out the views but left the chaos stuff alone. Since this was on a fresh install and I'm willing to reinstall what is the "correct" way to install Trustix/Cpanel and a dns only cpanel box?


    I decided to play around a bit more and seeing references to scripts in the /scripts directory I ran a few of the fix dns related scripts. I ended up with a named.conf on the Cpanel primary server that had "views" but everyting was ripped out of them and the domains I'd created were placed at the end of the file outside of the "views". I then created a new account/domain and it placed the zone inside the "external" view and not at the end of the file with the rest of the domains.

    I then clicked on "Synchronize DNS Records | Synch All" and logged into the dns only box. I found that Domain #1 I created has a domain1.db file in /var/named and /var/named/master and that domain #2 and Domain #3 have their xxxx.db files located
    in /etc/namedb. Strange. Domain 1 resolved fine, domain 2 and 3 no longer resolve fine.

    I'm going to blow everything up now and start over paying very close attention to what I do. I know I can hack the files by hand and make it work but that shouldn't be necessary. Is there a procedure I'm missing here?

    Any help/comments are appreciated.
     
  2. flash7

    flash7 Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    Well, I've the same problem with my 2 DNS servers.

    cPanel Inside :p
     
  3. fjones

    fjones Member

    Joined:
    Jan 30, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Here is what I've done to fix it so far.

    Opened support ticket. They wanted me to backup then delete /etc/named.conf and run "/scripts/rebuildnamedconf >> /etc/named.conf". I ended up with an empty /etc/named.conf file.

    So I poked around and decided to do the following (on both servers):

    1) I deleted the named.conf file
    2) I ran /scripts/fixndc
    3) Added the following to /etc/named.conf

    options {
    pid-file "/var/run/named/named.pid";
    };

    It's about the most minimal named.conf file you can get but it allows named to start.

    I then enabled clustering between the primary and secondary, created accounts and both nameservers now load and resolve.

    Also added a logging section back into named.conf and only allow transfers from localnets.

    Hope this helps. I'll post my named.conf file if you need me to. No guarantees's this won't break anything for you as I'm a CPanel newbie. I'm familiar with linux but no super guru, fortuanately I've got a buddy who is a linux guru helping me out.

    Regards,

    fj
     
  4. crackdom

    crackdom Registered

    Joined:
    Jun 19, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi fj,

    I am having the same problem. I am okay on unix but I am not that good with dns stuff. I have followed you steps but it would be really cool if you could post your named.conf file, so that I can check I have got all the neccessary bit.

    thanks in advance

    cd
     
  5. fjones

    fjones Member

    Joined:
    Jan 30, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    ----------------------------------------------------------------------
    cat /etc/named.conf
    key "rndc-key" {
    algorithm hmac-md5;
    secret "thisismysecret";
    };

    controls {
    inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
    };

    options {
    directory "/var/named";
    pid-file "/var/run/named/named.pid";
    };


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


    zone "xxxyyyzzz.com" {
    type master;
    file "/var/named/xxxyyyzzz.com.db";
    };
    --------------------------------------------------------------------

    This is what's in mine. I changed a few things (domain name & secret key) and removed all the domains but one example. Don't know if what's there is correct but it's what I have been running now for a few months. The Trustix folks are useless. Basically as stripped down a config as it gets.

    Regards,

    fj
     
Loading...

Share This Page