RE: [squid-users] DNS cache-only server question

From: Pablo Sanchez <pablo@dont-contact.us>
Date: Tue, 18 Sep 2001 14:13:26 -0600

> -----Original Message-----
> From: hno@hem.passagen.se [mailto:hno@hem.passagen.se]On Behalf Of
> Henrik Nordstrom
> Sent: Tuesday, September 18, 2001 12:48 AM
> To: pablo@purecarbon.com
> Cc: squid-users@squid-cache.org
> Subject: Re: [squid-users] DNS cache-only server question
>
> > I tried adding a qa-three.jobplanet.com. (dot at the end but this
> > didn't accomplish anything either -- problem is still there).
>
> Where/how are you adding this?

I did this in my DNS files:

qa-one.foobar.com IN CNAME web2.hairball.com.

As a matter of fact, that's the way it's currently defined. I added
the 'dot' to the end of 'qa-one.foobar.com' to no avail.

> Does nslookup now return the correct name, or does it still include
> yourdomain.com?

I'll explain the different scenarios I just tried:

#1
==
- remove the above entry from DNS file
- add entry in /etc/hosts

Result: nslookup => Non-existent host/domain
         ping => okay on local host

#2
==
- make the line be: qa-one.foobar.com. IN CNAME web2.hairball.com.
- no entry in /etc/hosts

Result: nslookup => Non-existent host/domain
          ping => uknown host

#3
==
- using the above line
- no entry in /etc/hosts

Results: nslookup => As before, adds 'mydomain.com' to the end of the
line
          ping => works on local host and clients

> > I tried that, making an entry in /etc/hosts and removing
> the entry in
> > the local DNS cache-only server and it didn't work unfortunately
> > either.
>
> A cache-only DNS server cannot by defintition contain
> entries. Not that
> it matters. Using /etc/hosts does work for faking hosts. Uses this
> technique frequently in testing for various purposes.

Do you think it's an /etc/nsswitch.conf issue? Here's, I believe, the
relevant line:

hosts: files nisplus nis dns

> > I appreciate your patience, any other suggestions? Should I hook
> > dnsserver with a wrapper? Or is there a switch within
> the IPC (I'm
> > assuming SQUID uses IPC's) to have SQUID not worry so
> much for FQDN?
>
> Squid uses three different host name resolution shemes
>
> a) Older Squids used the systems gethostbyname via
> dnsserver. However,
> to comply with HTTP standards only FQDN's are used from
> DNS. Depending
> on your system configuration this mechanism can be
> configured to first
> look in /etc/hosts where there is no FQDN restrictions
> (/etc/hosts isn't
> structured in hierarchical domains). If you can ping the
> address, but
> not nslookup it the system configuration should be fine for
> this use.
>
> b) Squid-2.3 defaults to using an internal DNS client only, ignoring
> /etc/hosts. Can be reverted to gethostbyname/dnsserver by compiling
> Squid with --disable-internal-dns.
>
> c) Squid-2.4 or later still uses the internal DNS client,
> but also reads
> /etc/hosts.
>
>
> Which Squid version are you using, and how is it compiled?

Version
=======
ROOT-1019.chaussy-[/root]: squid -v
Squid Cache: Version 2.4.STABLE2

Compilation
===========
Nothing fancy:
        ./configure
        make install

---
Pablo Sanchez         mailto:pablo@purecarbon.com
Ph  : 303.939.8897       Fax: 603.720.7723
Cell: 303.717.5889
Received on Tue Sep 18 2001 - 14:13:38 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:15 MST