Port 3389: RDP

Port 3389 (TCP/UDP) is used by RDP. Windows Remote Desktop. Heavily targeted by ransomware groups; put it behind a VPN.

3389Port
TCP/UDPProtocol
ms-wbt-serverIANA service name
Remote accessCategory

Port range

3389 is a registered port (range 1024–49151). Any user can bind to it; IANA records which service registered the number.

Security

Port 3389 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 3389 in a firewall

ufw         sudo ufw allow 3389/tcp
            sudo ufw allow 3389/udp
iptables    sudo iptables -A INPUT -p tcp --dport 3389 -j ACCEPT
            sudo iptables -A INPUT -p udp --dport 3389 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=3389/tcp
            sudo firewall-cmd --permanent --add-port=3389/udp
Windows     New-NetFirewallRule -DisplayName "RDP 3389" -Direction Inbound -Protocol TCP -LocalPort 3389 -Action Allow

Check if port 3389 is open

nc -vz example.com 3389
Test-NetConnection example.com -Port 3389   # PowerShell
sudo ss -tulpn | grep ':3389 '   # what is listening locally (Linux)

Other remote access ports

Frequently asked questions

What is port 3389 used for?
RDP. Windows Remote Desktop. Heavily targeted by ransomware groups; put it behind a VPN.
Is port 3389 TCP or UDP?
Both are assigned. Check which one your software actually listens on.