The short answer
Common ports are the default port numbers that standard network services listen on. The ones to know first are 20 and 21 (FTP), 22 (SSH), 23 (Telnet), 25 (SMTP), 53 (DNS), 80 (HTTP), 110 (POP3), 135 (Microsoft RPC), 139 and 445 (SMB), 143 (IMAP), 443 (HTTPS), 3306 (MySQL) and 3389 (RDP) on TCP, plus 53 (DNS), 67 and 68 (DHCP), 69 (TFTP), 123 (NTP) and 161 (SNMP) on UDP. The cheat sheet table below lists them with what each one does, and the sections after it cover Windows and Active Directory ports, databases, web, mail and remote access.
Port numbers run from 0 to 65535 because the port field in TCP and UDP is 16 bits long. IANA, the body that assigns them, splits that space into three ranges: System Ports (0 to 1023), User Ports (1024 to 49151) and Dynamic or Private Ports (49152 to 65535), which are never assigned to a service.
A default port is a convention. Any service can listen on any port, so when you scan a lab machine, check every port and identify what's running instead of trusting the number. Our Nmap cheat sheet shows how. For OSCP® students, knowing the common ports by sight makes a scan result quick to read and tells you where to start.
We're Hacker Blueprint. Our instructor holds the OSCP, our academy has more than 600 students, and around 7,000 people have claimed our prep materials.
Our 3-minute video "Every Network Protocol Explained (THE FASTEST WAY)" is a fast tour of the protocols behind these ports, such as HTTP, DNS, TCP/IP, FTP, SMTP and SSH. Watch it first if the protocol names are new to you, then keep the tables below as your reference.
Common ports cheat sheet: the ports to know first
The protocol column shows the transport each service normally uses. IANA usually registers a port number for both TCP and UDP, even when the service only uses one of them.
| Port | Protocol | Service | What it does |
|---|---|---|---|
| 20, 21 | TCP | FTP | File transfer: 21 carries commands, 20 carries data in active mode |
| 22 | TCP | SSH | Encrypted remote shell, plus SFTP and SCP file transfer |
| 23 | TCP | Telnet | Remote shell with no encryption |
| 25 | TCP | SMTP | Sends mail between mail servers |
| 53 | UDP and TCP | DNS | Turns names into IP addresses |
| 67, 68 | UDP | DHCP | Hands out IP addresses (67 server, 68 client) |
| 69 | UDP | TFTP | Simple file transfer with no login |
| 80 | TCP | HTTP | Unencrypted web traffic |
| 88 | TCP and UDP | Kerberos | Windows domain logins |
| 110 | TCP | POP3 | Downloads mail from a mailbox |
| 111 | TCP and UDP | RPCbind | Maps RPC services, such as NFS, to their ports |
| 123 | UDP | NTP | Keeps clocks in sync |
| 135 | TCP | MS RPC | Windows RPC endpoint mapper |
| 137, 138 | UDP | NetBIOS | Name service and datagram service |
| 139 | TCP | NetBIOS session | SMB over NetBIOS |
| 143 | TCP | IMAP | Reads mail on the server |
| 161, 162 | UDP | SNMP | Device monitoring (162 receives traps) |
| 389 | TCP and UDP | LDAP | Directory lookups, including Active Directory |
| 443 | TCP and UDP | HTTPS | Encrypted web traffic (UDP for HTTP/3) |
| 445 | TCP | SMB | Windows file and printer sharing |
| 465, 587 | TCP | SMTP submission | Mail apps sending outgoing mail |
| 636 | TCP | LDAPS | LDAP over TLS |
| 993 | TCP | IMAPS | IMAP over TLS |
| 995 | TCP | POP3S | POP3 over TLS |
| 1433 | TCP | MS SQL Server | Microsoft's database server |
| 2049 | TCP and UDP | NFS | Network file shares on Linux and Unix |
| 3306 | TCP | MySQL | MySQL and MariaDB databases |
| 3389 | TCP | RDP | Windows Remote Desktop |
| 5432 | TCP | PostgreSQL | PostgreSQL databases |
| 5900 | TCP | VNC | Remote desktop over the RFB protocol |
| 5985, 5986 | TCP | WinRM | Windows remote management over HTTP and HTTPS |
| 8080 | TCP | HTTP alternate | Proxies, web app servers and admin panels |
What is a port number?
An IP address gets traffic to the right machine, and the port number gets it to the right program on that machine. Every TCP and UDP packet carries a source port and a destination port, and each is a 16-bit field. A web server listens on 443. Your browser connects to it from a temporary port your operating system picks, such as 51234, so the reply comes back to the right connection.
An IP address and a port together form a socket, written like 192.0.2.10:443. One machine can run dozens of services at once because each listens on its own port.
When a scanner reports an open port, a program accepts connections on it. A closed port is reachable with nothing listening, and a filtered port is one where a firewall drops the probe, so the scanner can't tell either way. The Nmap cheat sheet explains all six states Nmap reports.
TCP vs UDP ports
TCP and UDP each have their own 65,536 port numbers, so TCP 53 and UDP 53 are two separate ports. TCP sets up a connection with a handshake before any data moves and resends anything lost, which suits web pages, file transfers and logins. UDP sends each message on its own with no handshake, which suits quick lookups and live traffic such as DNS queries, DHCP, time sync, SNMP and voice calls.
Some services use both transport protocols. DNS answers most lookups over UDP and uses TCP for zone transfers and for answers too big for one UDP message. HTTPS normally runs over TCP 443, while HTTP/3 runs over QUIC, which uses UDP, so IANA registers 443 for UDP as well.
The difference shows up when you scan. An open UDP port often sends no reply at all, and many hosts rate-limit the error messages that closed ports send back, so UDP scans take far longer and give less certain answers than TCP scans.
Port number ranges: well-known, registered and dynamic
| Range | IANA name | Also called | What uses it |
|---|---|---|---|
| 0 to 1023 | System Ports | Well-known ports | Core services such as 22, 53, 80, 443 and 445 |
| 1024 to 49151 | User Ports | Registered ports | Registered apps such as 1433, 3306, 3389 and 5432 |
| 49152 to 65535 | Dynamic and/or Private Ports | Ephemeral ports | Temporary client ports, never assigned |
The names come from IANA's registry and RFC 6335, the document that sets out how ports get assigned. Port 0 is reserved and isn't used for normal traffic, which is why nmap -p- scans 1 to 65535.
On Linux, a program needs root or the CAP_NET_BIND_SERVICE capability to listen on a port below 1024 by default, which is one reason system services sit there. On Windows, the high range matters during a scan: Microsoft says modern Windows uses 49152 to 65535 for dynamic RPC, so a row of open ports above 49152 on a Windows host usually belongs to RPC services.
The most common TCP and UDP ports, ranked
Nmap's nmap-services file ranks every port by how often it was found open in research scans of the Internet, and Nmap's default scan of 1,000 ports per protocol comes from that ranking. Most of that data was collected in 2008, so treat the order as a rough guide. These are the top 20 for each protocol in the current file:
| Rank | TCP port | UDP port |
|---|---|---|
| 1 | 80 HTTP | 631 IPP (printing) |
| 2 | 23 Telnet | 161 SNMP |
| 3 | 443 HTTPS | 137 NetBIOS name service |
| 4 | 21 FTP | 123 NTP |
| 5 | 22 SSH | 138 NetBIOS datagram |
| 6 | 25 SMTP | 1434 MS SQL monitor |
| 7 | 3389 RDP | 445 Microsoft-DS |
| 8 | 110 POP3 | 135 MS RPC |
| 9 | 445 SMB | 67 DHCP server |
| 10 | 139 NetBIOS session | 53 DNS |
| 11 | 143 IMAP | 139 NetBIOS session |
| 12 | 53 DNS | 500 IKE (IPsec) |
| 13 | 135 MS RPC | 68 DHCP client |
| 14 | 3306 MySQL | 520 RIP routing |
| 15 | 8080 HTTP alternate | 1900 SSDP (UPnP) |
| 16 | 1723 PPTP | 4500 IPsec NAT traversal |
| 17 | 111 RPCbind | 514 Syslog |
| 18 | 995 POP3S | 49152 first dynamic port |
| 19 | 993 IMAPS | 162 SNMP trap |
| 20 | 5900 VNC | 69 TFTP |
On lab and exam machines the mix looks different from the Internet as a whole. Expect more SMB, RPC, LDAP, WinRM and web apps on high ports, and fewer mail servers.
Windows and Active Directory ports
| Port | Protocol | Service |
|---|---|---|
| 53 | TCP and UDP | DNS, usually on the domain controller |
| 88 | TCP and UDP | Kerberos |
| 135 | TCP | RPC endpoint mapper |
| 137, 138 | UDP | NetBIOS name and datagram services |
| 139 | TCP | NetBIOS session service |
| 389 | TCP and UDP | LDAP |
| 445 | TCP | SMB |
| 464 | TCP and UDP | Kerberos password change |
| 636 | TCP | LDAP over TLS |
| 3268, 3269 | TCP | Global Catalog (LDAP and LDAP over TLS) |
| 3389 | TCP | Remote Desktop |
| 5985, 5986 | TCP | WinRM over HTTP and HTTPS |
| 9389 | TCP | Active Directory Web Services |
| 49152 to 65535 | TCP | Dynamic RPC |
A host with Kerberos on 88 and LDAP on 389 open is usually a domain controller, and 3268 marks a Global Catalog server. Windows clients and member servers typically show 135, 139 and 445, often with 3389 or 5985 next to them. Windows also falls back to LLMNR on UDP 5355 and NetBIOS name service on UDP 137 when DNS can't answer, which our LLMNR poisoning guide explains. For how these services fit together on the exam, see our OSCP Active Directory guide.
Database ports
| Port | Database |
|---|---|
| 1433 | Microsoft SQL Server |
| 1434 (UDP) | SQL Server monitor (browser service) |
| 1521 | Oracle Database listener |
| 3306 | MySQL and MariaDB |
| 5432 | PostgreSQL |
| 6379 | Redis |
| 9200 | Elasticsearch HTTP API |
| 11211 | Memcached |
| 27017 | MongoDB |
Databases usually sit behind a firewall, so one that answers from outside is worth a line in your notes. Redis on 6379 and MongoDB on 27017 both sit outside Nmap's default 1,000 ports, which is one more reason to scan every port. MongoDB's documentation lists 27017 as the default, with 27018 and 27019 used in sharded clusters, and Elasticsearch takes the first free port from 9200 to 9300 for its HTTP API.
Web ports: 80, 443, 8080, 8443 and development servers
| Port | What usually runs there |
|---|---|
| 80 | HTTP |
| 443 | HTTPS over TCP, HTTP/3 over UDP |
| 3000 | Node.js development servers (Express's example app uses it) |
| 5000 | Flask's Python development server |
| 8000 | Alternate HTTP and development servers |
| 8080 | Alternate HTTP: proxies, Java app servers, admin panels |
| 8443 | Alternate HTTPS |
Browsers use 80 for http:// and 443 for https:// without being told, so any other port has to appear in the address, as in http://192.0.2.10:8080. The port number says nothing about encryption: TLS does. A service on 8080 is usually plain HTTP, a service on 8443 is usually HTTPS, and you only know for sure by connecting.
Web apps on alternate ports are easy to miss in a scan that stops at the top 1,000 ports. Admin panels and development servers often end up on 8000 to 9000 or higher.
Mail ports: SMTP, POP3 and IMAP
| Port | Protocol | Used for |
|---|---|---|
| 25 | SMTP | Mail between mail servers |
| 587 | SMTP submission | Mail apps sending mail, upgraded to TLS with STARTTLS |
| 465 | SMTP submission over TLS | Mail apps sending mail, encrypted from the first byte |
| 110 | POP3 | Downloading mail to one device |
| 995 | POP3S | POP3 over TLS |
| 143 | IMAP | Reading mail that stays on the server |
| 993 | IMAPS | IMAP over TLS |
The pattern is easy to remember: each plain mail protocol has a TLS twin on a higher port.
Remote access, file sharing and VPN ports
| Port | Service |
|---|---|
| 21 | FTP |
| 22 | SSH, SFTP and SCP |
| 23 | Telnet |
| 69 (UDP) | TFTP |
| 445 | SMB file sharing |
| 873 | rsync |
| 1080 | SOCKS proxy |
| 1194 | OpenVPN |
| 1723 | PPTP VPN |
| 2049 | NFS |
| 3389 | RDP |
| 500, 4500 (UDP) | IPsec VPN (key exchange and NAT traversal) |
| 5900 | VNC |
| 5985, 5986 | WinRM |
FTP, Telnet, TFTP and VNC without TLS send data in clear text, which is why a network security review flags them first.
How to check which ports are open
To see what's listening on your own machine:
| System | Command | What it shows |
|---|---|---|
| Linux | sudo ss -tulpn |
Listening TCP and UDP ports with the program behind each |
| Windows (CMD) | netstat -ano |
Connections and listening ports with process IDs |
| Windows (PowerShell) | Get-NetTCPConnection -State Listen |
Listening TCP ports |
| macOS | sudo lsof -nP -iTCP -sTCP:LISTEN |
Listening TCP ports with the program behind each |
To check another host you have permission to test, scan every TCP port first with nmap -p- TARGET, then identify what runs on the open ones with nmap -sV -sC -p PORTS TARGET. Our Nmap cheat sheet covers the full workflow, including UDP. To look up the registered name of a port, search IANA's registry or run grep -w 8443 /etc/services on Linux.
Default ports are a starting point
Without -sV, Nmap names each open port from its own table, which is a guess based on the number alone. That table calls 3000/tcp "ppp", and on a lab machine 3000 is far more likely to be a Node.js app. Admins move SSH to 2222 to cut log noise, and web apps land on any high port. Run a version scan, or connect to the port and read what it sends back, before you decide what a service is.
Do you need to memorize port numbers?
Learn the ports in the first table by sight. They come up in almost every scan, and recognizing them at a glance tells you which services to enumerate first. For everything else, a reference beats memory. The OSCP+™ exam lets you use your own notes, as our guide to OSCP+ allowed tools explains, so keep a port table like this one in your notes and spend your memory on what to check for each service.
That second part matters more than the numbers. Our methodology notes for OSCP prep are built around it: 690+ topics of copy-paste commands in the order you work through a box, in CherryTree and in Markdown for Obsidian.
Common ports on OSCP-style lab machines
The mix of open ports tells you what kind of machine you're facing before you run anything else:
- Linux machines usually show SSH on 22 and at least one web port. FTP, Samba on 139 and 445, NFS on 2049 or a database turn up often enough to check for every time.
- Windows machines usually show 135, 139 and 445, often with RDP on 3389 or WinRM on 5985.
- Domain controllers add DNS on 53, Kerberos on 88, LDAP on 389 and 636, and the Global Catalog on 3268.
- Anything above 1,000 is easy to miss, so scan all 65,535 TCP ports, then the top UDP ports.
Our guide to OSCP-like machines lists practice boxes where you'll meet all of these.
FAQ
What are port numbers?
Port numbers are 16-bit numbers from 0 to 65535 that tell a computer which program should get a piece of network traffic. The IP address finds the machine, and the port finds the service on it, such as 443 for HTTPS or 22 for SSH.
Why do port numbers stop at 65535?
The port fields in TCP and UDP headers are 16 bits long, which allows 65,536 values: 0 to 65535. Port 0 is reserved, so services use 1 to 65535.
How many common ports are there?
There's no official list. The 30 or so ports in our first table cover most of what you'll see in a scan, and Nmap's default scan checks the 1,000 most common ports for each protocol. IANA's registry holds thousands of registered ports, and most of them are rarely seen.
What is the difference between port 8080 and 443?
Port 443 is the standard port for HTTPS, and browsers use it automatically for https:// addresses. Port 8080 is a registered alternate HTTP port, used by proxies and web app servers, and it usually carries plain HTTP. A site on 8080 needs the port in the address, as in http://host:8080.
What is port 8443 used for?
Port 8443 is the usual alternate port for HTTPS, often used by admin panels and app servers that already have something on 443. IANA registers it as "pcsync-https", and Nmap's table describes it as a common alternative HTTPS port.
What is port 3000 used for?
Port 3000 is a common default for development web servers. Express's hello world example listens on 3000, so many Node.js apps start there. IANA has it registered to other services, so check what's running with a version scan.
What is port 5555 used for?
Android's adb tool uses TCP 5555 when you connect to a device over the network, through adb tcpip 5555. IANA registers 5555 as "personal-agent". An open 5555 on a phone or other Android device usually means wireless debugging is on.
Is port 2222 an SSH port?
Not officially. IANA registers 2222 to EtherNet/IP, an industrial protocol. Plenty of admins run SSH on 2222 anyway to keep it off the default port, so check with nmap -sV -p 2222 TARGET or connect to it.
What is port 135 used for?
Port 135 is the Microsoft RPC endpoint mapper. Windows services register with it, and clients ask it which dynamic port a service is using. It's open on most Windows machines.
What is port 7777 used for?
Nothing standard runs there. IANA registers 7777 to a service called cbt, and Nmap's data shows it's rarely open. On a lab machine, treat it like any unknown port: run a version scan and connect to it.
Why is port 80 still used?
Most sites keep port 80 open to catch plain http:// visits and redirect them to HTTPS on 443. Certificate authorities such as Let's Encrypt also connect on port 80 to check you control a domain before they issue a certificate.
How do I find which port a service is using?
On your own machine, run sudo ss -tulpn on Linux, netstat -ano on Windows or sudo lsof -nP -iTCP -sTCP:LISTEN on macOS. On a host you have permission to test, scan every port with nmap -p- and identify the services with nmap -sV.
Should I memorize common ports for the OSCP?
Learn the 30 or so in our first table by sight, and keep the rest in your notes, since the OSCP+ exam lets you use your own notes. What to check on each service matters more than the numbers.
Practice reading port scans
Pick a lab you're allowed to scan, run a full port scan, and name every open port before you look anything up. Our OSCP-style Active Directory chains give you Windows networks to practice on, several of them free, and the OSCP-like machines guide points to more.
One of our students, thehuskyhacker, wrote: "Your program has been the best I've seen. The notes have been more than helpful, and seeing a step-by-step helped out a lot." (More reviews)
Try our 30+ hour course for OSCP prep with a free trial, or start with one of our free Active Directory chains.
Found a port you can't place? Ask in the Hacker Blueprint Discord.
Sources
- IANA: Service Name and Transport Protocol Port Number Registry (System, User and Dynamic Ports ranges, port 0 reserved, registered names for every port in the tables, 443 for TCP and UDP, 2222 EtherNet/IP, 5555 personal-agent, 7777 cbt, 8443 pcsync-https; registry last updated Nov 30, 2026; checked Dec 1, 2026)
- RFC 6335: IANA Procedures for Port Numbers (Well Known, Registered and Dynamic ranges, 16-bit port namespaces for TCP, UDP, SCTP and DCCP; checked Dec 1, 2026)
- RFC 9293: Transmission Control Protocol (16-bit source and destination port fields; checked Dec 1, 2026)
- RFC 9114: HTTP/3 (HTTP over the QUIC transport, endpoint discovery with Alt-Svc; checked Dec 1, 2026)
- Microsoft: Service overview and network port requirements for Windows (DNS 53, Kerberos 88 and 464, RPC 135, NetBIOS 137 to 139, LDAP 389 and 636, SMB 445, Global Catalog 3268 and 3269, SQL Server 1433, RDP 3389, WinRM 5985 and 5986, dynamic RPC 49152 to 65535; page dated Feb 12, 2026; checked Dec 1, 2026)
- Nmap: Port Scanning Overview (most popular ports, Internet scan data from 2008; checked Dec 1, 2026)
- Nmap: Well Known Port List: nmap-services (the port frequency column; checked Dec 1, 2026)
- Nmap: Port Specification and Scan Order (default 1,000 ports per protocol,
-F,--top-ports; checked Dec 1, 2026) - Nmap on GitHub: nmap-services (top 20 TCP and UDP ports by frequency, 3000/tcp listed as ppp, 1521 as Oracle, 8000 and 8443 as common alternative HTTP and HTTPS ports, Redis and MongoDB outside the top 1,000; last changed Aug 7, 2026; checked Dec 1, 2026)
- MongoDB: Default MongoDB Port (27017 default, 27018 and 27019; checked Dec 1, 2026)
- Elasticsearch: Networking (HTTP port defaults to 9200 to 9300; checked Dec 1, 2026)
- Express: Hello world example (the example app listens on port 3000; checked Dec 1, 2026)
- Flask: Quickstart (development server on 127.0.0.1:5000; checked Dec 1, 2026)
- Android Developers: Android Debug Bridge (adb) (
adb tcpip 5555; checked Dec 1, 2026) - Hacker Blueprint: Every Network Protocol Explained (THE FASTEST WAY) (YouTube, Jan 7, 2025)


