Cannot connect to WSL2 app running when networkingMode=mirror

by Apr 7, 2025IT Tips0 comments

Not sure if this is useful or will even help but leaving it posted just in case.

Run the server so it binds to all local ip addresses

bin/cake server -H 0.0.0.0

I have Hyper-V installed so change the rules to make it work

Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction Allow


New-NetFirewallHyperVRule -Name "CakePHPDevServer" -DisplayName "CakePHP Dev Web Server" -Direction Inbound -VMCreatorId '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -Protocol TCP -LocalPorts 8765
netsh interface portproxy add v4tov4 listenport=8765 listenaddress=0.0.0.0 connectport=8765 connectaddress=10.197.3.190

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.