WSL (Windows Subsystem for Linux) has become an incredibly useful tool for developers and power users, but advanced users have noticed some major issues with networking. Managing network connections between the host and guest OS can be a challenge, especially when using VPNs or local services.
To simplify WSL networking, Microsoft introduced mirrored mode in Windows 11 version 22H2. This feature mirrors the network interfaces of your Windows host, enabling support for more features and improving compatibility with other tools. Mirrored mode includes benefits such as IPv6 support, improved VPN connectivity, and direct access to WSL services from other machines on the same local network.
To enable mirrored mode, open the WSL settings page and change the networking mode to “Mirrored”. Alternatively, you can manually create a configuration file called .wslconfig in your user folder and set the networkingMode to “mirrored”.
Microsoft recommends trying out mirrored mode, but surprisingly, it’s not enabled by default. The company asks users to send feedback on any issues they encounter, but considering its availability for three years with no major limitations mentioned, it’s surprising that it’s not the default behavior.
By using mirrored mode, you can significantly improve your WSL networking experience and avoid common issues with VPNs, local services, and IPv6 connectivity.
Source: https://www.xda-developers.com/wsl-great-but-networking-mess-heres-how-fix-it