PortScan › Port guide › Port 3389

Port 3389 (RDP Remote Desktop): What Happens When It's Open and Safer Alternatives

TCP 3389RDP (Remote Desktop)Remote accessExposure risk: High

Port 3389 is Windows Remote Desktop (RDP). Exposed, it draws nonstop brute forcing and is a top ransomware entry point. NLA, account lockout, VPN and more.

What is port 3389?

Port 3389 is the Windows Remote Desktop (RDP) port. It is the most popular way to use a home PC from elsewhere or to manage Windows servers, so opening 3389 with router port forwarding is extremely common.

But RDP is also one of ransomware groups' favorite entry points. An internet-facing port 3389 receives login attempts all day long.

When it is normally open

Risks if it is open

Endless brute forcing

Open port 3389 and failed logons (event ID 4625) pile up in Event Viewer's Security log every minute. When the attacks trip the account lockout policy, you can end up locked out of your own machine.

Ransomware intrusion

Attackers who get in over RDP disable antivirus and encrypt network shares as well. In reports from multiple security vendors, RDP consistently ranks near the top of ransomware initial access vectors.

BlueKeep

CVE-2019-0708, disclosed in 2019, was a wormable vulnerability allowing remote code execution before authentication. Unpatched Windows 7 and Server 2008 machines are still at risk today.

Security checklist

How to check whether port 3389 is open

From outside (is it exposed to the internet?)

Whether your server or home router accepts port 3389 from the internet can only be confirmed by connecting from outside. A check from inside the same network bypasses the router's firewall and gives a different answer.

PortScan opens a real TCP connection from the Cloudflare edge and reports Open, Closed or Filtered. Members can scan every port on their own IP for free and other targets free once a day.

Check port 3389

On the server (what is listening?)

Windows (PowerShell):

netstat -ano | findstr ":3389 "
Get-NetTCPConnection -LocalPort 3389 -State Listen | Select LocalAddress,OwningProcess

Linux:

sudo ss -tlnp | grep ':3389 '

If it listens on 0.0.0.0 or [::] it is open on every network; 127.0.0.1 means only that machine can connect. To test port 3389 on a server from another computer, use Test-NetConnection server-address -Port 3389 on Windows or nc -vz server-address 3389 on Linux and macOS.

How to close or restrict port 3389

The best fix is to turn the service off or make it listen only on 127.0.0.1 (see the checklist above). If you need the service but must keep it off the internet, use a firewall.

Windows Firewall

# Administrator PowerShell
New-NetFirewallRule -DisplayName "Block TCP 3389" -Direction Inbound -Protocol TCP -LocalPort 3389 -Action Block
# To allow a single IP instead (block rules take precedence, so use this instead of the rule above)
New-NetFirewallRule -DisplayName "Allow TCP 3389 from office" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 203.0.113.10 -Action Allow

Linux (ufw)

sudo ufw deny 3389/tcp
# Allow a single IP only
sudo ufw allow from 203.0.113.10 to any port 3389 proto tcp

On a cloud server, also check port 3389 in the security group (inbound rules), which is separate from the OS firewall. For services running in Docker, the rules Docker creates can bypass ufw, so binding the port to localhost with -p 127.0.0.1:3389:3389 is the reliable option.

Router

At home or in a small office, open the router's admin page and check whether port 3389 is in the port forwarding list, whether DMZ is enabled, and whether any program opened ports by itself through UPnP. If any of the three applies, port 3389 on your PC is directly visible from the internet.

How to read the scan result

The verdict can depend on where you connect from. Many ISPs (including most Korean ISPs) block some ports such as 135, 139 and 445 on their network, so the same server can look Filtered from inside that network and Closed from abroad.

FAQ

Is it okay if I only change the external port in port forwarding (e.g. 33890 → 3389)?
Automated attacks drop, but a full port scan finds it quickly. RDP gives itself away on the very first connection screen.
Do Chrome Remote Desktop or AnyDesk require opening a port?
No. These services go through relay servers, so there is no need to open 3389. Instead, turn on two-factor authentication for your account with that service.
445 SMB135 MS-RPC5900 VNC22 SSH

Last updated 2026-11-04 · Use this guide to check systems you manage. Scanning systems without permission may carry legal liability.