LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 02-25-2011, 09:19 PM   #1
jsp_1983
LQ Newbie
 
Registered: Dec 2010
Posts: 29

Rep: Reputation: 0
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.
 
Old 02-26-2011, 03:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
1 members found this post helpful.
Old 03-16-2011, 11:20 AM   #3
jsp_1983
LQ Newbie
 
Registered: Dec 2010
Posts: 29

Original Poster
Rep: Reputation: 0
I forgot to add my thanks for this reply... Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind.DNS Help needed on Split DNS server manya Linux - Server 3 10-28-2010 09:39 AM
Multiple RHEL 5 Servers running Bind - joining Windows AD and DNS folkrm Linux - Server 1 01-13-2010 05:02 PM
How to get Windows Clients to be served DNS from a Linux BIND-DNS Server texmansru47 Linux - Networking 12 07-10-2008 08:06 PM
LXer: DNS: The Bind Leading the Bind LXer Syndicated Linux News 0 06-15-2006 11:33 PM
running bind for dns notolerance Linux - Newbie 4 11-11-2004 04:26 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration