Skip to content
AdminKit

How to harden RDP (port 3389) exposure beyond closing the port

Removing a direct port forward to RDP closes the most urgent gap, but a deployment still lacking Network Level Authentication and a real remote-access plan stays fragile — this guide covers the access-architecture work that makes RDP resilient, not just unreachable. Port 3389 isn't on AdminKit's port-check tool's nine-port list, so checking reachability takes a manual step covered below.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • Removing the port forward to 3389 is step one. Hardening covers what happens when someone reaches RDP by another path: a VPN account, a compromised laptop, a flat internal network.
  • Require Network Level Authentication on every host, so credentials are checked before a session is created.
  • Use account lockout (Microsoft’s baselines suggest 10 failed attempts as a starting point), unique credentials and MFA on the access path.
  • For admin connections, consider Remote Credential Guard or Restricted Admin mode (mstsc.exe /remoteGuard, /restrictedAdmin) to limit what credentials reach the remote host.
  • Put RDP behind an access layer, watch the logs for logon type 10 and repeated failures, and re-check reachability after every network change.

Why isn’t closing the port the end of the checklist?

A joint CISA & FBI advisory, AA22-137A, names Remote Desktop Protocol “one of the most common infection vector[s] for ransomware” — and its guidance doesn’t stop at “don’t expose it directly.” CISA’s Binding Operational Directive 23-02, which governs how federal agencies must handle internet-exposed management interfaces, treats removing direct exposure as the baseline requirement, with authentication strength and access control as the controls that determine how much damage a remaining or future gap can actually do. RDP is exactly this kind of management interface — a protocol built to grant an interactive, highly privileged session — so the hardening work matters even once the port itself isn’t reachable from outside.

What does each hardening control actually stop?

Each control below closes a different gap. None of them replaces the others, which is why the guide treats them as a checklist rather than a choice.

ControlWhat it stopsWhat it does not stop
No direct port forwardInternet-wide scanning and guessing against your login promptAttackers who reach RDP from inside, or through a VPN
Network Level AuthenticationUnauthenticated users reaching the full logon screen and session setupAttacks with valid, stolen or guessed credentials
Account lockoutUnlimited password guessing against one accountPassword spraying (one guess each across many accounts)
MFA on the access pathLogins with a correct but stolen or reused passwordFlaws in the access layer itself, if it is left unpatched
Remote Credential Guard / Restricted AdminReusable admin credentials being left on a compromised remote hostAn attacker who already controls the client machine
Access layer (VPN, gateway, broker)RDP being reachable by anyone who is not already authenticatedMisuse by authenticated users; needs logging
Logging and periodic re-checksChanges and attacks going unnoticedNothing by itself; it tells you when the others failed

Patching sits underneath every row. CVE-2019-0708 (“BlueKeep”), as described in NIST’s National Vulnerability Database, is a remote code execution flaw in Remote Desktop Services that an unauthenticated attacker triggers by connecting over RDP and sending crafted requests, and CISA lists it in its Known Exploited Vulnerabilities catalog. A flaw at that stage of the connection is why keeping RDP hosts updated matters even when the other controls are in place.

Step 1: confirm the port itself isn’t reachable

AdminKit’s port check tool checks a fixed nine-port list, and 3389 isn’t on it. Confirm your current exposure manually instead: confirm your public IP first with what is my IP, then run a TCP-aware check such as nc -vz your-public-ip 3389 from outside your network, and remove any direct port forward to 3389 if one exists. This remains the single highest-priority action — everything below assumes it’s already done.

Step 2: require Network Level Authentication

Network Level Authentication (NLA) moves authentication earlier in the connection process: a client must authenticate before a full remote-desktop session is created, rather than being shown the logon UI first. This is a built-in Windows Remote Desktop Services setting (configurable via Group Policy or directly on the host) and should be enabled on every RDP host without exception — there’s no legitimate scenario where allowing unauthenticated clients to reach the full logon screen first is the better choice.

You can confirm the setting on a host with PowerShell. The UserAuthenticationRequired value is 1 when NLA is required:

PS> (Get-CimInstance -Namespace root/cimv2/TerminalServices `
      -ClassName Win32_TSGeneralSetting `
      -Filter "TerminalName='RDP-tcp'").UserAuthenticationRequired
1

To enforce it across many machines, use the Group Policy setting “Require user authentication for remote connections by using Network Level Authentication”, found under Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security. A policy keeps a later local change from quietly switching it off.

Step 3: evaluate Restricted Admin mode for administrative connections

Microsoft’s guidance on Remote Credential Guard and Restricted Admin mode describes Restricted Admin as a mode that reduces how much of an administrator’s credential material is sent to and cached on the remote host, specifically for scenarios like helpdesk support where an admin connects to many machines of uncertain trust. It’s a specific trade-off, not a blanket best practice for every account — review Microsoft’s current documentation for your Windows version before enabling it broadly, since the right choice depends on your specific credential-delegation setup.

On the client side, the same Microsoft page documents per-connection switches, which are useful for trying the modes before you enforce them by policy:

mstsc.exe /remoteGuard        # Remote Credential Guard for this session
mstsc.exe /restrictedAdmin    # Restricted Admin mode for this session

Microsoft notes that when the “Restrict delegation of credentials to remote servers” policy is enabled, the /restrictedAdmin switch is ignored and Windows applies the policy instead. Test with one admin group first, since some workflows that rely on credentials reaching the remote host (for example, opening network shares from inside the session) behave differently in these modes.

Step 4: enforce account lockout and strong credential policy

