【windows】windows10 原生埠轉發
阿新 • • 發佈:2021-02-05
netsh interface portproxy add v4tov4 listenaddress=localaddress listenport=localport connectaddress=destaddress connectport=destport // 轉發(3389 -> 9989) netsh interface portproxy add v4tov4 listenport=9989 listenaddress=192.168.3.5 connectport=3389 connectaddress=192.168.3.5 //刪除 netsh interface portproxy delete v4tov4 listenport=
9989 listenaddress=192.168.3.5 //檢視 netsh interface portproxy show all //查詢 netstat -ano | findstr :9989 //檢視已配置的“埠對映”清單 netsh interface portproxy show v4tov4 //刪除指定的埠轉發規則: netsh interface portproxy delete v4tov4 listenport=3340 listenaddress=10.1.1.110 //清除所有當前的埠轉發規則: netsh interface portproxy reset //listenaddress - 等待連線的本地IP地址。 //listenport - 本地偵聽TCP埠。 //connectaddress - 將傳入連線重定向到本地或遠端IP地址(或DNS名稱)。