Thursday, March 19, 2020

Changing the Remote Desktop (RDP) port

Why you want to change your RDP port?

First thing is for security reason because bad guys keep scanning your 3389 port, if its open!
Another reason is, if you have more than one remote machine in your local network, then you can change different ports for different machines.
If you have only one remote machine in your local network, then you dont need to change your internal RDP port you can change external port in router and forward it to your internal port.

Attention!

Make sure that you have also already set the firewall to the new port before you apply the settings below.
For customers who do not want the Remote Desktop to listen to default port 3389: http://support.microsoft.com/kb/306759
  1. Start the Registry Editor
  2. Click the following registry subkey: 
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
  3. Choose Modify in the context menu and select Decimal.
  4. Enter the new port number and click OK.
  5. Close the Registry Editor.
The change only goes into effect once the server is restarted. After the restart, the RDP is only accessible via the new port number. Please also notify the support desk if you will be using an alternative port. The support desk can then log in for support without having to ask additional questions.