WSL port forwarding

I'm trying to connect to a vite dev server running in WSL from my phone on the same local network, but it does not seem to want to connect

some commands I tried to run :
netsh.exe interface portproxy add v4tov4 listenport=5173 connectport=5173 connectaddress=$((wsl hostname -I).Trim())

netsh interface portproxy add v4tov4 listenport=5173 listenaddress=0.0.0.0 connectport=5173 connectaddress=(wsl hostname -I)

netsh advfirewall firewall add rule name="Open Port 5173" dir=in action=allow protocol=TCP localport=5173

netsh interface portproxy add v4tov4 listenport=5173 listenaddress=0.0.0.0 connectport=5173 connectaddress=172.30.240.1

172.30.240.1 is the ip of the WSL instance as reported by ipconfig /all
Was this page helpful?