Re: one script can resolve hostnames, but another one can't



On Apr 13, 2:16 pm, Unruh <unruh-s...@xxxxxxxxxxxxxx> wrote:
Bennett Haselton <benn...@xxxxxxxxxxxxx> writes:
I run several dedicated CentOS servers that have two different web
proxy scripts on them called PHProxy and Glype (scripts where you see
a form where you can type in the web page that you want it to fetch,
and the site fetches the page for you and displays its contents).  On
most servers, both PHProxy and Glype are able to resolve hostnames
with no problem.
However, on one server (https://www.turtleflag.com/), I'm seeing odd
behavior: If I typehttp://www.yahoo.com/into the PHProxy form, it
fetches it with no problem:
https://www.turtleflag.com/hsjbzay.php?q=aHR0cDovL3d3dy55YWhvby5jb20v....
However, if I typehttp://www.yahoo.com/into the Glype form and
submit, it gives me the error:
"The requested resource could not be loaded. libcurl returned the
error:
name lookup timed out.  [Reloadhttp://www.yahoo.com/]";
How could the two different scripts be using different OS calls to
resolve a hostname, such that one is succeeding and the other one
isn't?

Easily. there are at least two different system calls to look up addresses.
getaddrinfo and gethostbyname and its ilk.
They use entirely different procedures for looking up addresses.

What can I do on the command line to try resolving the hostname using
one method, and then to try resolving the hostname by the other
method, to see if they dive different results?

And incidentally, why would they use "entirely different procedures"
for resolving hostnames -- why wouldn't both of them just send their
query to the resolvers listed in /etc/resolv.conf and then return the
result?

Bennett
.



Relevant Pages

  • Re: one script can resolve hostnames, but another one cant
    ... proxy scripts on them called PHProxy and Glype (scripts where you see ... resolve a hostname, such that one is succeeding and the other one ... for resolving hostnames -- why wouldn't both of them just send their ...
    (comp.os.linux.misc)
  • Re: exim HELO=fully qualified host name?
    ... |> for instance, when communicating with a remote host, it would seem to me ... |> hostname which is resolvable via DNS rather than an /etc/hosts alias ... |> so) a hostname resolving to 127.0.0.1. ...
    (Debian-User)
  • Re: sendmail question
    ... part by resolving my hostname with the entries ... The name servers are ... > trying to resolve a hostname or MX record for the RCPT domain? ... >> of this command hangs just before DATA i.e ...
    (freebsd-questions)
  • Re: exim HELO=fully qualified host name?
    ... > for instance, when communicating with a remote host, it would seem to me ... > so) a hostname resolving to 127.0.0.1. ...
    (Debian-User)
  • Re: CDE/Network problem
    ... Probably a name resolving issue. ... Make sure both IP address and hostname resolve correctly ("host ... setup details. ...
    (comp.unix.aix)