
Leaving RDP open to the internet is an invitation to brute-force attempts. You can still use RDP safely, but you need a few guardrails.
This is a practical checklist you can run through on any Windows VPS (Windows Server 2019/2022/2025 or Windows 10/11 Pro). Most of it takes 10-20 minutes.
You have two sane setups:
If you can do VPN-only, do it. It eliminates most of the noise and risk in one move.
NLA requires authentication before a full RDP session is created. It reduces resource usage and blocks some older attack paths.
GUI:
This PC and click PropertiesRemote settingsPowerShell (optional):
Set-ItemProperty `
-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' `
-Name UserAuthentication `
-Value 1
If you use very old clients, they might not support NLA. Modern Windows/macOS/iOS/Android clients do.
Bots try Administrator first.
Do one of these:
Administrator, orAdministrator and use that new nameCreate a new local user and add it to Administrators:
# Pick a strong password.
$password = Read-Host -AsSecureString
New-LocalUser -Name "rdpAdmin" -Password $password -FullName "RDP Admin"
Add-LocalGroupMember -Group "Administrators" -Member "rdpAdmin"
Sign in once as the new user to confirm it works before you change anything else.
Account lockout is built-in and effective. It won't stop someone from trying, but it prevents unlimited password guessing.
GUI:
secpol.mscAccount Policies and then Account Lockout PolicyAccount lockout threshold: 5 invalid logon attemptsAccount lockout duration: 15 minutesReset account lockout counter after: 15 minutesIf multiple people RDP into the same server, tune these numbers to match your risk tolerance.
This is where most servers fail. A strong password is not enough if the login prompt is open to the world.
If your VPS provider has a firewall, allow inbound TCP 3389 only from:
100.64.0.0/10)Then deny everything else.
Open Windows Defender Firewall with Advanced Security and edit the inbound rule:
Scope tabIf you prefer PowerShell:
# Replace with your public IP (or VPN subnet).
$allowed = "203.0.113.10/32"
Set-NetFirewallRule -DisplayName "Remote Desktop - User Mode (TCP-In)" -Enabled True
Set-NetFirewallRule -DisplayName "Remote Desktop - User Mode (TCP-In)" -RemoteAddress $allowed
VPN-only access is simple and usually the best default.
High-level steps:
With Tailscale, your server gets a stable private IP in 100.64.0.0/10. You can scope firewall rules to that range and not worry about changing home IPs.
Changing the port won't stop targeted attacks, but it reduces random scanning and log noise.
Pick a high, unused port like 3390 or 53489.
Change the port:
Set-ItemProperty `
-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' `
-Name PortNumber `
-Value 3390
Then:
To connect from Windows:
mstsc /v:YOUR_SERVER_IP:3390
Basic hygiene, but worth calling out:
Windows Logs and then SecurityIf you see constant brute-force attempts, your server is still publicly exposed.
After you harden the server, test this:
If you only do three things:
...you eliminate the most common RDP compromises.