Install A Chrooted DNS Server (BIND9) wont work

Discussion in 'Server Operation' started by NukeZilla, Jan 9, 2011.

  1. NukeZilla

    NukeZilla New Member

    Hi

    Will i did the prefect server for centos 5.5 and i getting an error. it's using centos 5.5 64 bit and i did what it said..

    Code:
    yum install bind-chroot
    Code:
    chmod 755 /var/named/
    chmod 775 /var/named/chroot/
    chmod 775 /var/named/chroot/var/
    chmod 775 /var/named/chroot/var/named/
    chmod 775 /var/named/chroot/var/run/
    chmod 777 /var/named/chroot/var/run/named/
    cd /var/named/chroot/var/named/
    ln -s ../../ chroot
    cp /usr/share/doc/bind-9.3.6/sample/var/named/named.local /var/named/chroot/var/named/named.local
    cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
    touch /var/named/chroot/etc/named.conf.local
    vi /var/named/chroot/etc/named.conf
    Code:
    //
    // named.conf
    //
    // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
    // server as a caching only nameserver (as a localhost DNS resolver only).
    //
    // See /usr/share/doc/bind*/sample/ for example named configuration files.
    //
    options {
            listen-on port 53 { 127.0.0.1; };
            listen-on-v6 port 53 { ::1; };
            directory       "/var/named/chroot/var/named";
            dump-file       "/var/named/chroot/var/named/data/cache_dump.db";
            statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
            memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
            allow-query     { localhost; };
            recursion yes;
    };
    logging {
            channel default_debug {
                    file "data/named.run";
                    severity dynamic;
            };
    };
    zone "." IN {
            type hint;
            file "named.root";
    };
    include "/var/named/chroot/etc/named.conf.local";
    Code:
    chkconfig --levels 235 named on
    /etc/init.d/named start
    and i getting this error:

    /etc/init.d/named start

    Starting named: [FAILED]


    Here something you might need to know:

    [root@xpro-world named]# updatedb
    [root@xpro-world named]# locate named.conf
    /etc/named.conf
    /etc/named.conf.local
    /etc/dbus-1/system.d/named.conf
    /usr/local/ispconfig/server/conf/bind_named.conf.local.master
    /usr/local/ispconfig/server/conf/bind_named.conf.local.slave
    /usr/share/doc/bind-9.3.6/sample/etc/named.conf
    /usr/share/man/man5/named.conf.5.gz
    /usr/share/system-config-bind/profiles/default/named.conf
    /var/named/chroot/etc/.named.conf.swp
    /var/named/chroot/etc/named.conf
    /var/named/chroot/etc/named.conf.local

    and this

    [root@xpro-world ~]# updatedb
    [root@xpro-world ~]# locate named.root.hints
    /usr/share/doc/bind-9.3.6/sample/etc/named.root.hints



    i'm not sure if any of that is important but i really need help
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your logs? To which tutorial (URL) are you referring?
     
  3. NukeZilla

    NukeZilla New Member

  4. falko

    falko Super Moderator Howtoforge Staff

    What's in /var/named/chroot/etc/named.conf.local? Is SELinux disabled?
    What's the output of
    Code:
    netstat -tap
    ?
     
  5. NukeZilla

    NukeZilla New Member

    [root@xpro-world named]# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:mysql *:* LISTEN 27929/mysqld
    tcp 0 0 *:ftp *:* LISTEN 16179/pure-ftpd (SE
    tcp 0 0 *:imaps *:* LISTEN 25796/dovecot
    tcp 0 0 *:pop3s *:* LISTEN 25796/dovecot
    tcp 0 0 *:pop3 *:* LISTEN 25796/dovecot
    tcp 0 0 *:imap *:* LISTEN 25796/dovecot
    tcp 0 0 *:http *:* LISTEN 32276/httpd
    tcp 0 0 *:ftp *:* LISTEN 16179/pure-ftpd (SE
    tcp 0 0 *:ssh *:* LISTEN 25694/sshd
    tcp 0 560 xpro-world.com:ssh cpc11-mfld14:isoipsigport-2 ESTABLISHED 9840/0


    how ever i also tried did this


    tail -f /var/log/messages
    Jan 12 01:32:12 xpro-world named[22399]: using up to 4096 sockets
    Jan 12 01:32:12 xpro-world named[22399]: loading configuration from '/etc/named.conf'
    Jan 12 01:32:12 xpro-world named[22399]: max open files (1024) is smaller than max sockets (4096)
    Jan 12 01:32:12 xpro-world named[22399]: using default UDP/IPv4 port range: [1024, 65535]
    Jan 12 01:32:12 xpro-world named[22399]: using default UDP/IPv6 port range: [1024, 65535]
    Jan 12 01:32:12 xpro-world named[22399]: listening on IPv6 interface lo, ::1#53
    Jan 12 01:32:12 xpro-world named[22399]: listening on IPv4 interface lo, 127.0.0.1#53
    Jan 12 01:32:12 xpro-world named[22399]: could not configure root hints from 'named.root': file not found
    Jan 12 01:32:12 xpro-world named[22399]: loading configuration: file not found
    Jan 12 01:32:12 xpro-world named[22399]: exiting (due to fatal error)
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Can you post both your /etc/named.conf and your /var/named/chroot/etc/named.conf?

    What's the output of
    Code:
    updatedb
    locate named.root
    ?
     
  7. budim2010

    budim2010 New Member

    Sorry to interrupt this thread, but I also had similar problems.
    Bind9 failed to start.
    I'm following The perfect server FEDORA 10.

    Anybody can help ...??

    Thanks alot .

    my netstat -tap
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
    tcp        0      0 *:33929                     *:*                         LISTEN      1682/rpc.statd      
    tcp        0      0 *:mysql                     *:*                         LISTEN      2105/mysqld         
    tcp        0      0 *:sunrpc                    *:*                         LISTEN      1669/rpcbind        
    tcp        0      0 *:ssh                       *:*                         LISTEN      1993/sshd           
    tcp        0      0 localhost.localdomain:ipp   *:*                         LISTEN      2315/cupsd          
    tcp        0      0 *:smtp                      *:*                         LISTEN      2226/master         
    tcp        0      0 *:imaps                     *:*                         LISTEN      2158/couriertcpd    
    tcp        0      0 *:pop3s                     *:*                         LISTEN      2170/couriertcpd    
    tcp        0      0 *:pop3                      *:*                         LISTEN      2164/couriertcpd    
    tcp        0      0 *:imap                      *:*                         LISTEN      2151/couriertcpd    
    tcp        0      0 *:sunrpc                    *:*                         LISTEN      1669/rpcbind        
    tcp        0      0 *:http                      *:*                         LISTEN      2245/httpd          
    tcp        0      0 *:ssh                       *:*                         LISTEN      1993/sshd           
    tcp        0      0 *:smtp                      *:*                         LISTEN      2226/master         
    tcp        0      0 *:https                     *:*                         LISTEN      2245/httpd          
    
    
    
    my /etc/named.conf
    Code:
    //
    // named.conf
    //
    // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
    // server as a caching only nameserver (as a localhost DNS resolver only).
    //
    // See /usr/share/doc/bind*/sample/ for example named configuration files.
    //
    
    options {
    	listen-on port 53 { 127.0.0.1; };
    	listen-on-v6 port 53 { ::1; };
    	directory 	"/var/named";
    	dump-file 	"/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            memstatistics-file "/var/named/data/named_mem_stats.txt";
    	allow-query     { localhost; };
    	recursion yes;
    };
    
    logging {
            channel default_debug {
                    file "data/named.run";
                    severity dynamic;
            };
    };
    
    zone "." IN {
    	type hint;
    	file "named.ca";
    };
    
    include "/etc/named.rfc1912.zones";
    

    my /var/named/chroot/etc/named.conf
    Code:
    //
    // named.conf
    //
    // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
    // server as a caching only nameserver (as a localhost DNS resolver only).
    //
    // See /usr/share/doc/bind*/sample/ for example named configuration files.
    //
    
    options {
    	listen-on port 53 { 127.0.0.1; };
    	listen-on-v6 port 53 { ::1; };
    	directory 	"/var/named";
    	dump-file 	"/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            memstatistics-file "/var/named/data/named_mem_stats.txt";
    	allow-query     { localhost; };
    	recursion yes;
    };
    
    logging {
            channel default_debug {
                    file "data/named.run";
                    severity dynamic;
            };
    };
    
    zone "." IN {
    	type hint;
    	file "named.ca";
    };
    
    include "/etc/named.rfc1912.zones";
    
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Which tutorial (URL)? Do you get any error messages?
     
  9. budim2010

    budim2010 New Member

    Hi Falko, thanks for responding...

    I'm following http://www.howtoforge.com/perfect-server-fedora-10

    Here's the error :

    [root@mail budi]# /etc/init.d/named start
    Starting named: /usr/sbin/named: symbol lookup error: /usr/sbin/named: undefined symbol: isc_stats_dump
    [FAILED]


    And here's my log messages, I don't think it's related...

    Code:
    Jan 31 11:10:20 mail nm-system-settings: Loaded plugin ifcfg-rh: (c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1 ...
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh:     read connection 'System eth1'
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh: Ignoring connection 'System eth1' and its device because NM_CONTROLLED was false.
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh:     read connection 'System eth0'
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh: Ignoring connection 'System eth0' and its device because NM_CONTROLLED was false.
    Jan 31 11:10:21 mail nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
    
    
    
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Do you use ISPConfig 2? If so, what do you have in the fields named.conf and Zonefiles Dir. on the DNS tab under Management > Server > Settings?
     
  11. budim2010

    budim2010 New Member

    Nope, I'm following The perfect server Fedora 10 tutorial page 3.
    There's no such tab in my Fedora 10 server.

    I've run these commands in tutorial :

    But it ends up failed....
    I already disable Selinux and Firewall.
    any suggestions ??
     
  12. falko

    falko Super Moderator Howtoforge Staff

    The tutorial prepares the server for the installation of ISPConfig 2. If you let ISPConfig 2 manage your DNS zones, BIND will start.
     
  13. budim2010

    budim2010 New Member

    Ok, thanks for ur suggestion. But there's no ISpconfig 2 for Fedora 10, only ISpconfig 3.........
     
  14. falko

    falko Super Moderator Howtoforge Staff

Share This Page