disable/block ipv6 requests

Matus UHLAR - fantomas <[email protected]>
Newsgroups gmane.comp.web.squid.general
Message-ID <[email protected]>
Hello,

I maintain a few servers that currently do not have IPv6 connectivity.

Until we fix this, I'd like squid to avoid considering using ipv6, 
because even if any ipv6 attempt failed, there still were some being made
... at least I assume so from squid logs:

1740062747.503      0 192.0.2.1 NONE_NONE/503 0 CONNECT ad.turn.com:443 - HIER_DIRECT/2001:678:cb4:bbbb::11 -

As I understand it, I can build squid without ipv6 support. 
Is there any other way to disable outgoing ipv6 communication?


 From what I read in archives using "acl" makes no sense, as it decides 
whether to block request or not:
https://marc.info/?l=squid-users&m=168180685516039&w=2

...and the directive dns_v4_first is long obsolete:
https://marc.info/?l=squid-users&m=168181162219573&w=2


What I have tried:

1. disabling ipv6 by setting (linux) 
net.ipv6.conf.all.disable_ipv6=1

but in logs squid complains:

2025/02/24 00:00:10| WARNING: BCP 177 violation. Detected non-functional IPv6 loopback.

2. reboot linux kernel with option "ipv6.disable=1"

(at least the ipv6 attempts stopped)

After either of last two attempts, squid seems to crash too often. 

#4  0x00007f028a174eb2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000564f2a77e824 in Ip::Address::getAddrInfo(addrinfo*&, int) const ()

I have squid 5.7 on Debian 12

-- 
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I'm not interested in your website anymore.
If you need cookies, bake them yourself.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.