How to change RDP Port to a Custom Port number of Your Choice

How to change RDP Port to a Custom Port number

Follow these steps and you will be able to login with a different port number.

1. Change registry at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber from 3389 to your port number

2. Allow your port number within Windows 2008 Firewall (and specify scope of IP addresses that can access the server via RDP - this is optional but good security practice).

3. Restart the RDP service or reboot the server

See The Images for a better Experience...

Open RegEdit from the start search Menu.

Open Reg edit VPS


Modify PortNumber in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\ from 3389 to your custom number in our case to 4564:

VPS Windows

Change RDP port to your choice between 1024 - 65530

VPS Windows

Open Server Manager.

+ Here You will Disable the Original Remote Desktop firewall rule. This will ensure that the default port is not open.



VPS Windows

+ Create A new Firewall Rule in the Incoming Section for your new port



VPS Windows

+Step 1 Specifiy rule type to Port



VPS Windows

+Step 2 Protocol and Ports



VPS Windows

+Step 3 Allow connection



VPS Windows

+Step 4 -- Profile, Domain , Private and Public



VPS Windows

+Step 5 -- Enter details of your new Rule. Profile, Domain , Private and Public



VPS Windows

+Step 6 -- Lastly Either restart the server or restart this service "Remote Desktop Configuration"



VPS Windows


In regards to security the setup is not security through obscurity but it prevents automated bots from discovering your servers open port and performing brute force password guessing on it. Also if you setup the scope properly with IP addresses or IP ranges the port will not even come up on standard port scan. There is nmap tool (now with GUI) that can sort of deduce the port but it is still useless unless you are expert network penetration expert. 

As far as maintaining the information about the change of port I recommend you look into NOC software like Nagios. This will tell other admins about what you have done, what the port number for RDP is and who is allowed to access it. 

All done!


Now Try to login to your rdp port like this....

192.168.0.254:7888
  • 292 Users Found This Useful
Was this answer helpful?

Related Articles

Virtual Private Network (VPN) - Point to Point Tunneling

VPN | Point to Point TunnelingThe ability log in to your home network or rather our network from...

Windows Server 2003 VPS - Full O/S Backups

Windows O/S has never been know for being a portable Operation System. Im sure at one point you...

What is the difference between vpn, vps , and private cloud?

This is a lot to explain but I will keep it as short as possible... What is a VPN? The...

What is Forex VPS Hosting?

What Is Forex Vps Hosting The proper analysis of server...

Forex VPS Hosting Canada

Foxex VPS Hosted on any version of Windows VPS (Virtual Private Server) hosting allows the Forex...