Did I understand from the comments that nslookup works even when your Mac is still set to use your router's DNS proxy at 192.168.1.1? If so, then see if Mac OS X's other DNS resolver codepath works, by doing a DNS query with the dns-sd
tool:
dns-sd -Q www.google.com
(You'll have to Ctrl-C out of this command once you get results or decide to give up)
If dns-sd
can't resolve host names but traditional Unix tools like nslookup
/dig
/host
can, then the mDNSResponder
daemon is probably horked and needs to be restarted:
sudo killall mDNSResponder
NB: Don't just HUP it, really kill it and let launchd
automatically restart it. I've seen mDNSResponder fail to unstick itself with just a HUP.
Update: If the above commands don't work (and note that everything in them is case-sensitive), then mDNSResponder probably isn't running, or is crashing or otherwise exiting prematurely at every launch. Use the Console utility (/Applications/Utilities/Console.app
), hit the "Show Log List" button and select the "All Messages" log stream. Look for messages from launchd
or mDNSResponder
that may indicate why mDNSResponder is having problems launching and staying running. Look also in the "System Diagnostics Reports" category in the log list to see if there are crash reports from mDNSResponder.
It may be that your mDNSResponder binary somehow became corrupted and needs to be reinstalled. You can either reinstall the same version of Mac OS X in-place (which by default does a repair-install and leaves your files in place, but you can never be too careful, so first make sure your backups work anyway), or you can try copying over the mDNSResponder binary itself from another machine running the exact same version and build of Mac OS X. Go to [Apple] menu -> About this Mac, look at the version number, then click it once to see the build number. Or before you copy it, you could checksum the binary on both machines like this:
$ md5 /usr/sbin/mDNSResponder
MD5 (/usr/sbin/mDNSResponder) = 205d44c2b62b8b8c2cef5b84e6da7c79
That's the checksum from my copy in Mac OS X v10.6.8 build 10K540.
I suppose it's also possible that mDNSResponder might have a corrupted config file / plist or cache file or something that it's choking on, but I don't usually think of mDNSResponder as having those kind of things.