Hey hey.

On Wed, 2007-02-21 at 13:24 +1100, Erik de Castro Lopo wrote:
> I have a number machines sitting in another country with access to 
> them via a VPN. On one of these machines "host www.google.com"
> returns valid IP addresses, but "wget www.google.com" results in
> 
>    Resolving www.google.com... failed: Temporary failure in name resolution.
> 
> However, using wget with the IP address does work.
> 
> Attempting to access other servers results in similar behaviour.
> "host <server>" works, "wget <server>" doesn't, "wget <ip address>"
> does.
> 
> In addition, the problem is not restricted to wget; telnet, ping,
> lynx etc are all broken, but host works.
> 
> Anybody have any explanation for this weird behaviour?

How is your /etc/nsswitch.conf ?

This file controls how name resolution for different things is done. A
default Linux install will most likely include the line
hosts:          files dns

Which says that to resolve a hostname, first check /etc/hosts, then do a
DNS lookup. If you take dns off of this line, then nothing on your
system will do DNS lookups any more. Except tools like host, which are
designed specifically for doing DNS lookups, and don't seem to jump
through the standard hoops to resolve an address.

-- 
Pete

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to