TCP/UDP port numbers: common ports and security checks

PublishedToolTCP/UDP Port Number Lookup

Contents
  1. Port numbers are divided into three ranges
  2. Ports you meet often in development and operations
  3. How to check without a tool
  4. Plaintext protocols and their encrypted alternatives
  5. What to check when running firewalls and ports
  6. Summary
  7. Frequently asked questions

When you're setting up a firewall or doing port forwarding, a bare number often tells you nothing about what the port is for. Whether 3306 is MySQL or PostgreSQL, or why 8080 gets used alongside 80, is not something you memorize — it's something you look up.

A port, the basic unit of identification in network communication, has its role officially pre-assigned by the Internet Assigned Numbers Authority (IANA). This article covers how the port number ranges are divided and the roles of the main TCP/UDP ports you actually run into in development and operations.

Port numbers are divided into three ranges

When a computer communicates over a network, it needs not only an IP address (which device) but also a port number that identifies which process on that device receives the data. The port range from 0 to 65535 is split into the three sections below by purpose.

RangeSpanPurpose
Well-Known Ports0 ~ 1023Permanently reserved by IANA for standard protocols. Used by core system daemons such as web and mail servers
Registered Ports1024 ~ 49151Registered with IANA by companies and software vendors for their own services
Dynamic / Private Ports49152 ~ 65535Handed out temporarily by the operating system when a client connects to a server

Ports you meet often in development and operations

Below are the roles of the standard ports that come up constantly in practice.

  • 80 (TCP · HTTP): The default port for ordinary, unencrypted web browsing.
  • 443 (TCP · HTTPS): The port for secure web traffic encrypted with TLS/SSL.
  • 22 (TCP · SSH): The port used for remote command-line login to Linux and Unix servers.
  • 3306 (TCP · MySQL): The default communication port for the MySQL database.
  • 8080 (TCP · alternate HTTP): A common alternate port used when running a local dev server (Tomcat, Spring Boot, and so on) to avoid colliding with port 80.

How to check without a tool

IANA publishes the official assignment list as the "Service Name and Transport Protocol Port Number Registry," free for anyone to browse. On macOS or Linux, you can also type cat /etc/services in the terminal to see the main port-to-service mapping stored locally.

The catch is that this means searching English source documents or scrolling through a long file by eye, which is a hassle when you want a port's purpose and its security caveats at the same time.

Check it with our free tool. Search by port number or service name (for example, ssh or mysql) and the protocol, purpose, and security recommendations for common ports show up right away in a table.

TCP/UDP Port Number Lookup

Search by port number or service name to see the standard use and security notes right away.

Plaintext protocols and their encrypted alternatives

Some older protocols send data with no encryption at all. When a replacement port does the same job with encryption, use that one whenever you can.

Plaintext protocolPortEncrypted alternative
FTP21SFTP / FTPS
Telnet23SSH (22)
HTTP80HTTPS (443)
POP3110POP3S (995)
IMAP143IMAPS (993)
LDAP389LDAPS (636)

Beyond these, some frequently used service ports need caution in their default configuration itself. SMB (445) has had known vulnerabilities discovered again and again, so it's safest not to expose it directly to the internet, and Redis (6379) ships with no authentication by default, so you need to check the requirepass setting.

What to check when running firewalls and ports

Widely known ports like MySQL's 3306 and SSH's 22 are easy targets for automated scanning and brute-force attempts. Moving a port to a different registered range can reduce how often automated scans hit it, but that alone does not give you real security. With SSH, key-based authentication instead of passwords and blocking root login are the more substantive defenses.

A port left open that you don't use is an attack surface in itself. On macOS and Linux you can run sudo lsof -i -P -n | grep LISTEN to see which ports and processes are currently open, and you can test whether a specific port is open with nc -zv host port.

Summary

  • Port ranges split into three sections: Well-Known (0 ~ 1023), Registered (1024 ~ 49151), and Dynamic/Private (49152 ~ 65535).
  • 80, 443, 22, 3306, 8080, and others are standard ports you'll run into regularly in practice.
  • For protocols that send plaintext, like FTP, Telnet, HTTP, POP3, IMAP, and LDAP, check the encrypted alternative first if one exists.
  • You can inspect open ports yourself with standard commands like lsof and nc; when you want to look up a port's purpose and security recommendations fast, a lookup tool is easier.
TCP/UDP Port Number Lookup

Search by port number or service name to see the standard use and security notes right away.

Frequently asked questions

Why does port 8080 exist separately?

Port 80 often requires system privileges and may collide with a web server that's already running. So when you spin up a local dev server or an application server like Tomcat, the convention is to use 8080 instead.

Do I have to change SSH's default port 22?

Changing the port can reduce how often automated scans hit you, but it isn't a security measure by itself. Using key-based authentication and blocking remote root logins are the more substantive defenses.

How do I check whether a specific port is open?

To see open ports on your local machine, use sudo lsof -i -P -n | grep LISTEN (macOS and Linux). To check whether a specific port on a specific destination server accepts connections, test it with nc -zv host port.

What's the difference between well-known ports and registered ports?

Ports 0 ~ 1023 are well-known ports, permanently reserved by IANA for core system services like web and mail. Ports 1024 ~ 49151 are registered ports, used by specific applications (databases, for example) that have registered them with IANA.

This article was adapted from our Korean original. Read the Korean original

Related articles

  1. px to rem Calculator: Check the Formula by HandSee exactly how px converts to rem, em, %, and pt, and why the same number renders differently when rem uses the root and em uses the parent.
  2. Query String Array Parameters: Why Languages Parse Them DifferentlySame-key query parameters like tag=a&tag=b aren't arrays in URLs. See how browsers and frameworks read them, and how to check which rule a server uses.
  3. Regex Replace With $1 and $&: What Each One SubstitutesSee exactly what $1, $2, and $& turn into in regex find and replace, why $ stays literal with regex mode off, and what the replacement count tallies.
  4. Regex Special Characters and Flags: Check Matches Without CodeSee what ^, $, ., and * mean, how the g, i, m, s, u, and y flags work, and check match counts and capture groups without writing code.
  5. Regex to Extract Emails and URLs from Text: 5 PatternsFive ready-to-use regex patterns for pulling emails, URLs, IPs, phone numbers, and numbers out of text, plus capture groups to keep just the part you want.
  6. Regex symbols explained: read any pattern part by partRead a regular expression by splitting it into anchors, character classes, groups, and quantifiers, and see how a free tool explains each symbol.

Related tools