netsh 第一次用这命令
生活随笔
收集整理的這篇文章主要介紹了
netsh 第一次用这命令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
轉載自
目標是WIN7 X64,且開啟了防火墻,想要用他的機器去訪問別的機器,又不想登陸他的系統,常規辦法一般是上傳一個htran,然后進行轉發,但是對方有殺軟,有被殺的可能性,所以我用另外一種辦法達到我的目的。
為了方便,先關閉他的防火墻
netsh advfirewall set allprofiles state off
(win2003&xp是用netsh firewall set opmode DISABLE 關閉)
你也可以放行listenport,具體命令自行查資料。然后用netsh interface portproxy 進行轉發到目標服務器,但是有個小缺陷,端口是能在系統里看到的,畢竟是R3層的東西,不像Linux 的IPTABLES,所以必須選擇一個迷惑性的端口。
操作完畢后,恢復防火墻netsh advfirewall set allprofiles state on.然后撤退。
關於netsh 轉發,請參考以下內容:Windows下端口轉發。
添加:
netsh interface portproxy add v4tov4 listenport=轉發端口 listenaddress=本機IP connectport=目標端口 connectaddress=目標IP
例子:
netsh interface portproxy add v4tov4 8002 202.112.58.200 8002 //本地ALL IP轉目標IP8002
netsh interface portproxy add v4tov4 listenport=5200 listenaddress=1.1.1.1 connectport=3389 connectaddress=2.2.2.2 //指定IP轉發。
XP/2003需要先安裝IPV6
netsh interface ipv6 install
刪除:
netsh interface portproxy delete v4tov4 listenport=轉發端口 listenaddress=本機IP
配置IP路由轉發:
netsh interface ipv4 set int 26 forwarding=enabled
26是網絡接口編號,可以用netsh interface ipv4 show interfaces來查看.
總結
以上是生活随笔為你收集整理的netsh 第一次用这命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我们使用git checkout 将B分
- 下一篇: gitlab docker升级报错