LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I tell if BIND/ DNS is running properly? (http://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-tell-if-bind-dns-is-running-properly-865075/)

jsp_1983 02-25-2011 09: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:
http://pingability.com/zoneinfo.jsp?...ottages.org.uk

This is my named.conf file:

Code:

//
// 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 127.0.0.1 allow { localhost; } keys { rndckey; };
};

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

zone "cornwall-cottages.org.uk" IN {
  type master;
  file "/var/named/cornwall-cottages.org.uk.zone";
  allow-update { none; };
};

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

include "/etc/rndc.key";

And this is the cornwall-cottages.org.uk.zone file:

Code:

$TTL            1800 ;

@  IN  SOA ns2.cornwall-cottages.org.uk.
admin.cornwall-cottages.org.uk. (
            2010062801  ; Serial
            10800  ; Refresh
            3600    ; Retry
            604800  ; Expire
            86400  ; Minimum
)

cornwall-cottages.org.uk. IN  NS  ns1.cornwall-cottages.org.uk.
cornwall-cottages.org.uk. IN  NS  ns2.cornwall-cottages.org.uk.

cornwall-cottages.org.uk.                    IN  A  41.223.52.20
ns1.cornwall-cottages.org.uk.                IN  A  41.223.52.20
ns2.cornwall-cottages.org.uk.                IN  A  41.223.52.20
mail.cornwall-cottages.org.uk.              IN  A  41.223.52.20
www.cornwall-cottages.org.uk.                IN  A  41.223.52.20
ftp.cornwall-cottages.org.uk.                IN  A  41.223.52.20

cornwall-cottages.org.uk.                    IN  MX 10
mail.cornwall-cottages.org.uk.

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 03: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:
$ORIGIN .
$TTL 300 ; 5 minutes
domain.com IN SOA ns1.domain.com. hostmaster.domain.com. (
1296929899 ; serial
300 ; refresh (10 minutes)
1800 ; retry (30 minutes)
604800 ; expire (1 week)
300 ; minimum (5 minutes)
)
NS ns1.domain.com.
NS ns2.domain.com.
$ORIGIN domain.com.
srv01 A 10.20.11.53
srv02 A 10.20.11.54
srv03 A 10.20.11.75
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 zoneedit.com 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 11:20 AM

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


All times are GMT -5. The time now is 04:10 AM.