New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Squid3 to prefer IPV4 but still go for IPV6
Hi all,
I've googled and got instructions on how to set it so that whenever I'm visiting website with both IPV4 and IPV6, squid should be using IPV4 instead of IPV6.
But after changes and restart,squid always go for IPV6.
I have done changes following this guide http://wiki.squid-cache.org/Features/IPv6
and other guide.
Any help would be appreciated.
Below is my squid.conf
auth_param basic children 2 auth_param basic realm --Private Channel-- auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid_user auth_param basic credentialsttl 2 hours auth_param basic casesensitive on acl all src all acl class proxy_auth REQUIRED acl ncsa_users proxy_auth REQUIRED http_access allow ncsa_users acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1/128 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1/128 acl Dangerous_ports port 7 9 19 23 25 109 110 119 acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access deny Dangerous_ports http_access allow localhost http_access deny all http_port 8080 acl ipv6 src ::1/128 acl to_ipv6 dst ipv6 http_access deny ipv6 !all tcp_outgoing_address xxx.xxx.xxx.xxx !to_ipv6 tcp_outgoing_address xxxx:xxxx:xxxx::xxxx:xxxx to_ipv6 tcp_outgoing_address xxx.xxx.xxx.xxx tcp_outgoing_address xxxx:xxxx:xxxx::xxxx:xxxx access_log /var/log/squid3/access.log squid coredump_dir /var/spool/squid3 refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 via off connect_timeout 1 minutes server_persistent_connections off dns_v4_fallback on dns_v4_first on forwarded_for off request_header_access X-Forwarded-For deny all cache deny all
Comments
Maybe /etc/gai.conf
Put this there:
I believe Squid is not affected by gai.conf (due to not using the system resolver functions which are configured by it), evident by the fact it will go for 6to4 (2002::) IPv6 addresses over IPv4, even though that shouldn't be the case.