Publishing a Windows remote desktop port to the internet can attract continuous scanning and login attempts. A safer approach is to limit which networks can connect, require strong authentication and verify that administrators can recover access if a rule causes an outage.

Understand who needs to connect

List legitimate users and their network locations. Where practical, prefer VPN access, a secure gateway or an allowlist of trusted source addresses instead of permitting broad inbound RDP traffic. Understand that home and mobile IP addresses may change, making static allowlists harder to maintain.

Keep a recovery route first

Before adjusting Windows Firewall, confirm that an approved provider console or alternative management path is available. Keep one active session open while testing a second connection from an allowed network. Coordinate changes if the machine supports business-critical users.

Apply the smallest necessary exposure

Review the existing inbound RDP rule and its permitted addresses. Narrow the scope to required sources rather than enabling unrestricted access. Keep a record of the intended configuration, why it exists and how to undo it if it blocks legitimate users.

Add account protections

A firewall cannot compensate for weak credentials. Use unique accounts, sensible privileges, supported Network Level Authentication, multifactor authentication when available, account reviews and routine patching. Disable or remove accounts that no longer have a legitimate purpose.

Verify and monitor

Test from an allowed network and from an unapproved location where practical. Record successful and blocked behavior, then review logs for repeated failures. Avoid making emergency firewall changes without someone who can recover the host.

Never close your only working remote administration session before checking the new rule from another authenticated connection.