WSL2 web apps can't be accessed from mobile or LAN due to Hyper-V firewall
Web development servers running in WSL2 are typically unreachable from other devices on the same local network. This occurs because WSL2 runs inside a Hyper-V virtual machine, and the standard Windows Firewall cannot control traffic into this isolated virtual network. The required solution is to create specific Hyper-V firewall rules using PowerShell commands, which are separate from the standard firewall interface. An open-source utility script has been released to automate the process of finding the correct container ID and creating these persistent rules. Developers must also configure their local servers to listen on all network interfaces, not just localhost, for the connection to work.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in