Re: [squid-users] Is there any way to configure Squid to use local /etc/hosts in name resolution?

From: Ricardo Rios <shorewall_at_malargue.gov.ar>
Date: Thu, 27 Oct 2011 09:39:52 -0300

El 26/10/11 22:58, Jenny Lee escribió:
> ----------------------------------------
>> Date: Wed, 26 Oct 2011 18:30:37 -0700
>> From: dnwake_at_gmail.com
>> To: bodycare_5_at_live.com
>> CC: squid-users_at_squid-cache.org
>> Subject: Re: [squid-users] Is there any way to configure Squid to use local /etc/hosts in name resolution?
>>
>> Hi Jenny,
>>
>> Thanks very much for replying to my question. I'm a bit confused --
>> are you saying that you don't see my problem on your Squid 3.2
>> installation?
>>
>> My /etc/resolv.conf just reads
>>
>> search XXX
>> nameserver XXX.XXX.XXX.XXX
>>
> What about /etc/nsswitch.conf hosts line? Does it read: files dns?
>
> DNS is a crucial part of squid and I doubt squid itself is not working in this respect.
>
> What probably is happenning (since you tried a restart) is that you are retrieving the URL from your upstream parent. Try changing /etc/hosts in your parents (and restart them) and see if this resolves it. Or disable the parents and retest.
>
> Jenny
I use http://thekelleys.org.uk/dnsmasq/doc.html and i send requests to
localnet servers insteed using the public ip

cat /etc/hosts

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 xxx.xxx.gov.ar
192.168.2.7 xxx
192.168.2.7 xxx.gov.ar
192.168.2.7 mail.xxx.gov.ar
192.168.2.7 www.xxx.gov.ar
192.168.2.7 pop3.xxx.gov.ar
192.168.2.7 smtp.xxx.gov.ar
192.168.2.7 xxx.xxx.gov.ar
192.168.2.7 ftp.xxx.gov.ar
192.168.2.207 xxx.xxx.gov.ar

I hope this help you.

Regards
Received on Thu Oct 27 2011 - 12:38:45 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 27 2011 - 12:00:08 MDT