Search Authority

The Ultimate Guide to TCP Port Numbers: Master the Basics

TCP port numbers are the discreet channels that applications use to direct network traffic to the correct process on a host.

Mara Ellison Jul 25, 2026
The Ultimate Guide to TCP Port Numbers: Master the Basics

Introduction to TCP Port Numbers

TCP port numbers are the discreet channels that applications use to direct network traffic to the correct process on a host.

By acting as identifiers at the transport layer, they enable multiple services to share the same IP address without conflict.

Common Standard Ports Reference

The following table maps well-known TCP ports to their primary protocols and typical use cases for quick lookup.

Port Protocol Common Service Use Case
20 TCP FTP Data File transfer payload
21 TCP FTP Control Session commands and authentication
22 TCP SSH Secure shell and encrypted remote access
25 TCP SMTP Email server message submission and relay
53 TCP/UDP DNS Domain name resolution requests
80 TCP HTTP Unencrypted web browsing
110 TCP POP3 Retrieving email from a server
143 TCP IMAP Synchronized email access and management
443 TCP HTTPS Encrypted web traffic and secure APIs
3306 TCP MySQL Database client-server connections
5432 TCP PostgreSQL Database client-server connections

Common Ports in Networking

Common ports in networking form the default dialing codes that routers and firewalls recognize for standard services.

Because many network appliances filter traffic by these well-known values, understanding them is essential for reliable connectivity.

From remote administration to secure web access, these ports define how clients locate and interact with servers across the internet.

Securing Application Ports

Securing application ports starts with disabling any service that does not need to be exposed to the network.

You should explicitly bind applications to specific interfaces so that only trusted subnets can reach sensitive endpoints.

Combining host-based firewall rules with regular patch management reduces the attack surface associated with open listeners.

Troubleshooting Port Conflicts

Port conflicts occur when two processes attempt to listen on the same TCP port number on a single interface.

Symptoms include failed service startups, connection resets, or applications hanging during network operations.

Using built-in tools to list active sockets helps identify the culprit and reassign ports or consolidate services efficiently.

Best Practices for Managing TCP Ports

  • Document every open port and the service it supports in a centralized inventory.
  • Apply the principle of least privilege to restrict source IPs allowed to connect.
  • Use encrypted protocols like HTTPS or SSH tunneling for remote access.
  • Schedule regular scans to detect unexpected listeners or unauthorized changes.
  • Automate firewall rule updates through configuration management tools to maintain consistency.

FAQ

Reader questions

Which TCP port should I use for a custom internal API service?

Choose a port in the dynamic or private range, such as 8080 or 8443, and document it to avoid collisions with standard services.

How can I verify which process is listening on a specific port on my server?

Use command-line tools like netstat or ss combined with lsof to map the port number to the owning application and PID.

Is it safe to run a database server on the default port 3306 in a production environment?

It is safer to change the default port, enforce encryption, and apply strict firewall rules, but the strongest protection is to restrict access to trusted networks only.

What should I do if my application fails to bind to a configured port at startup?

Check for existing processes using the port, verify firewall rules, ensure correct user permissions, and review service configuration files for typos.

Related Reading

More pages in this topic cluster.

How to Tell the Difference Between Silver and Aluminum (Silver vs Aluminum)

Spotting the difference between silver and aluminum helps you verify purchases, appraise items, and avoid overpaying for misidentified metals. While they look similar at first g...

Read next
Excel Keyboard Shortcut for Strikethrough: Easy Step-by-Step Guide

Mastering the Excel keyboard shortcut for strikethrough helps you track completed tasks, revisions, and action items without leaving the keyboard. This small efficiency habit sp...

Read next
Durham NC News Today: Latest Headlines & Updates

Durham NC news keeps the Research Triangle region informed about breakthrough healthcare, education, and downtown development. Local reporting connects residents and visitors to...

Read next