windows进行端口映射
1. 查询端口映射情况
1 | netsh interface portproxy show v4tov4 |
2. 查询某一个IP的所有端口映射情况
1 | netsh interface portproxy show v4tov4 | find "[IP]" |
3. 增加一个端口映射
1 | netsh interface portproxy add v4tov4 listenaddress=[外网IP] listenport=[外网端口] connectaddress=[内网IP] connectport=[内网端口] |
4. 删除一个端口映射
1 | netsh interface portproxy delete v4tov4 listenaddress=[外网IP] listenport=[外网端口] |