Hosting
Servers
Web Development Pricing
Resources
Get started → Log in
Home/Blog/RDP port 3389

RDP port 3389
check it, change it, secure it.

28 November 20267 min readBy the RapidServer team

What is the RDP port number?

The RDP port number is 3389. Remote Desktop listens there by default, over both TCP and UDP. You can move it to another port, but a new number is not real security. On a RapidServer RDP server in Mumbai (BOM1) or Delhi NCR (DEL1), from ₹2,323/mo plus 18% GST, it is better to limit who can reach the port.

How to check which RDP port is in use

Microsoft says Remote Desktop listens on port 3389 by default, and the number is stored in the registry. To read it, open PowerShell as administrator on the server (connect first with Remote Desktop):

PowerShell (administrator)
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'PortNumber'

The PortNumber line shows the port: 3389 on a fresh server. To see that Windows is really listening, run netstat -ano | findstr :3389, or from your own computer run Test-NetConnection YOUR-SERVER-IP -Port 3389 and look for TcpTestSucceeded : True. If it says False, a firewall or the wrong port is in the way.

How to change the RDP port safely

Order matters. If you change the registry before the firewall allows the new port, the server stops answering on both and you lock yourself out. Microsoft's change listening port guide covers the registry value and the firewall rules; the order below adds the safe sequence. We use 3390 as the example: pick your own number that no other program uses.

1. Add the firewall rule for the new port first

Keep the old 3389 rule for now. In PowerShell as administrator:

PowerShell (administrator)
$portValue = '3390'
New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile Public -Direction Inbound -Action Allow -Protocol TCP -LocalPort $portValue
New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile Public -Direction Inbound -Action Allow -Protocol UDP -LocalPort $portValue

Those are Microsoft's rules, which use the Public profile; if your network profile is Private or Domain, change -Profile to match. Microsoft also warns that with any other firewall, you must allow the new port there too. On a RapidServer server that means the firewall in the client area as well: add 3390 there, with your own IP addresses as the source (steps in the Windows VPS setup guide).

2. Change the port in the registry

PowerShell (administrator)
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'PortNumber' -Value 3390

The same value in Registry Editor is PortNumber under HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp; choose Decimal when you edit it.

3. Restart and test the new port

Microsoft's steps end with restarting the computer. Reconnect using the new port (next section), or test with Test-NetConnection YOUR-SERVER-IP -Port 3390 from your own computer.

4. Only then remove the old rule

Once 3390 works, disable or delete the 3389 rules: in wf.msc, switch off the Remote Desktop inbound rules for 3389, and remove 3389 from the client-area firewall. Until this step, you can still reach the server on 3389 if something goes wrong. If you did lock yourself out, the browser console in the client area lets you sign in without Remote Desktop and fix the rule.

How to connect to a custom RDP port

Type the address, a colon and the port in the Computer box of Remote Desktop Connection. Microsoft's example is pc1.contoso.com:3390; for a server, it looks like this:

PowerShell
mstsc /v:YOUR-SERVER-IP:3390

The same host:port form works in other clients, such as Microsoft's Windows App. Leave the port off and the client assumes 3389, which is the usual reason for a connection that times out after a change.

Why changing the port is not real security

A different port only hides the front door. A port scan of your server's IP address finds 3390 as easily as 3389, and then the password is still the only lock. What you do gain is fewer automated attempts aimed at 3389, so quieter logs. Microsoft's troubleshooting guide even says to leave the port alone unless another program needs it. What really protects a server is in Is RDP safe?.

Ways to protect RDP: what each one does

MethodWhat it doesStops password guessing?
Change the portMoves Remote Desktop off 3389, so fewer automated attempts arriveNo; a port scan finds it
Firewall allow-list of your IPsOnly your own IP addresses can reach the port at allYes, for everyone else
Network Level AuthenticationMakes people sign in before a session is set upPartly; guesses are still possible
Long, unique passwords and lockoutMakes guessing impractical and stops a bot after a set number of triesYes, for normal accounts
VPN or RD GatewayKeeps the port off the open internet; people connect through a second sign-inYes, for outsiders

On a RapidServer server

A RapidServer RDP server or Windows VPS is unmanaged: Windows and its port are yours to configure, and we supply the tools.

  • Firewall rules in the client area, so only your own IP addresses reach Remote Desktop, before traffic touches Windows. Allow the new port there when you change it.
  • A browser console in the client area, for when a port change or firewall rule locks you out.
  • Daily backups kept 7 days, and snapshots you can take before a change.
  • Ready a few minutes after payment in Mumbai (BOM1) or Delhi NCR (DEL1), from ₹2,323/mo plus 18% GST, Windows licence included.
  • Two Remote Desktop sessions for administration; RDS CALs for more people are not included.
A Windows server with a firewall you control.

Your own RDP server in Mumbai or Delhi NCR from ₹2,323/mo plus GST, with support 24/7.

See RDP server plans

Questions

What port does RDP use?+
Port 3389, over TCP and UDP, unless someone has changed it. The value is stored in the registry as PortNumber under the RDP-Tcp key.
Is it worth changing the RDP port?+
It cuts automated attempts aimed at 3389, but a port scan still finds the new port and the password is still the only lock. Allowing only your own IP addresses through the firewall protects far better.
I changed the RDP port and now cannot connect. What do I do?+
Usually the firewall does not allow the new port yet, or you left the port off the address. Try host:port first. If that fails, open the browser console in the RapidServer client area, sign in, and add the firewall rule for the new port.
Do I need to open both TCP and UDP?+
Microsoft's guide adds a rule for each, TCP and UDP, on the new port, so add both.
Can I run Remote Desktop on two ports?+
Not with the built-in setting: it holds one port number. During a change, keep the old firewall rule open until the new port works, then remove it.
Do more users need a different port?+
No. The port has nothing to do with how many people connect. Windows Server allows two Remote Desktop sessions for administration; more people at once need RDS CALs, which are not included.
RDP ka port kaise badlein?+
Pehle naye port ka firewall rule add karein, phir registry mein PortNumber badlein, server restart karein, naye port par connect karke test karein, aur tabhi purana 3389 rule hatayein. Connect karte waqt address ke baad colon aur port likhein, jaise IP:3390. Port badalna security nahi hai; client area firewall se sirf apne IP allow karna zyada safe hai.

A Windows server with a firewall you control.

Firewall rules in the client area, a browser console and daily backups kept 7 days, in Mumbai or Delhi NCR, billed monthly in rupees with a GST invoice.