List of content you will read in this article:
RDP port is an essential feature for many users while setting up a remote desktop connection in windows or mac device with the remote access port. However, changing the default RDP port [By default, RDP port is 3389 and it is used for Microsoft terminal server.] can also create some issues in maintaining the usual working devices. To fix this problem, here this guide will help you with this tutorial on how to change RDP port in windows.
When you connect to a remote computer (either a Windows client or Windows Server) through the Remote Desktop connection, the Remote Desktop feature on your computer "hears" the connection through a listening port (3389 by default). You can change that listening port on Windows computers by modifying the registry. In this article, we are going to change the RDP port used in remote desktop access.
How to Change RDP Port in Windows Using Windows Registry? [Change Default RDP Port]
In Windows, Windows Registry works as a configuration settings database for installed apps, Windows services, etc. Windows Registry is the best way to change the default RDP port from 3389 to the desired custom port. Here you go with a complete step-by-step guide to change default RDP port.
Step 1: First, right-click on the start menu and click on the Run option, or you can use Windows+R keys on the keyboard to open the Run utility. Then, type the regedit and press OK to launch Windows Registry Editor.
Step 2: In the Windows Registry Editor, go to the below path and click on the following registry folder:
Step 3: After that, double-click on the PortNumber in the RDP-TCP folder.
Step 4: Select the Decimal option in the Edit DWORD(32-bit) value box and type a new port number. You can select the values between 1 and 65353.
Important Note: You have to make sure that the values don't match any common ports, so if you select a common port (like port 80 for the web traffic), then you can't establish the Remote Desktop connection afterward.
Step 5: At last, press OK to save the changes and restart the system to make changes successfully.
How to Connect a Remote Desktop with a Custom RDP Port?
Here you will get a detailed step-by-step guide that will help you to connect remote desktop with a custom RDP port:
Step 1: Open the run utility by pressing Windows + R keys, then type mstsc and press Enter button. If you are using Windows 10, you can also simply type RDP into the Windows search bar.
Step 2: Now provide a specific IP address of the remote server and a new port number in a "Remote Desktop Connection" window, then press Enter button to begin the connection. It should be written in the following format: serveripaddress:customport. For our example, we used port 2020.
We hope this guide help you how can connect RDP with the custom RDP port. Let's move to know how to configure a windows firewall for a custom RDP port.
How to Configure Windows Firewall for Custom RDP Port?
Step 1: Open the Run utility using Win+R key and type wf.msc, then click the press Enter button. This command will open the Windows Firewall management options in which you can add a new firewall rule.
Step 2: Now select inbound rules in the Windows Firewall MMC menu. After selecting these values, select a new rule by Actions Panel on the right.
Step 3: After that, select Port from the options list in the new Inbound Rule window. Then click on Next.
Step 4: As we are creating a custom rule for UDP and TCP ports, so first select TCP, then select Specific Local Ports, type in the custom RDP port you chose in section one, and click Next.
Step 5: Select Allow the connection and press Next to continue.
Step 6: Now, leave all of the entries selected for full access except for Public to prevent establishing the Remote Desktop Connection on a public network. Then, click on the Next to continue.
Step 7: Finally, provide the new network rule name with the description in the appropriate text boxes and click on the Finish button to add a new rule.
Step 8: Repeat steps 1 to 7 listed above, but select TCP in step 4 and restart the system after making the changes.
We have tested this article for various versions of Windows to change default RDP port like Windows 7, Windows 8, Microsoft Windows 10, Microsoft Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows Server 2016, and Windows Server 2019. Here we have explained how to change the default RDP port, connect RDP with a custom port, and configure the RDP custom port in the windows firewall. Also, we are providing RDP admin services which you can buy for best of practice.
People are also reading: