Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been work on this all day and I'm as mystified as when I started. I have an Ubuntu 10 system. On the desktop I have firefox and a bash shell running. Firefox can see and browse any site (I'm using as my example). The bash shell on the other hand, cannot ping, dig, nslookup or anything else to

Doing a dig in the bash shell gets me

; <<>> DiG 9.7.0-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21462
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;                    IN      A

.                       900     IN      SOA 3 3600 900 3600000 900

;; Query time: 1 msec
;; SERVER: XXX.XXX.219.153#53(XXX.XXX.219.153)
;; WHEN: Tue Jan 18 17:15:30 2011
;; MSG SIZE  rcvd: 104


I've rebooted many times, rebuilt resolv.conf, checked proxy settings, bind is running, etc. And quite frankly don't understand whats going wrong.

How can a web browser being working, and bash not? when they are in the same session for the same user, running side by side!!!!

Thanks. Derek

share|improve this question
Bash is not involved. Those utilities are external to Bash. –  Dennis Williamson Jan 18 '11 at 8:47
What are the proxy settings in your firefox? –  Keith Jan 18 '11 at 13:29
If I expressely set the proxy in firefox or tell it to use the system proxy it works fine. I was able to get eclipse to partially work by setting just the http proxy settings. By partially I mean really slowly. it would take 15 minutes to resolve an update site and probably housrs to download dependencies. Whilst firefox is blasting along. –  drekka Jan 18 '11 at 23:00

2 Answers 2

The lines...

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0


.                       900     IN      SOA 3 3600 900 3600000 900 that you are using -- as in, configured through /etc/resolv.conf -- a DNS server that considers itself authoritative over the entire DNS tree.

Look at the Authority section: the SOA (Start-of-Authority) record is for . (the DNS root). According to the SOA record, the primary nameserver is, and its administrator can be reached at

Since the answer has an aa (authoritative answer) flag, the server is considering itself the authoritative source for the answer it just gave, and will not query any other servers, whatever name you try.

If you have recently installed bind9 or a similar DNS server, make sure you haven't accidentally set it up to serve .

As for Firefox, it has its own small DNS cache, like most browsers do. (I'm guessing it's either because Windows is the only OS to cache name lookups system-wide by default, or because Firefox uses its own DNS library.)

share|improve this answer
I think I have some of the answer. I just figured out that some of the local servers must be accessed through the proxy and others directly. So work has a proxy.pac file which tells the machine which servers are accessed through the proxy and which are not. That has solved a number of access issues. But command line programs (ping, dig, nslookup, traceroute) are still failing to resolve anything. I checked and bind is not installed. Even if I specify the exc1-* server on a dig, it still fails to resolve. My guess is that the network admins have blocked some forms of traffic. –  drekka Jan 20 '11 at 3:24
@Derek Clarkson: I still think it's misconfiguration, not blocking. Try specifying a public DNS server (such as or in resolv.conf and see if you get the same dig output. (dig @ –  grawity Jan 20 '11 at 14:08

Why does ping fail? Can you paste the output here? Maybe is blocking or dropping ping packets. You haven't proved that error is DNS related.

Are you using a proxy?

What is the output from running getent hosts

Is your nameserver on your local network, or is it your ISP's nameserver?

It's also possible that your DNS was working, and Firefox has cached some DNS entries, and now your DNS server is broken. What happens if you go to site you haven't been to today?

share|improve this answer
getent hosts returns nothing. Yes there is a proxy and the name server is a local network one. Ping fails because it cannot resolve to an IP. I've also tried it with many other servers such as stackoverflow and google. It's definitely dns related because dig gets an error back. Is it possible that the web browser is going to the proxy for resolution and bash isn't? –  drekka Jan 18 '11 at 6:35
Yes, hence the question. :-) –  Mikel Jan 18 '11 at 6:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.