Step by Step Changing Default RDP Port on Windows Server

LAB Overview

The requirement was to Secure Remote Access to Server in a private cloud infrastructure, where the customer wanted to provide RDP of Microsoft Windows Server with different RDP port other than the default one which shipped with default Windows installation.

This section contains steps that show you how to modify the registry. However, serious problems might be occurred if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully.

LAB Setup

Windows Server 2012 name = Srvr2012                                

RDP default port = 3389      

IP Address = 1.1.1.1                                                                             

RDP port to change =2454    

Subnet Mask = 255.0.0.0                              

Other OS name = Win 7

IP Address = 1.1.1.2                                           

Subnet Mask = 255.0.0.0  

  1. Click on the Windows logo + R to open the “Run” dialog and write the “cmd” command
  2. Open the registry editor by typing the “regedit” command.
  3. Search for this registry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
  4. Double-click or right-click on the “PortNumber” registry subkey, select the decimal base and type the port number of your choice (the default port is 3389 but we selected port 2454). 
  5. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber
  • Click on “Ok” to save your selection.
  • Exit the registry editor.
  • Restart your server.

Inbound Firewall Rule for New RDP Port

Click on Advance Firewall Setting

Click on Inbound Rules

Click on New Rule

Select Port & Click Next

Select TCP & Enter your desired port

Select Allow Connection & Continue

Select your desired profile & click on Next

Give a name to your inbound firewall rule & click finish

After this your Microsoft Windows Server or Windows 7, 8, 8.1 and Windows 10 will be Accessible with New RDP Port.

After the reboot, go to Win 7 and type mstsc in cmd to access RDP session.

Then type IP address of window server 2012 (Srvr2012) & specify the Remote Desktop port number (2454) as beneath and click to connect.

IP ADDRESS: 1.1.1.1:2454

Here you go …. you can access your server.

Leave a Reply