-   Linux - Newbie (
-   -   How can I tell if BIND/ DNS is running properly? (

jsp_1983 02-25-2011 08:19 PM

How can I tell if BIND/ DNS is running properly?
I've tried setting up BIND from a fresh install. I've followed a few tutorials (all seem to follow a similar routine), but it doesn't appear to work properly.

This is what happens when I query my domain:

This is my named.conf file:


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

// a caching only nameserver config
controls {
 inet allow { localhost; } keys { rndckey; };

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

zone "" IN {
  type master;
  file "/var/named/";
  allow-update { none; };

zone "" IN {
  type master;
  file "/var/named/52.223.41.rev";
  allow-update { none; };

include "/etc/rndc.key";

And this is the file:


$TTL            1800 ;

@  IN  SOA (
            2010062801  ; Serial
            10800  ; Refresh
            3600    ; Retry
            604800  ; Expire
            86400  ; Minimum
) IN  NS IN  NS                    IN  A                IN  A                IN  A              IN  A                IN  A                IN  A                    IN  MX 10

I've restarted the named service (and even rebooted the server).

I've compared both files to examples and they don't appear to be any different - I'm at a loss as to what is wrong or where I should start to troubleshoot it.

acid_kewpie 02-26-2011 02:04 AM

well you need to look in the relevant log files, that's always the place to start. check /var/log/messages (by default) for issues about the config, you could also look to do zone transfers of the zones to see exactly what it's aware of (dig -t axfr localhost)

Here's an example zone file from one of my systems:
$TTL 300 ; 5 minutes IN SOA (
1296929899 ; serial
300 ; refresh (10 minutes)
1800 ; retry (30 minutes)
604800 ; expire (1 week)
300 ; minimum (5 minutes)
srv01 A
srv02 A
srv03 A
rpm CNAME srv03

There are plenty of style issues between these but not necessarily causing issues. The main point I see that its stopping the request is the resolution of the ns1 and ns2 records. Where are these defined outside of this server? I'd guess that they are not and so your server is still totally isolated. At a basic level, is traffic every even hitting your machine? Pretty irrelevant what your config is if nothing else knows to ome to ask you any questions. Your domain registrar needs to hold the details of what name servers to forward too, and they appear to, but there is no A record available online for these already, so you need to provide them somewhere outisde of your server otherwise you've just got a loop - how do you get to the name server if the only thing that tells you where the name server is the name server itself!

Personally if you are more concerned with providing the resulting website than running DNS... don't run DNS. I use to host DNS records nice and simply, althoguh your registrar may be able to provide a similar service for you as part of you sign up terms.

jsp_1983 03-16-2011 10:20 AM

I forgot to add my thanks for this reply... Thanks!

All times are GMT -5. The time now is 01:17 AM.