Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL2 and IPv6 #17

Open
timriker opened this issue Jan 13, 2021 · 0 comments
Open

WSL2 and IPv6 #17

timriker opened this issue Jan 13, 2021 · 0 comments

Comments

@timriker
Copy link

wsl2 does not (yet?) support IPv6. This means when a service like apache opens a listening port on the IPv6 ANY interface, these connections are not forwarded through the WSL2 system. Only IPv4 listening addresses are forwarded. I add this to my .bashrc currently which works around the issue by disabling ipv6. The default WSL2 kernel has IPv6 enabled, but the default WSL2 networking does not route IPv6. I don't know why this is. This is a hack, but it's a working hack.

grep -q 1 /proc/sys/net/ipv6/conf/all/disable_ipv6 || sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
grep -q 1 /proc/sys/net/ipv6/conf/default/disable_ipv6 || sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Feel free to adapt to your root startup. This could get added to /etc/sysctl.d/something.conf and then startup sysctl on "boot" for a more complete solution that would handle other sysctl settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant