Proxy Squid – Using IPv6 for Outgoing Traffic Instead of IPv4

PROXYsquid

When I am connecting via squid proxy to internet, getting ipv6 address instead of ipv4. The proxy is configured for both ipv4 and ipv6. Why it is preferring ipv6 ?Could anyone please advise what to look for in the config ?

Best Answer

This is the default behaviour of Squid, it will prefer IPv6 over IPv4 when the DNS resolution for both protocols are available, in order to change this behaviour you will need to use the dns_v4_first directive.

If you would like to prefer IPv4 connectivity, you would need to add this line to the squid.conf file:

dns_v4_first on