Plainnotes

0.0.0.0 and :: are not the same listener

2025-05-28 · 2 min readNetwork

ss -lntp shows some services on 0.0.0.0:80, others on *:80 or [::]:80 — whether IPv6 is accepted.

Linux defaults to net.ipv6.bindv6only=0, so a socket on :: also accepts IPv4 as ::ffff:a.b.c.d. A socket on 0.0.0.0 accepts only IPv4.

So listen 80; alone may bind IPv4 only depending on the nginx build, leaving IPv6 clients out; listen [::]:80; covers them. With bindv6only=1, :: stops accepting IPv4 too, and both need explicit listeners.

When "some users cannot connect", check for [::] in ss, then try curl -6 and curl -4 separately.