Slave DNS installation

Discussion in 'Installation/Configuration' started by rj3k, Apr 7, 2011.

  1. rj3k

    rj3k New Member

    I followed the instructions on this link:
    Installation Of BIND As A Secondary (Slave) DNS Server On CentOS(http://www.howtoforge.com/installation-of-bind-as-a-secondary-slave-dns-server-on-centos)

    I created another slave DNS & here's the error I've got, I followed the intructions from 1 to 4.
    [root@localhost ~]# chmod 777 -Rvf /var/named/
    mode of `/var/named/' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/nanofibre.zone' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/data' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/slaves' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/doamin.zone' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/named' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/named/data' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/named/slaves' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/tmp' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/run' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/run/named' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/var/log' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/dev' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/dev/random' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/dev/zero' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/dev/null' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/etc' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/etc/localtime' retained as 0777 (rwxrwxrwx)
    mode of `/var/named/chroot/etc/rndc.key' retained as 0777 (rwxrwxrwx)
    [root@localhost ~]# service named restart
    Stopping named: [ OK ]
    Locating /var/named/chroot//etc/named.conf failed:
    [FAILED]

    Please help.



    Thank you
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /var/named/chroot/etc/
    ?
     
  3. rj3k

    rj3k New Member

    services already started

    Thank you Falco.

    I badly needed help about this slave DNS. Services is started. But I encounter these errors

    [root@localhost ~]# tail /var/log/messages
    Apr 19 15:54:40 localhost named[3920]: zone localhost/IN: Transfer started.
    Apr 19 15:54:40 localhost named[3920]: transfer of 'localhost/IN' from 192.168.0.1#53: connected using 192.168.0.3#51432
    Apr 19 15:54:40 localhost named[3920]: dumping master file: tmp-7V5A5wp2Ae: open: permission denied
    Apr 19 15:54:40 localhost named[3920]: transfer of 'localhost/IN' from 192.168.0.1#53: failed while receiving responses: permission denied
    Apr 19 15:54:40 localhost named[3920]: transfer of 'localhost/IN' from 192.168.0.1#53: end of transfer
    Apr 19 15:56:15 localhost named[3920]: zone now.com/IN: Transfer started.
    Apr 19 15:56:15 localhost named[3920]: transfer of 'now.com/IN' from 192.168.0.1#53: connected using 192.168.0.3#38039
    Apr 19 15:56:15 localhost named[3920]: dumping master file: /var/named/tmp-VLyh4TPkeW: open:permission denied
    Apr 19 15:56:15 localhost named[3920]: transfer of 'now.com/IN' from 192.168.0.1#53: failed while receiving responses: permission denied
    Apr 19 15:56:15 localhost named[3920]: transfer of 'now.com/IN' from 192.168.0.1#53: end of transfer

    Please help.Thanks
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Is SELinux disabled on both systems?
     
  5. rj3k

    rj3k New Member

    SELinux

    Hi Falco,

    How to verify that? Actually we have Primary & slave DNS already. Both are working fine. So this is a 3rd slave DNS. The reason for me to do this is I'm going to replace the 2nd slave. They are all CENTOS.
     
  6. rj3k

    rj3k New Member

    /etc/named.conf

    Here's my /etc/named.config

    //
    //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";

    /*
    * If there is a firewall between you and nameservers you want
    * to talk to, you might need to uncomment the query-source
    * directive below. Previous versions of BIND always asked
    * questions using port 53, but BIND 8.1 uses an unprivileged
    * port by default.
    */

    // query-source address * port 53;
    allow-transfer {208.99.198.184/32;};
    };

    //
    // a caching only nameserver config
    //

    controls {
    inet 127.0.0.1 allow { localhost; } keys { rndckey; };
    };

    zone "localhost" IN {
    type master;
    file "localhost.zone";
    allow-update { none; };

    };


    zone "now.com" IN {
    type slave;
    file "/var/named/now.zone";
    // allow-update { none; };
    allow-transfer { 192.168.0.1/32; };
    masters { 192.168.0.1; };
    };

    zone "0.168.192.in-addr.arpa" IN {
    type slave;
    file "/var/named/0.168.192.in-addr.arpa";
    // allow-update { none; };
    allow-transfer { 192.168.0.1/32; };
    masters { 192.168.0.1; };
    };


    include "/etc/rndc.key";


    I encounter this error when I do start the service named


    Error in named configuration:
    zone localhost/IN: loading master file localhost.zone: file not found
    _default/localhost/IN: file not found
     
  7. rj3k

    rj3k New Member

    /sbin/service named restart

    Stopping named: [ OK ]
    Starting named: [FAILED]


    I can't figure it out...Please Help...Thanks
     
  8. falko

    falko Super Moderator Howtoforge Staff

    What are the outputs of
    Code:
    getenforce
    on both systems?

    Do you use ISPConfig 3?
     
  9. rj3k

    rj3k New Member

    I just disable the firewall ip tables & it did works...

    Thank you falco. Will you be able to suggest a basic or important security on this DNS server?


    Thank you.
     
  10. rj3k

    rj3k New Member

    C:\Users\1>nslookup 192.168.0.4
    Server: UnKnown
    Address: 192.168.0.4

    *** UnKnown can't find 192.168.0.4: Non-existent domain


    here's when I tried in slave dns:

    [root@dns03 ~]# nslookup 192.168.0.4
    Server: 192.168.0.1
    Address: 192.168.0.1#53

    ** server can't find 4.0.168.192.in-addr.arpa.: NXDOMAIN

    But on the primary DNS shows name when I did this.
     

Share This Page