Before you change the RDP port
Two minutes of preparation prevents the most common lockout:
- Know your fallback. Find the web console in your hosting control panel (a browser-based screen that works without RDP). If something goes wrong, you will fix it from there.
- Pick a port. Use a number between 49152 and 65535, which is the dynamic range that well-known services do not claim. Avoid ports that other software on the server already uses.
- Check for provider firewalls. Some hosts filter traffic before it reaches your VPS. If yours does, the new port must be allowed there too.
- Tell your users. Anyone with a saved connection will need the new address. If several staff share the server, see our guide to multiple RDP sessions for managing their accounts.
To check that your chosen port is free, run this in PowerShell as Administrator. No output means nothing is listening on it:
Get-NetTCPConnection -LocalPort 53389 -ErrorAction SilentlyContinue
We use 53389 in the examples. Replace it with your own number.

How to change the RDP port with PowerShell (recommended)
PowerShell does each step precisely and is easy to repeat. Open Windows PowerShell as Administrator on the server.
Step 1: Open the new port in Windows Firewall first
Remote Desktop uses TCP for the connection and can also use UDP for better performance, so allow both:
New-NetFirewallRule -DisplayName "RDP custom port TCP 53389" -Direction Inbound -Protocol TCP -LocalPort 53389 -Action Allow
New-NetFirewallRule -DisplayName "RDP custom port UDP 53389" -Direction Inbound -Protocol UDP -LocalPort 53389 -Action Allow
If you already know the IP addresses you connect from, add -RemoteAddress 203.0.113.10 to each rule. That single option blocks far more attacks than the port change itself.
Step 2: Change the listening port in the registry
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value 53389
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber
The second command confirms the new value. PowerShell writes it as a decimal number, which is what you want.
Step 3: Restart Remote Desktop Services
Restart-Service -Name TermService -Force
Your current RDP session will disconnect, which is expected. If the service does not restart cleanly, reboot the server from your hosting panel.
Step 4: Connect on the new port
In the Windows Remote Desktop Connection app, type the address followed by a colon and the port, for example 203.0.113.25:53389. From the command line:
mstsc /v:203.0.113.25:53389
On the Microsoft Remote Desktop app for macOS, iOS or Android, enter the same ip:port format as the PC name.
Changing the port with Registry Editor instead
If you prefer a graphical method, Microsoft documents it in Change the listening port for Remote Desktop. In short:
- Create the firewall rules first, in Windows Defender Firewall with Advanced Security → Inbound Rules → New Rule → Port.
- Run
regeditand openHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. - Double-click PortNumber, select Decimal, enter the new port and click OK.
- Restart the server or the Remote Desktop Services service.
The most common mistake here is leaving the base on Hexadecimal. Typing 53389 in hex sets a completely different port, and you will not be able to connect.
Step 5: Close port 3389 once the new port works
Only after you have logged in successfully on the new port, disable the default rules:
Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Format-Table DisplayName, Enabled
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"
The first command shows which built-in rules exist on your version of Windows. The second disables them, leaving your custom rules active. Because the service no longer listens on 3389 anyway, this is mainly tidiness and a guard against the port being changed back by mistake.
| Step | Command or location | Undo |
|---|---|---|
| Allow new port | New-NetFirewallRule … -LocalPort 53389 | Remove-NetFirewallRule -DisplayName "RDP custom port TCP 53389" |
| Change listening port | Registry value PortNumber | Set it back to 3389 |
| Apply | Restart-Service TermService -Force | Restart again after undoing |
| Close default rules | Disable-NetFirewallRule -DisplayGroup "Remote Desktop" | Enable-NetFirewallRule -DisplayGroup "Remote Desktop" |
If you get locked out
If the new port does not answer, open your provider's web console and log in locally. Then work through these checks:
- Is the service listening?
Get-NetTCPConnection -LocalPort 53389 -State Listen - Is the firewall rule enabled and on the right profile?
Get-NetFirewallRule -DisplayName "RDP custom*" - Was the registry value entered in decimal?
- Does an upstream firewall at your provider still allow only 3389?
If all else fails, set PortNumber back to 3389, re-enable the Remote Desktop rules and restart the service. Our guide to fixing Remote Desktop connection errors covers other causes.
Does changing the RDP port actually improve security?
It helps, but less than people hope. Mass scanners try port 3389 on every address, so moving away from it cuts automated attempts sharply and keeps your security logs readable. A targeted attacker, however, can scan all 65,535 ports in minutes and find RDP wherever it is. Treat the port change as noise reduction, and add the controls that actually stop attacks:
- Restrict RDP to known IP addresses in the firewall, or put it behind a VPN.
- Keep Network Level Authentication (NLA) enabled so users authenticate before a session starts.
- Use long, unique passwords and rename or disable accounts attackers guess first.
- Turn on account lockout to slow down password guessing.
- Install updates promptly, because RDP vulnerabilities do appear.
Our full RDP security guide explains each of these with the exact settings.
Why teams run Windows on SkyRain Cloud
SkyRain Cloud Windows servers are built for this kind of control:
- Windows Server ready to use. Plans come with Windows Server pre-installed and activated, so you log in over RDP and start working.
- Full Administrator access. Install your own software, change the RDP port, create users and set firewall rules yourself.
- Resources that are yours. Each plan is a private virtual machine with its own vCores, RAM and disk, not a shared terminal-server account.
- Indian locations, Indian latency. Servers sit in India, so a remote desktop session from Mumbai, Delhi or Bengaluru feels responsive.
- Unmetered 1 Gbps port. Updates, file transfers and browser work are not capped by a monthly data allowance.
- Simple billing and real support. Monthly billing in rupees with UPI, net banking and cards, plus 24/7 tickets, WhatsApp and Discord.
Frequently Asked Questions
What is the default RDP port?
Which port should I use for RDP?
Do I need to restart the server after changing the RDP port?
How do I connect to RDP on a custom port?
Is changing the RDP port enough to secure my server?
What if I changed the port and cannot connect?
Conclusion
To change the RDP port safely, always follow the same order: firewall first, then the registry, then a restart, a test connection, and finally closing 3389. Keep your provider's web console handy as a fallback, and remember that a custom port is one layer of protection, not the whole defence.
If you need a Windows server where you control all of this, see our Windows RDP plans in India.
SkyRain Cloud Windows RDP Plans
Windows RDP servers in India with full Administrator access and a 1 Gbps unmetered uplink.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| RDP Plan 1 | 4 | 8 GB DDR4 | 60 GB Enterprise Disk | 1 Gbps, unmetered | ₹999/month | Data entry, virtual assistants, one MetaTrader terminal | Order |
| RDP Plan 2 | 6 | 16 GB DDR4 | 80 GB Enterprise Disk | 1 Gbps, unmetered | ₹1,799/month | Tally Prime for small teams, several browser profiles or terminals | Order |
| RDP Plan 3 | 8 | 24 GB DDR4 | 120 GB Enterprise Disk | 1 Gbps, unmetered | ₹2,499/month | Multi-user remote work, automation and SEO tools | Order |
| RDP Plan 4 | 12 | 32 GB DDR4 | 160 GB Enterprise Disk | 1 Gbps, unmetered | ₹3,499/month | Remote teams, large ERP datasets, many concurrent sessions | Order |
Prices are monthly in INR as listed on the SkyRain Cloud store (verified 2026-11-23). Live stock and final price are shown at checkout.