Common Ports and Services to Know

On this page
  1. The ports worth knowing
  2. Why does the mapping matter to attackers?

A relatively small set of ports carries most of the network traffic you will ever investigate. Knowing which service typically lives on which port is basic literacy for security work — it turns a line in a scan or a firewall log from a number into a meaning, and speeds up everything from recon to incident response.

The ports worth knowing#

PortServiceNote
22SSHRemote admin; harden it
25 / 587SMTPEmail sending
53DNSName resolution
80HTTPWeb (unencrypted)
443HTTPSWeb over TLS
3389RDPWindows remote desktop
445SMBWindows file sharing
3306 / 5432MySQL / PostgreSQLDatabases
21FTPLegacy file transfer
23TelnetLegacy, plaintext — avoid

Ports 80 and 443 are worth internalizing especially, since almost all web traffic — and most web attacks — arrive over them.

Why does the mapping matter to attackers?#

Because open ports advertise services, and services have known vulnerabilities. An attacker who scans a host and sees 3389 open thinks “RDP — brute force or a known CVE?”; 445 open suggests SMB attacks. The port list is the first filter that turns a scan into a plan — which is why defenders close everything they do not need.

Knowing your ports underpins scanning and firewalling. More at the Network Security hub.

Frequently asked questions#

Why should you memorize common ports?

Because port numbers are the shorthand of network security. Seeing port 22, 443, or 3389 in a scan or log instantly tells you what service is likely involved and what risks apply. Recognizing common ports speeds up reconnaissance, log analysis, firewall configuration, and incident response.

Does a service always run on its standard port?

No. Standard ports are conventions, not rules — SSH usually runs on 22 but can be moved anywhere, and attackers sometimes run services on unexpected ports to evade notice. Version and service detection (as in Nmap) identifies the actual service regardless of the port it sits on.

Sources & further reading