[ILUG] squid & dnsserver

Kenn Humborg kenn at bluetree.ie
Thu Oct 26 20:03:53 IST 2000


> 
> Are you using an http proxy?  Does the proxy know how to resolve
> unqualified hostnames?  Try "telnet host 80" and see whether you can
> do a "GET /".

That's exactly the problem.  I've got Netscape 4.75, Win32 configured
to use my squid machine, port 3128 as a HTTP proxy.  When I enter
a URL http://host/ as a shorthand for http://host.bluetree.ie, the
DNS lookup fails.  Squid returns its usual error page explaining that
the hostname lookup failed.

So I look into squid.conf and find this:

#  TAG: dns_defnames    on|off
#       Normally the 'dnsserver' disables the RES_DEFNAMES resolver
#       option (see res_init(3)).  This prevents caches in a hierarchy
#       from interpreting single-component hostnames locally.  To allow
#       dnsserver to handle single-component names, enable this
#       option.
#
#dns_defnames off

Which is fair enough.  But my squid isn't accessible from any other
domain, so any unqualified hostnames it receives should be interpreted
as host.bluetree.ie, so I turn on dns_defnames, (already having 
search bluetree.ie in my /etc/resolv.conf).

But it doesn't make any difference.  That's when I notice that squid
isn't starting up _any_ dnsserver processes.  Which makes me really
suspicious because (also from squid.conf):

#       To disable dnsservers, set this to 0.  NOTE, this is very
#       strongly discouraged.  If you disable dnsservers your Squid
#       process will BLOCK on DNS lookups!
#
#dns_children 5

And I don't think my squid is blocking.  Maybe it does and I just
don't notice...  Maybe the docs in squid.conf don't describe 
reality anymore?

> ISTR that squid in particular doesn't particularly like unqualified
> hostnames.

In the default config, yes, and for good reason.  But it can be
configured to do so.  Apparently...

Later,
Kenn





More information about the ILUG mailing list