windows11上wsl或虚拟机端口映射

# netsh interface portproxy add v4tov4 listenport=[win10端口] listenaddress=0.0.0.0 connectport=[虚拟机的端口] connectaddress=[虚拟机的ip]
netsh interface portproxy add v4tov4 listenport=5201 listenaddress=0.0.0.0 connectport=5201 connectaddress=172.21.8.19
netsh interface portproxy delete v4tov4 listenport=5201 listenaddress=0.0.0.0

发表回复