Weird: No DNS for command-line tools

Posted:
in Genius Bar edited January 2014
I have the strangest of problems at work. All browsers work just fine as they should, but when I go to Terminal, virtually no network tools can find their way out of the office. The firewall on my machine is off. The network config includes an authenticated proxy (same address as the router) and we use our provider's DNS servers. It looks like a common setup, but I can't even ping these DNS servers! Obviously, nslookup, dnsquery, dig, host, traceroute all fail. It may look like I don't have DNS servers configured in System Preferences->Network, but I have put 3 of them there. netstat -r is damn slow, though it ultimately shows the default gateway's address, same as the router/proxy's.

I have a feeling that I shouldn't have had Internet at all in such circumstances. However, seeing that browsers work, I suspect that there's something wrong with Mac OS X (10.2.8, to be precise) or Darwin.

In a fit of desperation I edited /etc/hostconfig to change automatic ROUTER entry for the exact IP address and restarted. No avail.



Does anybody know what that means? Is there a workaround (like having to set up a caching DNS server on my own machine)? Our windows-brainwashed admins don't care to stir a finger as long as e-mails get through our network. Please, help!

Comments

  • Reply 1 of 2
    indeed, it is odd that internet would be working. instead of ping'ing the dns's, try ping'ing actual sites, like apple.com or google.com. it is possible that the web is not working, and that you are just running on cache. you can test that by going to the preferences and clearing the cache, and then see if you can hit any pages.
  • Reply 2 of 2
    costiquecostique Posts: 1,084member
    Quote:

    Originally posted by thuh Freak

    indeed, it is odd that internet would be working. instead of ping'ing the dns's, try ping'ing actual sites, like apple.com or google.com. it is possible that the web is not working, and that you are just running on cache. you can test that by going to the preferences and clearing the cache, and then see if you can hit any pages.



    Thank you for your reply. I am absolutely sure I am not loading everything from the cache since after googling something I can load any link I click, even if I deliberately look for unusual things I have never searched for.

    One clever guy told me that the router may cut all ICMP packets which explains why I can't ping any host except in our local subnet. As far as I can tell, nslookup also relies on ICMP. If so, the question is how browsers resolve domain names if the DNS servers are behind the router. Another question is what I can do to make the DNS info available to browsers also available to command-line tools like curl?
Sign In or Register to comment.