28,655 questions
Hi,
WSL uses a NAT by default. You can try setting networkingMode=mirrored
under [wsl2]
in the .wslconfig
file to enable mirrored mode networking.
Enabling this changes WSL to an entirely new networking architecture which has the goal of 'mirroring' the network interfaces that you have on Windows into Linux.
https://learn.microsoft.com/zh-cn/windows/wsl/networking#mirrored-mode-networking
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.