0

I'm running some services on WSL2 which only seems to support listening on ipv6 interface on the host side. This means everything outside WSL trying to connect to a WSL2 service on 127.0.0.1 is failing. Is there a way in Windows to route all 127.0.0.1:X traffic to [::]:X?

9
  • 1
    Stop using 127.0.0.1 and use localhost. Jul 23, 2020 at 19:30
  • Unfortunately that's not always an option. I'm dealing with some services which require an ip address and it needs to be v4.
    – krojew
    Jul 23, 2020 at 19:31
  • Gawd, it's amazing some app developers are still stuck in the distant past. This has been the way to do it since Vista/2008. Anyway, I haven't played with WSL but on real Linux, by default an IPv6 listener will also listen on IPv4, so if their emulation is good enough, it should just work even though the services you're dealing with are stupid. Jul 23, 2020 at 19:39
  • WSL2 does something with networking and the internal network is only available as v6 to the outside world. Inside, both 6 and 4 work just fine.
    – krojew
    Jul 23, 2020 at 19:41
  • Well, you said it was 127.0.0.1, that's the local host. The outside world doesn't matter. Or are you actually dealing with something else? Jul 23, 2020 at 19:42

1 Answer 1

0

You must wait seem so Microsoft docs

WSL 2 distributions currently cannot reach IPv6-only addresses. We are working on adding this feature.

4
  • It's the other way around - I can reach inside via v6 but not v4.
    – krojew
    Jul 23, 2020 at 19:42
  • it doesn't necessarily means it will work from the other side / inside, because it's (for now) unsupported in WSL2 and that's what you're using. Jul 23, 2020 at 20:01
  • Ipv6 works - v4 doesn't. That quote doesn't apply for this case.
    – krojew
    Jul 24, 2020 at 5:24
  • sound like you've tried netsh proxy and it didn't work, am I right? Afaik recently was problem to run docker and hyper-v on same Windows 10 machine in the same time (MS fixed it about 6 months ago) and looks very similar to me what you're describing, but with network stack not virtualization vs/and containers. Jul 24, 2020 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .