Activities? Oops..

On 21/02/07, Zhasper <[EMAIL PROTECTED]> wrote:
Not a solution, but a  couple of suggestions: try stracing wget to see
if you can tell exactly what lookup it's doing. I've attached a quick
run that I just did below-  you can see it looking at nsswitch.conf,
checking the files, sending a connection to the nameserver specified
in resolv.conf (ie, 127.0.0.1)

Second suggestion is my favorite hammer, dnstracer. I've attached
sample output below as well; it shows that it's sending queries to
127.0.0.1 which returns the result. This is pretty much what I'd
expect to get anywhere (except that usually it's not 127.0.0.1 that
gets queried); this may, perhaps, reveal a little more information
that may help you.

[EMAIL PROTECTED]:~$ strace wget www.google.com.au 2>&1 | grep -e open
-e connect -e send -e recv
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/usr/lib/i686/cmov/libssl.so.0.9.7", O_RDONLY) = 3
open("/usr/lib/i686/cmov/libcrypto.so.0.9.7", O_RDONLY) = 3
open("/lib/tls/libdl.so.2", O_RDONLY)   = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("/etc/wgetrc", O_RDONLY|O_LARGEFILE) = 3
open("/home/zhasper/.rnd", O_RDONLY)    = -1 EACCES (Permission denied)
open("/dev/urandom", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 3
open("/etc/localtime", O_RDONLY)        = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libnss_files.so.2", O_RDONLY) = 3
open("/etc/host.conf", O_RDONLY)        = 3
open("/etc/hosts", O_RDONLY)            = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libnss_dns.so.2", O_RDONLY) = 3
open("/lib/tls/libresolv.so.2", O_RDONLY) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("127.0.0.1")}, 28) = 0
send(3, "\220`\1\0\0\1\0\0\0\0\0\0\3www\6google\3com\2au\0\0"..., 35, 0) = 35
recvfrom(3, "\220`\201\200\0\1\0\6\0\7\0\0\3www\6google\3com\2au\0\0"...,
1024, 0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 259
connect(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("209.85.135.103")}, 16) = 0
write(2, "connected.\n", 11connected.
open("index.html.3", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 4

[EMAIL PROTECTED]:~$ dnstracer www.smh.com.au
Tracing to www.smh.com.au[a] via 127.0.0.1, maximum of 3 retries
127.0.0.1 (127.0.0.1) Got answer [received type is cname]
 |\___ ns1.fairfax.com.au [smh.com.au] (203.26.177.241) Got
authoritative answer [received type is cname]
  \___ ns2.fairfax.com.au [smh.com.au] (203.5.59.241) Got
authoritative answer [received type is cname]



On 21/02/07, Erik de Castro Lopo <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> 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.
>
> Attempting to access other servers results in similar behaviour.
> host <server> works, wget <server> doesn't.
>
> In addition, the problem is not restricted to wget; telnet, ping,
> lu=ynx etc are all broken, but host works.
>
> Anybody have any explanation for this weird behaviour?
>
> Erik
> --
> +-----------------------------------------------------------+
>   Erik de Castro Lopo
> +-----------------------------------------------------------+
> http://en.wikipedia.org/wiki/Why_I_Am_Not_a_Christian
> http://en.wikipedia.org/wiki/Why_I_Am_Not_a_Muslim
> http://en.wikipedia.org/wiki/Strong_atheism
> --
> SLUG Activities
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
>


--
There is nothing more worthy of contempt than a man who quotes himself
- Zhasper, 2004



--
There is nothing more worthy of contempt than a man who quotes himself
- Zhasper, 2004
--
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