Easy modification of remote ports for Windows server family servers

Source: Internet
Author: User

Windows family of servers, the remote port number default is 3389, of course, some server service providers may be other ports, in the production environment, for the server security, modify the remote port and shield some unused ports is very necessary, after the installation of the server system, usually, Administrators always need to manage the remote port, of course, you may have written some, or the hand already has a very good, to manage the remote port, or even the server port, the required service one-click installation of the program, then you do not have to look down,



Special Note: Please be aware of the "attention" content, (see the bottom,)


For Windows servers, the remote port is

Hklm\system\currentcontrolset\control\terminal server\wds\rdpwd\tds\tcp

Hklm\system\currentcontrolset\control\terminal server\winstations\rdp-tcp

Two registration keys The following PortNumber key manages, in fact, modifies the remote port. is to modify the value of the PortNumber key for the 2 entries in the registry,


You can open the registry with CMD, Regedit, and find these two items to modify the value of their PortNumber key, of course, this is not very convenient to operate, then you can refer to the following workaround.


Write a batch (suffix. bat) file to help you with all the tedious things you can do.


The following is the script content (see the script file attached)


@echo off

Echo.

echo Remote Port updating .....

Echo.

REG ADD "hklm\system\currentcontrolset\control\terminal server\wds\rdpwd\tds\tcp"/V portnumber/t reg_dword/d New Remote port/F >nul

REG ADD "hklm\system\currentcontrolset\control\terminal server\winstations\rdp-tcp"/V portnumber/t reg_dword/d new Remote port /f>nul

echo Remote Port update successfully!

Pause>nul


Note: After you have executed the above script as a batch program, your remote port has been modified and it is important to note that this port must be added to the firewall exception (if your server has a firewall), you need to add the port to the Security software exception release (if you have other security software protection), and finally, It is recommended that you close the previous remote port, which will make the server more secure. ~

This article is from the "idiot" blog, make sure to keep this source http://hotboy.blog.51cto.com/8826994/1607842

Easy modification of remote ports for Windows server family servers

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.