bind9 problems

Discussion in 'Server Operation' started by x-spirit, Mar 5, 2009.

  1. x-spirit

    x-spirit New Member

    I have several questions,
    firstly how can I generate a full log on bind9 somewhere?
    I've tried the logging clause but it seems I wasn't able to figure it out.
    Tt this moment it looks like this:
    Code:
    logging {
            channel default_debug {
                    file "/var/log/bind.log";
                    print-time yes;
                    print-category yes;
                    print-severity yes;
                    };
            category queries { default_debug; };
            category network { default_debug; };
    };
    
    I'm trying to access log files in order to understand why my bind9 is not working. When I try to resolve something a 'timed-out' request comes back.
    I've transfered zones from an old server and configured them carefully. I don't know where the problem is.. Can someone help ?
     
  2. topdog

    topdog New Member HowtoForge Supporter

    timeout usually means the packets are either not getting to the destination or not returning.
     
  3. x-spirit

    x-spirit New Member

    So.. can you suggest where to start traceing the problem.
    Becouse I don't have logs either. /var/log/syslog and /var/log/messages are silent about problems with the bind..
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Which distribution are you using? How exactly did you set up BIND? Is it running chrooted?
     
  5. x-spirit

    x-spirit New Member

    a fresh installation of debian lenny, yes, it is chrooted
     
  6. chipsafts

    chipsafts New Member

    firewall setup ?
     
  7. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Yes, could be the firewall. What's the output of
    Code:
    iptables -L
    ?

    How exactly did you install BIND?
     
  8. x-spirit

    x-spirit New Member

    apt-get install bind :)
    and I haven't set a firewall yet, the ipchains are empty.
     
  9. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ?
     
  10. x-spirit

    x-spirit New Member

    Code:
    ns:/home/x-spirit# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:imaps                 *:*                     LISTEN      8165/dovecot
    tcp        0      0 *:pop3s                 *:*                     LISTEN      8165/dovecot
    tcp        0      0 *:ldap                  *:*                     LISTEN      2762/slapd
    tcp        0      0 localhost:10024         *:*                     LISTEN      2587/amavisd (maste
    tcp        0      0 localhost:10025         *:*                     LISTEN      7997/master
    tcp        0      0 localhost:mysql         *:*                     LISTEN      2653/mysqld
    tcp        0      0 *:pop3                  *:*                     LISTEN      8165/dovecot
    tcp        0      0 *:imap2                 *:*                     LISTEN      8165/dovecot
    tcp        0      0 *:sunrpc                *:*                     LISTEN      2292/portmap
    tcp        0      0 ns.refer.bg:domain      *:*                     LISTEN      13084/named
    tcp        0      0 localhost:domain        *:*                     LISTEN      13084/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      967/sshd
    tcp        0      0 *:50008                 *:*                     LISTEN      2303/rpc.statd
    tcp        0      0 localhost:953           *:*                     LISTEN      13084/named
    tcp        0      0 *:smtp                  *:*                     LISTEN      7997/master
    tcp        0      0 localhost:ldap          localhost:48485         ESTABLISHED 2762/slapd
    tcp        0      0 ns.refer.bg:ssh         router2.refer.bg:33047  ESTABLISHED 18642/sshd: x-spiri
    tcp        0      0 localhost:48485         localhost:ldap          ESTABLISHED 2778/nscd
    tcp        0      0 ns.refer.bg:ssh         router2.refer.bg:36153  ESTABLISHED 9751/sshd: x-spirit
    tcp        0      0 localhost:56951         localhost:ldap          ESTABLISHED 8166/dovecot-auth
    tcp        0      0 localhost:ldap          localhost:56951         ESTABLISHED 2762/slapd
    tcp6       0      0 [::]:ldap               [::]:*                  LISTEN      2762/slapd
    tcp6       0      0 [::]:www                [::]:*                  LISTEN      19142/apache2
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      967/sshd
    tcp6       0      0 localhost:953           [::]:*                  LISTEN      13084/named
    tcp6       0      0 [::]:https              [::]:*                  LISTEN      19142/apache2
    
     
  11. id10t

    id10t Member

    use nslookup.

    Code:
    ~/web$ nslookup 
    > server localhost
    Default server: localhost
    Address: 127.0.0.1#53
    > www.example.com
    
    See if it is returning locally for your domain. If it is then check to make sure it is listening on public IP. If that is good, then check firewall.
     
  12. matey

    matey New Member

    LOL @ Your name, I admire/appreciate good sense of humor anytime/place. :)
    I also wonder where/how I can get the networking tools package? None of these commands like nslookup, traceroute ,dig etc work for this new Ubuntu 8.04 xen server I setup?


    Thanks!
     
  13. chipsafts

    chipsafts New Member

    try
    Code:
    locate dig | grep bin
    if you get no results then something went amiss with your installation of BIND.

    if you do get a result, try using the full path to run dig , ie:
    /usr/bin/dig ...
     

Share This Page