Windows Server default port is "3389", this one port is very easy to be scanned by hackers, generally installed the server system will be the system's remote port changes, which need to change the value of two keys in the registry, For a lot of people who don't know, or if it's like saving something, you might as well follow this batch file to modify the remote port.
Create a new text document on the desktop and copy the following code:
@echo Offcolor 0a:: Technical Support Hanyang Modify the title modify the Windows 2003/2008 Remote Desktop Services port number echo ************************************************* echo * Please enter the Remote Desktop port number you want to change, range: 1024-65535, cannot conflict with other ports *echo ******************************************* echo.set/p port= Please enter the port: REG add "Hklm\system\currentcontrolset\control\terminal server\wds\ Rdpwd\tds\tcp "/V portnumber/t reg_dword/d%port%/freg Add" hklm\system\currentcontrolset\control\terminal Server\ Winstations\rdp-tcp "/V portnumber/t reg_dword/d%port%/fnetsh Firewall set Opmode mode = enablenetsh Firewall set port Opening All-Web Enablenetsh firewall set portopening all 3389 remote-pre enablenetsh firewall set portopening all%port Enableecho.echo *******************************echo * Restart Remote Desktop *echo *******************************reg Add " Hklm\system\currentcontrolset\control\terminal Server "/V fdenytsconnections/t reg_dword/d 1/freg Add" HKLM\SYSTEM\ Currentcontrolset\control\terminal Server "/V fdenytsconnections/t reg_dword/d 0/fecho.echo Start restart the computer to take effect, select Start Mode: Echo Select 1 manual restart echo Select 2 Auto Restart set/p select= Please select 1,2:if "%select%" = = "1" goto Aif "%select%" = = "2" goto Bpauseexit:aecho exit, please manually restart the computer pauseexit:bshutdown-r-T 1pauseexit
After the copy is complete, the suffix name of the text document is changed to CMD or bat format, save, and must be restarted to take effect after execution.
This article is from the "Light Blue Wind" blog, be sure to keep this source http://1051236524.blog.51cto.com/5661514/1409359