Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] DNS Randomly Dies
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
RBH
Apprentice
Apprentice


Joined: 31 Oct 2004
Posts: 184

PostPosted: Mon Jul 25, 2005 12:18 pm    Post subject: [Solved] DNS Randomly Dies Reply with quote

This is an odd one. I've been hosting my own DNS for my domain, and suddenly it's all .. "crapped out" is the technical term, I believe. The domain can no longer be found.

DNSStuff.com lists the correct IPs for the nameservers (the report for the doma can be read here), but - as you can see from that report - there are some very odd values coming from the servers. Mainly the fact that all the settings (TTL, Serial etc) are being reported as zero.

Here's /etc/bind/named.conf:
Code:
options {
   directory "/var/bind";

   // uncomment the following lines to turn on DNS forwarding,
   // and change the forwarding ip address(es) :
   //forward first;
   //forwarders {
   //   123.123.123.123;
   //   123.123.123.123;
   //};

   listen-on-v6 { none; };
        listen-on port 53 {
      any;
   };

   // to allow only specific hosts to use the DNS server:
   //allow-query {
   //   127.0.0.1;
   //};

   // if you have problems and are behind a firewall:
   //query-source address * port 53;
   pid-file "/var/run/named/named.pid";
};

zone "." IN {
   type hint;
   file "named.ca";
};

zone "localhost" IN {
   type master;
   file "pri/localhost.zone";
   allow-update { none; };
   notify no;
};

zone "127.in-addr.arpa" IN {
   type master;
   file "pri/127.zone";
   allow-update { none; };
   notify no;
};

zone "168.192.in-addr.arpa" IN {
   type master;
   file "pri/168.192.zone";
   allow-update { none; };
   notify no;
};

zone "ecliptical.co.uk" {
   type master;
   notify no;
   file "/var/bind/pri/ecliptical.zone";
   allow-transfer { any; };
};


... Aaaand here's /var/bind/pri/ecliptical.zone:
Code:
; Zone File for ecliptical.co.uk
$ORIGIN ecliptical.co.uk.
$TTL 60
@      14000   IN      SOA   ns1.ecliptical.co.uk. tech.ecliptical.co.uk.
   (   
      2005052702      ; serial
      10800         ; refresh after 3hrs
      3600         ; retry after 1 hr
      1209600         ; expire after 3 days
      86400 )         ; minimum TTL of 1 day

      IN   NS      ns1.ecliptical.co.uk.
      IN   NS      ns1.twisted4life.com.
      IN   MX   100   80.6.134.35
ns1      IN   A      80.6.134.35
calypso      IN   CNAME      ns1
www      IN   CNAME      ns1
mail      IN   CNAME      ns1


NOTHING to do with bind has been touched since it was last working fine. The server hasn't gone down, no IPs have changed, port 53 is still finding it's way to the correct box.

Anyone got any ideas?

Yes, bind is running -

Code:

tcp        0      0 localhost:domain        *:*                     LISTEN      31700/named
tcp        0      0 192.168.1.5:domain      *:*                     LISTEN      31700/named


Last edited by RBH on Tue Jul 26, 2005 5:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
RBH
Apprentice
Apprentice


Joined: 31 Oct 2004
Posts: 184

PostPosted: Mon Jul 25, 2005 1:02 pm    Post subject: Reply with quote

A quick look in the log shows
Code:
Jul 25 12:55:38 calypso named[32499]: dns_rdata_fromtext: pri/ecliptical.zone:3: near eol: unexpected end of input
Jul 25 12:55:38 calypso named[32499]: zone ecliptical.co.uk/IN: loading master file pri/ecliptical.zone: unexpected end of input


I've looked through the file over and over and I can't see any problem with it (let alone the fact that it hasn't been touched since it was working fine a few days ago).
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Mon Jul 25, 2005 3:37 pm    Post subject: Reply with quote

RBH wrote:
A quick look in the log shows
Code:
Jul 25 12:55:38 calypso named[32499]: dns_rdata_fromtext: pri/ecliptical.zone:3: near eol: unexpected end of input
Jul 25 12:55:38 calypso named[32499]: zone ecliptical.co.uk/IN: loading master file pri/ecliptical.zone: unexpected end of input


I've looked through the file over and over and I can't see any problem with it (let alone the fact that it hasn't been touched since it was working fine a few days ago).


RBH wrote:
Code:
@      14000   IN      SOA   ns1.ecliptical.co.uk. tech.ecliptical.co.uk.


This looks to be line 3 of ecliptical.zone. The number 14000, whatever that is supposed to be doesn't show up in a quick look through my BIND book. All the examples (and my own primary) are in the form "@ IN SOA", etc. Can't imagine why that would work and then not work.

Dave
Back to top
View user's profile Send private message
RBH
Apprentice
Apprentice


Joined: 31 Oct 2004
Posts: 184

PostPosted: Tue Jul 26, 2005 5:18 pm    Post subject: Reply with quote

It turns out the opening bracket for the SOA section has to be on the same line as the @ IN SOA bit. No idea why this only began causing problems now but that sorted it.

Thanks for your help :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum