windows 不像 linux 那樣可以方便地使用證書登陸來確保安全性 .
所以對于大部分人來說 , 修改遠程桌面默認的 3389 端口是防止爆破比較簡單的方法 .
網上大部分的教程都是教怎么修改注冊表 . 首先注冊表修改就比較麻煩 , 而且修改完注冊表很多人還忘記開防火墻相應的端口規則 , 直接坑了 .
我就網上找到這個批處理文件 , 分享給大家 .
大家可以把以下文件保存為 3389.bat, 然后直接雙擊運行就可以了 .
大家也可以下載我打包好的 , 直接下載解壓后運行即可 :https://raw.githubusercontent.com/91yun/91yuncode/master/3389.zip
@echo off
color f0
echo 修改遠程桌面3389端口(支持Windows 2003 2008 2008R2 2012 2012R2 7 8 10 )
echo 自動添加防火墻規則
echo %date% %time%
echo ARK
set /p c= 請輸入新的端口:
if "%c%"=="" goto end
goto edit
:edit
netsh advfirewall firewall add rule name="Remote PortNumber" dir=in action=allow protocol=TCP localport="%c%"
netsh advfirewall firewall add rule name="Remote PortNumber" dir=in action=allow protocol=TCP localport="%c%"
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" /v "PortNumber" /t REG_DWORD /d "%c%" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\W