To better protect your windows server, it might be necessary to change the default RDP Port from 3389 to something different.
To change this, please follow the below steps.
Note: This will work on pretty much any version of windows, but keep in mind, server 2008 is EOL. Please consider upgrading to the latest version for security fixes and better functionality.
- Start Registry Editor.
- Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber;
- On the Edit menu, click Modify, and then click Decimal.Type the new port number, and then click OK;
- Save and close RegEditor;
This now concludes the changing of the port, but we now need to change some firewall settings to allow connections on the new port. To do this follow the below instructions:
Allowing new port through windows firewall
- On Windows Firewall which is located via the Control Panel, click on the Advanced Settings option on the left..
- In the Windows Firewall with Advanced Security window that opens, click on the Inbound Rules on the left;
- Click on the New Rule on the right side of the window;
- Select Port on the list of options (i.e. 1234);
- Select TCP (or UDP if that is what you require) and Specific local ports, and then write your ports in the text box to the right of Specific local ports (i.e. 1234);
- Select Allow the connection in the next window;
- Select the options which you need from Domain, Private, Public (private and public are the network types that you select when you connect to the new network, and windows asks you to select the network type, and domain is obviously your domain);
- Finally, write a Name and Description in the window that shows next. Click FINISH;
- Restart the computer;
Note: If for some reason you are unable to connect after these changes, you can always load the console from your customer panel and you will be presented with a live view of the system. This where you can revert or correct any mistakes in the changes done: