How to check if DNS is functioning

Discussion in 'HOWTO-Related Questions' started by new_bee05, Nov 30, 2005.

  1. new_bee05

    new_bee05 New Member

    How do I check if my Debian DNS Server is functioning correctly.
     
  2. Ovidiu

    Ovidiu Active Member

    well I sugest testing the domains that your DNS server is hosting, go here and test your domain. just enter yourdomain.com on the lefthand, press enter and you`re done
     
  3. falko

    falko Super Moderator ISPConfig Developer

    You can use dig to test it, e.g.

    Code:
    dig @localhost example.com
    dig@localhost MX example.com
    dig @localhost ANY example.com
     
  4. new_bee05

    new_bee05 New Member

    OK I get this when typing: dig @localhost mydomain.com

    SERVFAIL, id:30662

    which means?

    Also nslookup gives me:
    Server: 192.168.1.100
    Address: 192.168.1.100#53

    is this correct?
     
    Last edited: Nov 30, 2005
  5. falko

    falko Super Moderator ISPConfig Developer

    Your DNS server isn't running. Try to restart it, and have a look at the logs in /var/log to see if any errors occur.
     
  6. new_bee05

    new_bee05 New Member

    I have restarted bind 9 same result. how do i open the log files so i can view them.
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Run
    Code:
    tail -n100 /var/log/syslog
    or
    Code:
    tail -n100 /var/log/messages
    This will sshow the last 100 lines of these files.
     
  8. new_bee05

    new_bee05 New Member

    Only error messages I can see are:

    myhost named[1872]: zone mydomain.com/IN: loading master file zones/master/master.mydomain.com: not at top of zone

    myhost named[1518]: zone 1.168.192.IN-ADDR.ARPA/IN: loading master file zones/192.168.1.rev: unexpected end of input

    myhost named[1518]:dns_rdata_fromtext: zones/192.168.1.rev:3: near eol: unexpected end of input
     
  9. falko

    falko Super Moderator ISPConfig Developer

    That's the reason why Bind doesn't start. Try to have a look into these files and try to fix the problems.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you are not the owner of the domain mydomain.com and your server is connected to the internet?
     
  11. joe

    joe New Member HowtoForge Supporter

    Actually, it looks more like a syntax error in the 192.168.1.rev file. Even if he didn't own mydomain.com, he could still publically advertise it -- then the people who listened to his DNS server would be given poisoned records.
     
  12. new_bee05

    new_bee05 New Member

    my.domain is only the example. My domain is www.ecompos-kicks-ass.net. I think it has something to do with zones not functioning properly. Also when I browse to this address I get the login screen for my DSL modem. I have forwarded the ports (80) to 192.168.1.100 and still no luck.
     
  13. joe

    joe New Member HowtoForge Supporter

    Try the named-checkconf utility
     
  14. new_bee05

    new_bee05 New Member

    tried that Joe still no luck. If I opened port 80 on my router why is it still displaying the router login page?
     
  15. falko

    falko Super Moderator ISPConfig Developer

    First, I'd try to check if you have Windows line breaks instead of Unix line breaks in your zone files.

    Secondly, when I try to access http://www.ecompos-kicks-ass.net/, I don't even get your modem login screen. I get some DNS error message. A dig shows this:

    which means there aren't any records defined yet, and the authoritative name server for the domain is a.gtld-servers.net.
     
  16. new_bee05

    new_bee05 New Member

    Falco, I have been told that it is working. Can you check it again.

    Are these DNS records that you are talking about? Do I have to setup forward and reverse zones. Is there anything else?

    Also can I have more than one email address with this domain. I have [email protected] but I would like to set up a couple more is this possible using the debian console.

    Thanks for all your patience Falco.
     
    Last edited: Dec 2, 2005
  17. falko

    falko Super Moderator ISPConfig Developer

    No, it's not working.

    The responsible name server for your domain is a.gtld-servers.net which is not a server you run, I guess. So you have to contact the owner/administrator/... and tell him to create all needed DNS records. Maybe there's also a web interface where you can create these records yourself.

    However, you needn't create DNS records on your own server - it doesn't make sense because your server isn't authoritative for your domain.

    You can have as many email addresses as you like. http://www.howtoforge.com/forums/showthread.php?t=2
     
  18. new_bee05

    new_bee05 New Member

    falco,
    I obvously have not set up my zone files correctly. Are there any how to's or examples on how to do this?
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you thought about using a config tool like ISPConfig that enables easy DNS record creation trogh an web interface?
     
  20. falko

    falko Super Moderator ISPConfig Developer

    http://langfeldt.net/DNS-HOWTO/BIND-9/
     

Share This Page