局域网访问WSL2

开启端口转发

netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=80 connectaddress=172.17.30.220

connectaddress后面为虚拟机的ip地址

查看已转发端口

netsh interface portproxy show all

删除已转发端口

netsh interface portproxy delete v4tov4  listenport=80 listenaddress=0.0.0.0