If you use Remote Desktop Protocol (RDP) from anywhere, you should make several key security changes before you connect: enable Network Level Authentication, use a strong unique password or better yet a certificate, change the default port, and put RDP behind a VPN or RD Gateway. These changes block the vast majority of automated attacks that scan the internet for open RDP ports.
Why RDP Is a Target
RDP is built into Windows and lets you control a computer from another device. It listens on TCP port 3389 by default. Attackers constantly scan the internet for any IP address with that port open. When they find one, they try to guess usernames and passwords, often using lists of common credentials. This is called a brute-force attack, and it’s one of the most common ways hackers break into systems. Microsoft has reported that RDP brute-force attacks are a top vector for ransomware. Even a single weak password can be cracked in minutes.
The Core Security Changes
Here are the changes you should make before using RDP from anywhere. Do these in order, and test after each one.
- Enable Network Level Authentication (NLA) – This requires the client to authenticate before a full remote session is established. It blocks many attacks because the attacker must have valid credentials first. You can turn it on in the Remote Desktop settings on the host PC.
- Use a strong password or a smart card – A long passphrase (15+ characters) with mixed case, numbers, and symbols is far harder to brute-force. Even better, use a smart card or a certificate for authentication.
- Change the default port – RDP listens on 3389. Changing it to a random high port (like 53421) reduces automated scans. You must edit the registry on the host and open that port in your firewall. This is not a substitute for a strong password, but it adds a layer of obscurity.
- Use a VPN – Connect to your office network via a VPN first, then use RDP. This hides RDP from the public internet entirely. Many routers and firewalls support VPNs, and Windows has a built-in VPN client.
- Use RD Gateway – If you can’t use a VPN, set up Remote Desktop Gateway. It wraps RDP in HTTPS (port 443), so it looks like normal web traffic and is far less likely to be scanned.
How to Change the Default Port
Changing the port is a registry edit. On the host computer:
- Press Win+R, type
regedit, and press Enter. - Navigate to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. - Find the PortNumber value (it’s a DWORD). Double-click it, select Decimal, and enter a new port number between 1024 and 65535. Avoid common ones like 8080 or 443.
- Close the registry and restart the computer.
- Open that port in Windows Firewall (inbound rule) and on your router’s firewall if you’re port-forwarding.
Now when you connect from a client, you must specify the port: mstsc /v:192.168.1.10:53421 or type 192.168.1.10:53421 in the Remote Desktop client’s computer field.
Common Mistakes and Fixes
People often make these errors when securing RDP:
- Only changing the port – Port obscurity is not security. Attackers can still scan all ports. Always pair it with NLA and a strong password.
- Disabling NLA – Some older clients don’t support NLA, so users turn it off. That opens the door to pre-authentication attacks. Use a modern client that supports NLA.
- Port forwarding without a VPN – Forwarding 3389 (or a custom port) directly to the internet is risky. Even with a strong password, a zero-day vulnerability could be exploited. A VPN is the safer choice.
- Forgetting to update Windows – RDP has had critical vulnerabilities (like BlueKeep). Always install Windows updates, especially security patches.
- Using the same password for local and Microsoft accounts – If your Microsoft account password is the same as your RDP password, a breach of one compromises the other.
VPN vs. RD Gateway vs. Port Forwarding
You have three main ways to expose RDP to the internet. Here’s a comparison:
- Port forwarding – Simplest, but most dangerous. You open a port on your router and forward it to the host. It’s like leaving your front door unlocked. Not recommended unless you have no other option.
- VPN – You connect to your network’s VPN server, then use RDP as if you were on the local network. The RDP port is not exposed to the internet. This is the recommended approach for individuals and small businesses.
- RD Gateway – This is a Windows Server role that acts as a middleman. The client connects to the gateway via HTTPS, and the gateway forwards to the internal RDP host. It’s more complex to set up but works well for organizations that need to manage many users.
Costs and Alternatives
Securing RDP can cost money if you use paid VPN services or RD Gateway (requires Windows Server licenses). Free alternatives include:
- WireGuard or OpenVPN – Free, open-source VPN software you can install on a small server or a Raspberry Pi at your office.
- Tailscale – A free tier for personal use that creates a mesh VPN. It’s easy to set up and works on Windows, macOS, Linux, iOS, and Android.
- ZeroTier – Similar to Tailscale, free for personal use.
- Chrome Remote Desktop – A free alternative to RDP that uses Google’s infrastructure. It’s not RDP, but it’s secure and works from anywhere.
If you don’t need full Windows control, consider SSH (for Linux) or a remote support tool like TeamViewer (free for personal use). But for a pure Windows experience, RDP with a VPN is the best balance of security and functionality.
Frequently Asked Questions
Is RDP safe if I change the port?
Changing the port reduces automated scans, but it’s not enough. Attackers can scan all 65,535 ports in minutes. You must also enable NLA, use a strong password, and keep Windows updated. The port change is just one layer.
Can I use RDP over the internet without a VPN?
Technically yes, but it’s risky. Even with a strong password, you’re exposing a service to the internet. A VPN adds a required authentication step before RDP is even reachable. If you must use RDP directly, at least enable NLA and use a certificate.
What is the best way to secure RDP for a small business?
Use a VPN for remote access. Set up a small VPN server (like WireGuard on a cheap VPS or an old PC) and connect to that first. Then use RDP. This hides RDP from the internet entirely. Also enforce strong passwords and enable NLA on all hosts.
Does RDP work on macOS or Linux?
Yes. Microsoft has an official Remote Desktop client for macOS, iOS, and Android. For Linux, you can use FreeRDP or Remmina. The client connects to a Windows host running RDP. The security changes apply to the Windows host, not the client.
What should I do if I see a brute-force attack in my logs?
First, don’t panic. Check if any login succeeded. If not, the attacker is just guessing. Immediately change your RDP password to a very strong one, enable NLA, and consider moving RDP behind a VPN. Also check for any unusual user accounts that may have been created.
Can I use RDP with a Microsoft account?
Yes, you can use your Microsoft account credentials to log in, but it’s not recommended for remote access because the password might be the same as your email password. Better to create a local account with a unique strong password specifically for RDP.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Why Wait for Galaxy S25 Ultra? Key Reasons
- Incognito Mode: Why You Should Browse With It More
- General Motors EVs: Models You Should Know
- Ecovacs Deebot N30 Family: Models, Features, and Buying Guide
- Resident Evil 9: What I Want and Don’t Want From It
- LibreOffice Finally Got the Feature That Makes It Easier to Recommend