I cannot connect/ping localhost to resolve to IPv6 ::1 if there is no other IPv6 configured.
I made sure that /etc/hosts reads ::1 localhost, I also made sure that ifconfig shows ::1 for the lo interface. But ping or connect will not resolve, even if I force address family via -A inet6. It only works after I set another IPv6 address.
Why can't I connect to ::1? This also causes problems with the NodeJS testing suite: nodejs/node#37931
Unless I disable IPv6 in kernel, connecting to ::1 or localhost resolving to ::1 should work just fine. It does on Linux and Windows.
I cannot connect/ping
localhostto resolve to IPv6::1if there is no other IPv6 configured.I made sure that
/etc/hostsreads::1 localhost, I also made sure thatifconfigshows::1for thelointerface. But ping or connect will not resolve, even if I force address family via-A inet6. It only works after I set another IPv6 address.Why can't I connect to
::1? This also causes problems with the NodeJS testing suite: nodejs/node#37931Unless I disable IPv6 in kernel, connecting to
::1orlocalhostresolving to::1should work just fine. It does on Linux and Windows.