TCP · Port 3389IANA Registered

Port 3389 — RDP (Remote Desktop Protocol)

Microsoft proprietary protocol providing graphical remote desktop access to Windows servers and client workstations.

⚡ Primary Use Cases & Environments

  • ✓Remote administration of Windows Server machines
  • ✓Remote workforce access to Windows desktops

🛡️ Security & Vulnerability Analysis

One of the top vectors for ransomware, credential stuffing, and brute-force attacks worldwide. Never expose port 3389 directly to the internet; use a VPN, Cloudflare Access, or Remote Desktop Gateway with Network Level Authentication (NLA) enabled.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :3389
Inspects whether any local process daemon is bound to port 3389.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 3389 -sV --script rdp-enum-encryption <target-ip>
Probes target IP to determine whether port 3389 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
rdp or tcp.port == 3389Wireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw allow from <office-vpn-ip> to any port 3389 proto tcp
Applies a persistent Linux UFW firewall rule for port 3389.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p tcp -s <office-vpn-ip> --dport 3389 -j ACCEPT
Appends a direct netfilter kernel rule to the INPUT chain for port 3389.

❓ Frequently Asked Questions (FAQ)

Why is exposing RDP port 3389 to the internet dangerous?

Automated botnets scan IPv4 continuously for open port 3389. Attackers attempt brute-force attacks or exploit BlueKeep vulnerabilities to execute ransomware directly onto the machine.

What is Network Level Authentication (NLA) in RDP?

NLA requires users to authenticate their Windows credentials before a full graphical RDP session and desktop environment is initialized, drastically mitigating denial of service and unauthenticated exploit attempts.

Related Networking Tools & Guides