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.

named/views/chroot

Discussion in 'General Discussion' started by valkira, Jul 17, 2007.

  1. valkira

    valkira Active Member

    Joined:
    May 3, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Croatia
    cPanel Access Level:
    Root Administrator
    Hi to all,

    I see a lot named problems in this forum lately, so here is one possible solution, all comments are welcome.

    I've recently installed 3-4 servers, all CentOS, all cPanel 11, all to be added to my existing DNS clusters with all the rest servers I have. And all had the same problems:

    1. not resolving localdomains, but doing recursive queries
    2. resolving everything, but when I create a new domain (or transfer from another server) not resolving that new domain
    3. all sorts of FAILED errors (OK, some of it were chmod related, i figured that out, but If you go to Nameserver Setup you do get rndc.key chmoded 0600 even if it was previously 0644)

    I've lost several days with this (not to mention other losses like hair, broken coffe cups etc :):) ) so I've just tried the following:

    1. made a backup of /etc/named.conf
    2. disabled ROOTDIR = /var/named/chroot in /etc/sysconfig/named
    3. removed: view "localhost_resolver", view "internal", view "external" parts from named.conf an left only the zone definitins
    4. opened named.conf from one of my other servers and added at the top of named.conf:
    Code:
    include "/etc/rndc.key";
    
    controls {
            inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
    };
    
    acl trusted {
            127.0.0.1;
            xxx.xxx.xxx.xxx;
            ... 
            ...
    };
    
    acl transfer {
            127.0.0.1;
            xxx.xxx.xxx.xxx; 
            ... 
            ...
    };
      
    //
    // named.conf for Red Hat caching-nameserver
    //
    
    options {
            directory "/var/named";
            dump-file "/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            allow-recursion { trusted; };
            version "[Secured]";
            allow-transfer {transfer;};
    };
    BTW this named.conf is explained on http://forums.cpanel.net/showthread.php?t=15922

    5. /scripts/restartsrv_named


    Now, everything is working top notch :cool:


    If anyone has additions, comments, pros/cons this solution, you're welcome...
     
Loading...

Share This Page