Restrict public RDP to trusted source addresses or route external access through an RD Gateway; then enable NLA, limit permitted accounts, install security updates, and review failed logons. Changing the listening port is not a substitute for access control.
This guide is for administrators whose Windows Server RDP endpoint is reachable from the public internet, teams deciding between an IP allowlist and RD Gateway, and .NET or IIS operators who need to validate access without interrupting business services.
Last updated October 24, 2026. Configuration guidance checked against Microsoft Learn documentation for RDP, RD Gateway, Windows Firewall, and Windows Server management.
Windows Server RDP security hardening starts at the network boundary
Treat public exposure as the first control to fix. If the server accepts RDP connections from every public source, NLA and strong passwords are useful but incomplete safeguards. The default RDP port, 3389, is listed in Microsoft's Remote Desktop Services port reference. A port change may reduce some automated discovery, but it does not restrict who can connect or strengthen the account’s authentication.
Choose an access design that the team can maintain. The relevant question is not which option sounds more secure in isolation. It is whether the allowed sources, gateway path, accounts, and recovery procedure can be reviewed and operated reliably.
| Access design | Suitable when | Required boundary | Main operational check |
|---|---|---|---|
| Source-IP allowlist | Administrators connect from known, stable public networks | Permit RDP only from approved source addresses; update the rule when those addresses change | Confirm the current administrator address is allowed before applying a rule change |
| RD Gateway | External administrators or users need a controlled access path from changing networks | Limit public access to the gateway path, then restrict the server’s RDP rule to necessary gateway sources | Confirm both the gateway connection and the gateway-to-server path work |
| RDP open to all sources with a changed port | Not a recommended access design | No reliable source boundary is created by changing the port | Replace this arrangement with an allowlist or gateway-based access |
Microsoft describes RD Gateway as a role for controlled remote access. It is a way to mediate external connections, not a service that comes automatically with a server rental. It also does not remove the need to restrict the RDP rule on the destination server. Review Microsoft's Remote Desktop Services overview when deciding whether a deployment is simple remote administration or a broader Remote Desktop Services design.
When administrators have fixed office or VPN egress addresses, an allowlist is usually simpler to operate. When access comes from changing locations, a gateway can provide a more controlled entry point, but it adds a component that must be configured, patched, and monitored. Neither design helps if the allowlist is left broad or the server remains reachable by an unintended rule.
Restrict the inbound path before changing authentication
Review every layer that can permit inbound traffic: any provider-side network rules, the Windows Defender Firewall profile, and any other firewall or routing control managed by the organization. Check the rule’s direction, enabled state, profile, local port, remote address, and target server. A narrow rule at one layer does not help if another enabled rule still accepts connections from all public sources.
For the Windows Defender Firewall graphical interface, open Windows Defender Firewall with Advanced Security. Select Inbound Rules, locate the enabled Remote Desktop rules, and inspect Properties. Review the General, Protocols and Ports, Scope, and Advanced tabs. In Scope, check which remote IP addresses are allowed. The exact display names can vary with the installed language and policy source.
PowerShell can help inspect the active rules before editing them:
Get-NetFirewallRule -DisplayGroup "Remote Desktop" |
Format-Table DisplayName, Enabled, Profile, Direction, Action
Get-NetFirewallRule -DisplayGroup "Remote Desktop" |
Get-NetFirewallAddressFilter |
Format-List RemoteAddress
The display group may be localized, and domain policy can affect the effective configuration. Use the output to identify the actual inbound rules rather than assuming that a particular display name is present. To restrict an identified rule, use its exact display name and a maintained list of trusted addresses:
Set-NetFirewallRule -DisplayName "<exact inbound rule name>" `
-RemoteAddress "<trusted public IP or CIDR>"
Microsoft documents the parameters for Set-NetFirewallRule. Apply changes from a connection that will remain permitted, and preserve a recovery path before committing them. A mistaken source range can lock out administrators just as effectively as a malicious rule can expose the server.
If the design uses RD Gateway, the server’s inbound RDP rule should accept only the necessary gateway source or sources—not every public address. The gateway itself also needs a deliberate external-access policy. Do not assume that installing a gateway role automatically creates a safe policy.
For administrators who also use SSH or another remote administration method for separate systems, CloudDDR’s remote login guide explains its documented access workflow. That guide does not replace Windows firewall validation.
NLA and account controls reduce exposure after network access is narrowed
Network Level Authentication (NLA) requires a user to authenticate before a full remote session is established. Microsoft’s NLA access guidance describes the setting and its use. Enable it after checking that the administration clients and required workflows support it. If an older tool cannot connect afterward, investigate and update that client or workflow rather than treating unrestricted access as the normal fallback.
NLA is one layer, not the perimeter. It does not limit which source addresses can reach the listener, remove unnecessary accounts, or install security fixes. Keep the network restriction in place even after NLA is enabled.
Use a dedicated administrative account with a unique, strong credential. Avoid shared administrator credentials where individual accounts can be used. Review membership of Remote Desktop Users, and also inspect the policy for Allow log on through Remote Desktop Services. The effective permission can come from a local security policy or domain policy; check both when the server is managed centrally. Microsoft's remote logon rights troubleshooting guidance covers the relevant user-right assignment.
Remove former staff, temporary accounts, and service identities that do not need interactive remote access. Do not add an account to a group simply to make a connection succeed without documenting why it needs that access. If several staff members need a shared Windows desktop for business use, pause and check the Remote Desktop Services design and licensing separately. Microsoft's RDS Client Access License guidance explains the licensing boundary. Required RDS CALs must be checked and purchased separately; this guide does not provide them.
Account lockout policy can help limit repeated guessing, but a poorly chosen policy can also lock out legitimate administrators or enable avoidable disruption. Review the organization’s recovery process before setting a threshold. Microsoft's account lockout threshold policy reference explains the policy setting. Do not treat lockout as a replacement for an access boundary.
FAQ: public RDP access decisions
What should I do if Windows Server port 3389 keeps getting scanned?
Remove access from unrestricted public sources first. Permit only trusted administrator addresses, or route external access through RD Gateway and restrict the server’s RDP rule to the required gateway path. Then review NLA, accounts, updates, and failed-logon records. Changing the port may reduce some automated probes, but it does not verify identity or control which sources can reach the server.
Should administrators expose RDP directly or use an RD Gateway?
Use a source-IP allowlist when administrators connect from known networks and someone can keep those addresses current. Consider RD Gateway when access comes from changing networks and the organization can operate the additional gateway component. In either design, keep the destination server’s RDP rule restricted. A gateway provides a controlled access path only when its own policy and the server-side rule are both maintained.
Does enabling NLA mean source-IP restrictions are no longer needed?
No. NLA adds authentication before a remote session is established, but it does not restrict the public networks that can reach the server. Maintain the source boundary, review permitted accounts, and keep Windows updated. Test client compatibility before enabling NLA, particularly if older administrative tools or business workflows depend on the current connection method.
How can I confirm that only approved accounts can sign in through RDP?
Review the Remote Desktop Users group and the Allow log on through Remote Desktop Services user right. Check both local and domain policy, since the effective setting may be centrally managed. Remove unneeded entries, then test with an approved account and an account that should not have access. Record the effective policy and the test result for the next review.
Patch and audit the controls as routine operations
Use a regular update process for Windows Server security updates. Confirm the applicable updates, plan a maintenance window, install them, and verify that the server and business services return to a healthy state. Windows Admin Center’s server update management documentation describes its update workflow. The tool used by a team may differ, but ownership and post-update checks should be explicit.
Review failed sign-ins in the Windows Security log. Look for repeated failures, accounts that should not be attempting interactive access, and source addresses that do not fit the expected administration pattern. Correlate those records with firewall changes and maintenance windows before deciding whether activity is expected. Microsoft’s Advanced Audit Policy Configuration documentation describes audit policy configuration. Logging, retention, alerting, and response depend on tools and policies the organization deploys; they should not be assumed to be included with a server.
Maintain a change record for each RDP-related rule or policy update. Capture the rule identity, allowed sources, reason for change, approver, and a test result. This makes it easier to distinguish an intended administrator address change from an accidental broadening of access.
Use an acceptance sequence that preserves recovery
Apply the changes in a controlled order. Do not edit a public firewall rule from a session that will be cut off by that same edit.
- [ ] Record the current inbound RDP rules, remote-address scopes, and the effective source restrictions at every firewall layer.
- [ ] Identify the administrator’s current trusted source address or confirm the intended RD Gateway path before editing rules.
- [ ] Prepare a rollback action and confirm an independent recovery method is available. If no recovery path exists, postpone the change rather than widening or disabling remote access in a panic.
- [ ] Restrict the Windows Firewall and any provider-side rule to the approved sources. If using a gateway, permit only the necessary gateway path to the destination server.
- [ ] Test a connection from an approved source while retaining the existing management session, if possible.
- [ ] Test from a non-approved source under controlled conditions and confirm that it cannot establish the intended RDP connection.
- [ ] Enable NLA after compatibility checks, then verify the approved client can still authenticate.
- [ ] Confirm that only authorized accounts have the relevant group membership and user right.
- [ ] Review failed-logon records after testing, document the outcome, and confirm that expected business software and administration workflows still work.
An approved-source test alone is insufficient: it shows that a connection can succeed, not that the server rejects other sources. The negative test must be performed from a controlled, non-approved network. If that test cannot be arranged safely, keep the change in a pending state and schedule a review with someone who can validate it.
Choose server access that matches the operating model
A small team with stable administrator addresses may be able to maintain an IP allowlist with little operational overhead. A team with users connecting from changing networks may need to design and operate RD Gateway. A Windows server is not, by itself, a gateway service, a monitoring service, or a substitute for the organization’s access policy.
Shared VPS or cloud instances can suit temporary workloads or deployments that need elastic capacity. For a continuously used Windows business server, however, shared resource contention, provider-defined firewall boundaries, or limited control over the host and storage layout may complicate operational planning. An independent AMD physical server is a better fit when dedicated machine resources and direct server-level control matter more than rapid, short-lived scaling. It still requires the customer to manage RDP rules, accounts, updates, and recovery.
CloudDDR’s network options and bare-metal pricing page are the right places to verify the current network and server options before choosing a deployment. Check the listed Windows Server versions, language choices, and RDP access details against the intended workload; do not assume that RD Gateway or additional security management is included. Once the server choice is clear, apply the acceptance checklist above before exposing its administration path.
Frequently asked questions
What should I do if Windows Server port 3389 keeps getting scanned?
First remove access from unrestricted public sources. Allow only trusted administrator IP addresses, or route external access through an RD Gateway and restrict the server’s RDP rule to that gateway. Then review NLA, permitted accounts, security updates, and failed-logon records. Changing the listening port may reduce some automated probes, but it does not authenticate users or enforce a trustworthy source boundary.
Should administrators expose RDP directly or use an RD Gateway?
Use a source-IP allowlist when administrators connect from stable, known networks and you can keep those addresses current. Consider RD Gateway when external access needs a controlled entry point for users on changing networks. In either design, do not leave the server’s RDP rule open to all sources; with a gateway, restrict that rule to the gateway path. Microsoft documents the gateway role and its external-access model.
Does NLA remove the need to restrict RDP source IP addresses?
No. Network Level Authentication requires a user to authenticate before a remote session is established, but it does not decide which public networks may reach the server. Keep source restrictions in place, maintain security updates, and limit permitted accounts. Check application and client compatibility before enabling NLA, especially where older remote-access software or workflows are involved.
How can I confirm that only approved accounts can sign in through RDP?
Review both the Remote Desktop Users group and the user-right assignment for allowing logon through Remote Desktop Services. Check local policy and domain policy, because an effective domain setting can override a local expectation. Remove accounts that no longer need access, then test with an approved account and a separate account that should be denied.
Dedicated AMD EPYC 7543P server, from $447/month.
