squid and hosts_file on ipv6 not working fine

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

squid and hosts_file on ipv6 not working fine

--Ahmad--
hello folks


sometimes i need to change domains for cetian ipv6 website

i use the directive

hosts_file /etc/hosts
and in side it i have :

[root@server ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
2607:f8b0:4006:810::200e google.com
2607:f8b0:4006:810::200e www.google.com
2607:f8b0:4006:810::2003 google.de
2607:f8b0:4006:810::2003 www.google.de




but squid still don’t take google.com from that host file and take it from outside


any directive for IVP6 ? may be ?


cheers


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid and hosts_file on ipv6 not working fine

Amos Jeffries
Administrator
On 19/09/17 23:47, --Ahmad-- wrote:

> hello folks
>
>
> sometimes i need to change domains for cetian ipv6 website
>
> i use the directive
>
> hosts_file /etc/hosts
> and in side it i have :
>
> [root@server ~]# cat /etc/hosts
> 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
> ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
> 2607:f8b0:4006:810::200e google.com
> 2607:f8b0:4006:810::200e www.google.com
> 2607:f8b0:4006:810::2003 google.de
> 2607:f8b0:4006:810::2003 www.google.de
>
>
>
>
> but squid still don’t take google.com from that host file and take it from outside
>

How are you determining that?

and what does your access.log say for one of the requests that are doing it?


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid and hosts_file on ipv6 not working fine

Amos Jeffries
Administrator
On 20/09/17 03:54, Ahmed Alzaeem wrote:

> access .log point to other address :
>
> 1505824835.364 690000 12.13.207.211 TCP_TUNNEL/200 78573 CONNECT
> www.google.com:443 -
> HIER_DIRECT/2404:6800:4009:802::2004 -
>
> from linux terminal i can reach goole from :
>>> 2607:f8b0:4006:810::200e google.com
>
>
> but in squid itself  ….  no it dont  and it reach goole  using the
> address2404:6800:4009:802::2004  not  2607:f8b0:4006:810
>
> so I’m sure the hosts_file directive works for IPV4 not for iPV6 address
>

FYI: "google.com" is not the same domain as "www.google.com". So your
hosts file line for "www.google.com" is the one that should be used, not
the "google.com" line.


Did you restart or reconfigure Squid after making the hosts file changes?

And, if so does "squid -k parse" show an issues?

And, does the cache manager ipcache report show all these google entries
with a 'H' flag?

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users