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

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 19 Sep 2001 06:41:08 +0200

Pablo Sanchez wrote:

> I did this in my DNS files:
>
> qa-one.foobar.com IN CNAME web2.hairball.com.

DNS is VERY sensitive on WHERE you do this. If you do this in the zone
definition of yourdomain.com then it will be defined below
yourdomain.com, i.e. qa-one.foobar.com.yourdomain.com. You can only
define foobar.com names in the zone file of foobar.com, not in the zone
file of yourdomain.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.

A 'dot' alone won't help you here except showing you that there is a
problem with the setup. It will (correctly) make your DNS server
complain about the entry being outside of the zone and discarding it.

> #1
> ==
> - remove the above entry from DNS file
> - add entry in /etc/hosts
>
> Result: nslookup => Non-existent host/domain
> ping => okay on local host

Good. As expected.

> #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

Makes sense. See above and /var/log/messages.

> #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

Again, makes sense. See above.

> Do you think it's an /etc/nsswitch.conf issue? Here's, I believe, the
> relevant line:
>
> hosts: files nisplus nis dns
>
> ROOT-1019.chaussy-[/root]: squid -v
> Squid Cache: Version 2.4.STABLE2

Fine. Then #1 should work. Squid does not care about nsswitch.conf, only
the hosts_file setting in squid.conf (defaults to /etc/hosts), and
/etc/resolv.conf for DNS server settings.

--
Henrik Nordstrom
Squid Hacker
Received on Tue Sep 18 2001 - 22:43:34 MDT

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