系统相关
首页 > 系统相关> > windows 端口转发 netsh

windows 端口转发 netsh

作者:互联网

原文地址

listenaddress  # 本地监听的ip
listenport # 本地监听的端口

connectaddress # 转发请求接收的主机ip
connectport # 转发请求接收的主机的端口
# 执行命令
netsh interface portproxy add v4tov4 listenaddress=localip listenport=localport connectaddress=remoteip connectport=remoteport
# 查看现有的配置
netsh interface portproxy show all
# 删除原有的端口转发
netsh interface portproxy delete v4tov4 listenaddress=localip listenport=localport

示例

#添加
netsh interface portproxy add v4tov4 listenaddress=192.168.15.89 listenport=2222 connectaddress=192.168.15.35 connectport=22
#删除
netsh interface portproxy delete v4tov4 listenaddress=192.168.15.89 listenport=2222
#查看
netsh interface portproxy show all

 

标签:v4tov4,netsh,listenport,windows,端口,listenaddress,portproxy,interface
来源: https://www.cnblogs.com/hei-hei-hei/p/11797046.html