Windows Remote Desktop Protocol (RDP) is one of the most frequently targeted entry points for automated bots, ransomware operators, and brute-force credential scanners. Exposing standard port 3389 with default configuration to the public internet typically results in thousands of unauthorized login attempts per hour.
In this practical engineering guide, we demonstrate how to harden Windows Server 2022 RDP to enterprise defense standards using Network Level Authentication (NLA), custom TCP port assignment, aggressive account lockout thresholds, and automated Windows Defender Firewall rules.
Network Level Authentication requires the connecting client to authenticate credentials against CredSSP *before* establishing an interactive desktop session. This prevents unauthenticated attackers from exhausting server memory or exploiting pre-auth vulnerabilities (like BlueKeep).
Open an administrative PowerShell console:
While security through obscurity is not a replacement for strong authentication, changing the listening port from 3389 to a high unassigned port (e.g., 49822) eliminates 98% of indiscriminate automated port sweeps.
> [!IMPORTANT]
> Always verify that your new firewall rule is active before restarting the Remote Desktop Services service (`Restart-Service TermService -Force`), or you may lock yourself out.
Prevent dictionary attacks by locking accounts after 5 invalid password attempts:
If your remote workstation operates from a static IP address or dedicated VPN gateway, configure the Windows Firewall rule to exclusively permit connections from your known subnet:
Following these 4 layers of defense transforms your Windows Server instance into an impenetrable fortress against external scanning fleets.
Need clean IP addresses, DDoS mitigation, and 10 Gbps uplinks to run your proxies, containers, or Windows servers? Deploy your instance in 60 seconds.