Guide

Secure Remote Desktop on a Windows VPS

Last updated: 30 November 2026

A Windows VPS with Remote Desktop open to the internet will attract password-guessing attempts. These steps reduce the risk, in a sensible order, with warnings where a mistake could lock you out.

Instant VPS from $7.99 a month

See Instant VPS plansHow ordering works

Before you change anything

Several steps below can cut off your own access. Prepare a way back first.

Updates first, then NLA

Remote Desktop has had serious security flaws, and updates fix them. Open Settings, then Windows Update, install everything offered, restart, and check again until nothing is left. On Server Core, the sconfig menu handles updates. Then decide when restarts may happen, so patches do not sit waiting for weeks.

Next, turn on Network Level Authentication (NLA). With NLA, a user must sign in before a full remote session is created. Microsoft recommends keeping it on. You can set it with Group Policy (gpedit.msc):

Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Security, then enable Require user authentication for remote connections by using Network Level Authentication.

Very old clients may not support NLA. Update the client instead of turning NLA off.

Accounts, passwords and lockout

A lockout policy stops an account from accepting endless guesses. Open secpol.msc, go to Account Policies, then Account Lockout Policy, and set a threshold, a lockout duration and a reset time. Ten attempts with ten minutes for both times is the default Microsoft describes for new Windows 11 devices and is a reasonable starting point. Updated Windows versions also have Allow Administrator account lockout for the built-in Administrator.

The trade-off: attackers who keep guessing your user name can keep it locked, and you with it. Microsoft says console sign-in remains possible for the built-in Administrator during such a lockout. Restricting who can reach the port, described next, solves the problem much better than lockout alone.

Firewall: allow only your address

If you connect from a fixed public IP address, let only that address reach Remote Desktop.

Warning: if the address is wrong, or your home address changes, you will be locked out. Confirm that your address is fixed and that you have a console or another way back.

In an administrator PowerShell window, look at the current rules, then restrict them. Replace the example address with yours:

Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Get-NetFirewallAddressFilter
Set-NetFirewallRule -DisplayGroup "Remote Desktop" -RemoteAddress 203.0.113.10

To undo it:

Set-NetFirewallRule -DisplayGroup "Remote Desktop" -RemoteAddress Any

Using Any reopens the port to everyone, so use it only to recover, then restrict again.

Note these points. The group name is translated on non-English Windows. A second rule elsewhere that allows port 3389 will still let others in, because the restriction applies only to the rules you changed. A provider-side firewall, if you have one, is separate.

Changing the port number may reduce log noise, but scanners can find other ports. It is not a replacement for any step here.

Put a VPN in front

The stronger design is to keep Remote Desktop off the public internet. You run a VPN, such as WireGuard, connect to it first, and reach the server over its private VPN address.

  1. Set up the VPN and confirm that it reconnects after a restart.
  2. Connect through the VPN and test Remote Desktop on the private address.
  3. Only then change the firewall rule so that the remote address is your VPN subnet.
  4. Test again from outside the VPN. The connection should fail.

The VPN becomes a key to your server, so protect its keys and remove those of lost devices. If the VPN service stops, you need your console to get back in.

Keep watching

If you are choosing a server, we offer Windows VPS plans, to be used lawfully and within our acceptable use policy.

Questions and answers

Is changing the RDP port enough?
No. It can cut down automated noise, but the service is still reachable and can be found. Use updates, NLA, strong passwords and a source restriction or VPN.

My home IP address changes. What can I do?
Use a VPN in front of Remote Desktop and allow only the VPN subnet. Restricting to a changing public address would lock you out sooner or later.

I locked myself out with the firewall. How do I get back?
Use your provider's console, if available, and change the rule back. If you have no console access, contact support.

Can attackers lock my account on purpose?
Yes, if the port is open to them and a lockout policy is active. Limiting who can reach Remote Desktop prevents that.

Related guides

Ready to try it? Instant VPS from $7.99 a month

See Instant VPS plansHow ordering works