Microsoft Remote Desktop Protocol for Windows desktops and servers. UDP 3389 is used as a faster transport alongside TCP.
Microsoft Remote Desktop Protocol for Windows desktops and servers. UDP 3389 is used as a faster transport alongside TCP.
Expose only to trusted sources. Do not expose RDP directly to the internet. It is a top ransomware entry point through password spraying and past bugs such as BlueKeep (CVE-2019-0708). Put it behind a VPN or Remote Desktop Gateway, require Network Level Authentication and MFA, and lock out repeated failures.
Registry dates for this port: last modified 2022-11-03.
sudo ss -tlnp 'sport = :3389'sudo ss -ulnp 'sport = :3389'sudo lsof -nP -i :3389sudo netstat -tlnp | grep ':3389 'netstat -ano | findstr :3389Get-NetTCPConnection -LocalPort 3389 -State Listen | Select LocalAddress,OwningProcessnc -vz -w 5 HOST 3389Test-NetConnection HOST -Port 3389nc -vzu -w 5 HOST 3389Replace 203.0.113.10 with the address or network you trust. With ufw, make sure the default incoming policy is deny.
sudo ufw allow from 203.0.113.10 to any port 3389 proto tcpsudo iptables -A INPUT -p tcp --dport 3389 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 3389 -j DROPsudo nft add rule inet filter input ip saddr 203.0.113.10 tcp dport 3389 accept
sudo nft add rule inet filter input tcp dport 3389 dropNew-NetFirewallRule -DisplayName 'TCP 3389 trusted' -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 203.0.113.10 -Action Allowsudo ufw allow from 203.0.113.10 to any port 3389 proto udpsudo iptables -A INPUT -p udp --dport 3389 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 3389 -j DROPsudo nft add rule inet filter input ip saddr 203.0.113.10 udp dport 3389 accept
sudo nft add rule inet filter input udp dport 3389 dropNew-NetFirewallRule -DisplayName 'UDP 3389 trusted' -Direction Inbound -Protocol UDP -LocalPort 3389 -RemoteAddress 203.0.113.10 -Action AllowAll port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.