Need help with DNS problem

I have a standalone PC running Debian 6. DNS stopped working suddenly. I haven't changed anything. Email works because it has the ip address of the mail server. Firefox can apparently fend for itself. nslookup some_url or nslookup some_ip_address returns: nslookup: parse of /etc/resolv.conf failed.

There doesn't appear to be anything wrong with /etc/resolv.conf. My ISP says the ip address of the nameserver is correct and it responds to a ping. How can I find out what is wrong?

Could you post the contents of your /etc/resolv.conf file?

Hi,

try

dig some_url

and

dig some_url @8.8.8.8

What will you get?
Show me the /etc/resolv.conf please.
It looks that there is something wrong in it, maybe some hidden codes...

Next try:

dos2unix /etc/resolv.conf

and test again.

Regards,
xabbu

dig gave the same failure message.

I don't have dos2unix installed but my text editor shows if a line ends with cr. Both ip addresses for nameservers had a cr. I have no clue how it got there but that was causing the problem.

Thank you for the help!

Try just catting the file like:

$ cat /etc/resolv.conf

I've never needed dos2unix to see this in Debian or Redhat.