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 ?
Asked
Active
Viewed 4,673 times
1 Answers
5
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

Mahmoud Nouman
- 79
- 1
-
this was really useful to us in a scenario that we had ipv6 connectivity, but it could not access the archive.ubuntu.com (via Ipv6) -- not sure the reason, as it could access other ipv6 sources – Thiago Conrado Dec 29 '21 at 21:20