windows系統有自帶portproxy功能。目前只支持tcp協議的端口轉發,前提須要做爲portproxy的主機須要安裝IPV6,安裝能夠不啓用IPV6。windows
假定須要經過192.168.1.8的14941端口鏈接192.168.1.118的1494端口,則須要在192.168.1.8主機的命令行輸入以下語句tcp
netsh interface ipv6 install (沒有安裝ipv6才須要)命令行
netsh interface portproxy add v4tov4 listenaddress=192.168.1.8 listenport=14941 connectaddress=192.168.1.118 connectport=1494ip
或:配置
netsh interface portproxy add v4tov4 listenport=12035 connectport=8015 connectaddress=172.16.16.97方法
若是想取消上面配置的端口轉發,能夠用以下語句:協議
netsh interface portproxy delete v4tov4 listenaddress=192.168.1.8 listenport=33891端口
或:co
netsh interface portproxy delete v4tov4 listenport=9223 listenaddress=*let
若是想查看已經配置了哪些端口轉發,能夠用以下語句:
netsh interface portproxy show v4tov4
或:
netsh interface portproxy show all