In this tutorial, we will learn “How To Connect RDP With Different Port”. RDP stands for “Remote Desktop Protocol” and is a proprietary network protocol from Microsoft for remote access to your Windows computer. You can use this to display and control the screen content, for example. The port is not open by default on every system and may be blocked by the Windows firewall. We will explain how to allow remote access privately and publicly, how to change the port and how to check if the RDP port is open.
How To Connect RDP With Different Port.
- First Open Registry Editor.
- Go to the Search Bar and type Regedit.
- Now press Enter, it will open Registry Editor Console.
- Now Go to :HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
- Find the DWORD parameter with the name PortNumber.
- This parameter shows the port, on which the Remote Desktop service is listening.
- As we know The default is Port 3389 (decimal). Let’s Change it.
- Click Edit > Modify, and then click Decimal.
- Change the value of this parameter. I have changed the RDP port to 9978 (Decimal).
- Now click the OK Button and Close the registry editor.
If you’re using a firewall, you will have to create a new rule that allows inbound connection to your new RDP port. You can create an allowing inbound rule for your new TCP/UDP RDP port manually in the Windows Defender Firewall console or using PowerShell cmdlets. Let’s do this through Powershell.
- First, open Powershell as an Administrator.
- In the Search bar, type “Windows PowerShell.”
- Next, right-click the Windows PowerShell app in the search results.
- Let’s Click “Run as Administrator”.
- It will open Powershell Console as administrator.
- Now Paste this Command to Create Inbound TCP Rule – New-NetFirewallRule -DisplayName “NewRDPPort-TCP-In” -Direction Inbound -LocalPort 9978 -Protocol TCP -Action allow
- Now Paste this Command to Create Inbound UDP Rule – New-NetFirewallRule -DisplayName “NewRDPPort-UDP-In” -Direction Inbound -LocalPort 9978 -Protocol UDP -Action allow
- Close the Powershell, and restart your computer.
- That’s It. Now you can connect RDP through the new port.