Re: [squid-users] SquidNT ignoring dns_nameservers?

From: Guido Serassio <guido.serassio@dont-contact.us>
Date: Tue, 03 Jan 2006 14:38:41 +0100

Hi,

At 13.21 03/01/2006, Joost de Heer wrote:

> > Squid on Windows doesn't ignore the dns_nameservers squid.conf
> > directive, unless you are using an old external DNS build.
>
>I downloaded 2.5STABLE12-NT Standard from acmeconsulting.it.
>
> > The specified name server could not be able to resolve the host names
> > specified in the dns_testnames squid.conf directive.
>
>When I manually test the server on the dns_testnames directive line, using
>'nslookup nu.nl 192.168.1.1', the names are resolved.
>
>And now the really puzzling part:
>
>I just ran an ethereal trace (no filter, capture everything) and there's
>no DNS traffic whatsoever while running 'sbin\squid -d1 -f
>etc/squid.conf'! When running with -Dd1, squid starts normally and in the
>output I see that 192.168.1.1 is added as DNS server.
>
>I have the following in my squid.conf:
>
>dns_nameservers 192.168.1.1
>dns_testnames nu.nl
>
>Joost

OK, now I understand.

See this log fragment:

2006/01/03 14:16:36| Starting Squid Cache version 2.5.STABLE12-NT for
i686-pc-winnt...
2006/01/03 14:16:36| Running as SquidNT Windows System Service on
Windows Server 2003
2006/01/03 14:16:36| Service command line is:
2006/01/03 14:16:36| Process ID 13236
2006/01/03 14:16:36| With 2048 file descriptors available
2006/01/03 14:16:36| With 2048 CRT stdio descriptors available
2006/01/03 14:16:36| Windows sockets initialized
2006/01/03 14:16:36| Performing DNS Tests...
2006/01/03 14:16:36| Successful DNS name lookup tests...
2006/01/03 14:16:36| DNS Socket created at 172.30.1.2, port 2606, FD 5
2006/01/03 14:16:36| Adding nameserver 172.30.1.1 from squid.conf
2006/01/03 14:16:36| helperOpenServers: Starting 5 'redirector.exe' processes

The DNS test is performed BEFORE configuring the internal DNS. And
looking to the code, the DNS lookup is done using gethostbyname(), so
the machine configured DNS are always used, ignoring the
dns_nameservers squid.conf directive. This behaviour is common to all
Squid versions.

I think that this behaviour could be considered a Squid issue.

How fix your problem.

You have two options:
- set dns_testnames to something resolvable from your machine configured DNS
or
- disable the DNS test, configuring the Squid Windows service command
line with the -O "-D" command line switch.

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Tue Jan 03 2006 - 06:38:47 MST

This archive was generated by hypermail pre-2.1.9 : Wed Feb 01 2006 - 12:00:01 MST