windows端口转发

Windows端口转发

可以将目标服务通过本地地址和端口开放出来。

1、新增

netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=1433 connectaddress=IP_OR_DOMAIN_NAME connectport=1433

2、查看

netsh interface portproxy show v4tov4

3、删除

netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport=1433

注意,要关闭本地防火墙或者开放指定端口。

4、其他命令

查看是否启动成功

netstat -ano | find listenport

显示系统中的转发规则列表

netsh interface portproxy show all

查看portproxy设置

netsh interface portproxy dump 

清除所有端口转发规则

netsh interface portproxy reset
posted @ 2024-03-11 16:58  Arborblog  阅读(113)  评论(0)    收藏  举报