Forum Moderators: bakedjake

Message Too Old, No Replies

Nameserver Wierdness

Everyone can see it but itself?

         

yetanotheruser

9:03 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



I hope this is the best place for this quesion - I've been trying to fix what appears to be some Nameserver wierdness and still not sure I've figured it out :(

The problem started with a couple of mail's getting rejected by sendmail because the "domain doesn't resolve" - then people having problems logging into SMTP and POP3 services.. and finally a seriously long delay in logging into SSH.. .

In the course of trying to find the problem, I've discovered that it seems to be a NS problem.. The box in question will not even nslookup it's own domains. Infact nslookup doesn't even start but errors that the Nameserver doesn't respond (The nameserver is the same box as the mailserver and the webserver - not ideal I know - it is changing soon ;) ) - it also won't for example "host hotmail.com"

The odd thing is, that there appears to be nothing wrong with named. It seems to be running fine, web services are unaffected, machines both here in the UK and in Germany seem quite happy to get DNS answers from it.. I've set my little box here to use it as primary NS and that's fine..

I've now managed to fix/work-around/hack-through the problem, by removing the boxes own IP addresses from /etc/resolv.conf and replacing them with those of my ISP's nameserver.. All the problems dissapear! :)

This hardly fills me with confidence though, cos I've no idea how long this fix will last.. I would say though that I made a couple of fresh sub-domains after doing this, and they all resolve fine, which increases my confidence that named itself is ok..

Can anyone tell me why a server can be happily dealing out DNS info to anyone&everyone but it can't talk to itself?

Cheers.. Sorry long post.. very hungry.. need my bed.
J. :)

[added]
Soz - should probably specify: is a Redhat box, running Bind under 2 IP addresses, and Apache/Sendmail etc. Don't have versions just at the mo, but can find any out if need be - suffice to say is a (pretty old / all-in-one / rented) Linux rack that I've been upgrading where I know how.
[/added]

Air

12:53 am on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



resolv.conf should not have the box's IP address, it should have the search domain(s) and the local address i.e. 127.0.0.1 if it is doing name resolution for itself. Try that it should fix your problem.

bcc1234

3:04 am on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just add your own ip and hostname to /etc/hosts (if it's not there). That way the resolver won't even need to check with the name server. Also it does not hurt to check the search order to make sure it's hosts, nameserver and not the other way around.

yetanotheruser

8:02 am on Jun 12, 2003 (gmt 0)

10+ Year Member



Thanks guys,

Have installed Bind on one of our new boxes (something I should have done ages ago) and am using that for one of the ns's .. all seems a lot better now.

The resolv.conf was untouched - just how the people who built the box set it up - I still haven't figured out what changed, which is always a little anoying ;)

Thanks, :)