Articles on: VPS Management

How to setup RDP custom port and configure firewall

Changing the default Remote Desktop Protocol (RDP) port can enhance security by making it more difficult for unauthorized users to locate and attempt attacks on your system. However, it’s important to remember that this is just one layer of security and should be used in conjunction with other measures, especially a strong password.



Choose a New Port Number



Avoid Common Ports: Avoid well-known ports (0-1023) and registered ports (1024-49151). Choose a port in the dynamic/private range (49152-65535) to reduce the likelihood of conflicts.



Configuring the remote port


  1. Start the registry editor. (Type regedit in the Search box.)




  1. Navigate to the following registry subkey:



HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp



  1. Find PortNumber











  1. Click Edit > Modify, and then click Decimal.



  1. Type the new port number, and then click OK.



  1. Close the registry editor,

Updated on: 12/08/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!