A directly reachable login prompt is dangerous specifically because it invites unlimited guesses. Configure account lockout thresholds so repeated failed attempts against any account trigger a lockout or escalating delay, and ensure every account reachable via RDP uses a unique, strong credential rather than one reused elsewhere — credential-stuffing attacks work specifically because people reuse passwords across services.

How many attempts? Microsoft’s account lockout threshold documentation says that “Windows security baselines recommend a value of 10 could be an acceptable starting point,” and is clear that there’s no “one size fits all.” Too low a threshold lets an attacker lock out real users on purpose; too high a threshold allows more guesses. On a standalone machine you can view and set the policy from an elevated prompt (domain environments should use Group Policy instead):

C:\> net accounts
C:\> net accounts /lockoutthreshold:10 /lockoutwindow:15 /lockoutduration:15

Lockout does not stop password spraying, where an attacker tries one common password against many accounts, staying below every account’s threshold. That is the gap MFA closes in the next step.

Step 5: require multi-factor authentication on the access path

CISA’s AA22-137A advisory names multi-factor authentication directly as a mitigation for RDP-related ransomware risk, because it defeats credential-stuffing and brute-force attempts even when a correct password is guessed or reused from an unrelated breach. MFA can sit on the RDP connection itself (where your environment supports it) or, more commonly, on the VPN or access-broker layer that fronts RDP access — either way, a password alone should never be sufficient to reach an RDP session.

Step 6: put RDP behind an access layer, not a direct listener

Even with NLA, MFA, and account lockout in place, the strongest architectural fix remains not exposing the RDP listener directly to any untrusted network, including your own broader internal network if it isn’t otherwise segmented. Route access through a VPN or zero-trust access broker so the RDP login prompt itself is only ever reachable by a connection that’s already authenticated at that layer — this means a vulnerability in RDP itself, or a misconfiguration in one of the steps above, doesn’t automatically become reachable by everyone.

How do I spot RDP attacks in the Windows logs?

Hardening is easier to trust when you can see it working. Windows records logons in the Security event log, and Microsoft’s event 4624 documentation lists the logon types. Type 10, “RemoteInteractive”, means “a user logged on to this computer remotely using Terminal Services or Remote Desktop.” A quick review on a single host:

PS> Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624} -MaxEvents 500 |
      Where-Object { $_.Properties[8].Value -eq 10 } |
      Select-Object TimeCreated, @{n='User';e={$_.Properties[5].Value}},
                    @{n='Source';e={$_.Properties[18].Value}}
PatternWhat it may meanWhat to do
Type 10 logons from addresses you do not recogniseSomeone is using RDP from an unexpected pathFind the path: VPN pool, jump host or a forward you missed
Many failed logons (event 4625) across many accountsPassword sprayingCheck MFA coverage and whether the host is reachable more widely than intended
Many failed logons on one account, then lockoutsGuessing against that account, or a stale saved passwordConfirm which one before unlocking
Type 10 logons at unusual hours by admin accountsPossible misuse of a valid accountReview with the account owner; check the access layer’s logs too

With NLA on, failed RDP attempts are checked before a session is created, so they may appear with a network logon type rather than type 10. Look at the source address field as well as the logon type. Forward these events to a central log store if you have one, so a single compromised host cannot erase its own history.

Step 7: re-check periodically

Re-run the manual nc check against port 3389 on a schedule, not just once — a firewall rule change, a new router, or a restored backup configuration can silently reopen direct RDP exposure without anyone deliberately deciding to allow it.

Telnet shares RDP’s basic shape as a protocol that grants administrative access and is routinely found exposed directly to the internet, though for a different underlying reason — Telnet has no encryption at all, where RDP’s issue is almost always deployment, not the protocol’s own cryptography. See our guide on securing an exposed Telnet device for the comparable hardening checklist on that protocol.

Defensive use only

Every check this guide links to is for systems you own or are explicitly authorized to test. Never scan, probe, or attempt to log in to a system you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

I already removed the port forward. Is that enough?

It removes the most urgent exposure — a login prompt reachable by anyone on the internet — but it doesn't address what happens if the network itself is later compromised, or whether the accounts RDP relies on would hold up against credential-stuffing from a path you didn't anticipate, like a compromised VPN endpoint that still reaches the RDP host directly.

What does Network Level Authentication actually add?

NLA requires a user to authenticate before a full remote-desktop session is even created, rather than presenting the full login screen to anyone who connects. Beyond reducing resource use on the host, it means an unauthenticated connection attempt never reaches the point of interacting with the logon UI at all, narrowing what an unauthenticated network path can actually do.

What is Restricted Admin mode, and should I enable it?

It's a Windows RDP mode designed to reduce how much of an administrator's credential material gets sent to and cached on the remote host during a session, specifically to limit exposure if that remote host is later compromised. Microsoft recommends it for helpdesk-style scenarios where an admin connects to many machines of varying trust level. It's a configuration trade-off worth understanding rather than a universal default — review your specific environment against Microsoft's current guidance before enabling it broadly.

Does multi-factor authentication actually stop RDP attacks?

The joint CISA/FBI advisory on initial access techniques names MFA specifically as a mitigating control for RDP risk, because it defeats the credential-stuffing and brute-force attacks that make a directly reachable RDP login dangerous in the first place — even a correct password alone no longer grants access.

How do I check whether my own RDP setup is still reachable from outside?

AdminKit's port-check tool checks a fixed nine-port list, and 3389 isn't on it. Confirm your public IP with the My IP tool, then run a manual, TCP-aware check such as `nc -vz your-public-ip 3389` against your own IP, with authorization, to confirm 3389 doesn't respond from outside your network after you've made changes — re-checking after a configuration change is how you catch a rule that didn't take effect the way you expected.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.