keepcalculator

06 Numbers and Powers

Common Network Ports: A Practical Reference

Card No. 06·88274 · Updated · Standard formula, shown below

Common network ports are standardized numeric identifiers (0–65535) that let computers route traffic to the right service, such as web pages (port 80/443), email (25/110/143/587), or file transfer (20/21). This article explains what ports are, how they work, which ones you’ll encounter most often, and how to choose and secure them.

What Are Network Ports?

In TCP/IP networking, a port is a 16-bit number (0 to 65535) that identifies a specific process or service on a device. When data arrives at a computer, the operating system reads the destination port to decide which application should receive it. For example, a web server listens on port 80 (HTTP) or 443 (HTTPS); when you type example.com in a browser, your computer sends a request to port 80 or 443 on that server.

Ports work alongside IP addresses: the IP address finds the device, the port finds the service. Think of an IP address as a building’s street address and a port as the apartment number inside.

Port Number Ranges and IANA Roles

The Internet Assigned Numbers Authority (IANA) divides ports into three ranges:

  • Well-known ports (0–1023): Reserved for core internet services (HTTP, HTTPS, SSH, DNS, etc.). On most systems, binding to these requires administrator/root privileges.
  • Registered ports (1024–49151): Used by user-level applications and services (e.g., MySQL on 3306, RDP on 3389).
  • Dynamic/private ports (49152–65535): Used for temporary client connections (ephemeral ports) and internal services.

These assignments are conventions, not hard rules—any service can run on any port if configured, but following the standard avoids conflicts and makes firewalling easier.

Most Common Ports and Their Uses

Here are the ports you’ll see most often in everyday networking and troubleshooting:

  • 20/21 (FTP): File Transfer Protocol—21 for control, 20 for data (active mode). Now largely replaced by SFTP (port 22).
  • 22 (SSH): Secure Shell for encrypted remote login and secure file transfer (SCP/SFTP).
  • 23 (Telnet): Unencrypted remote terminal—obsolete for security reasons.
  • 25 (SMTP): Simple Mail Transfer Protocol for sending email between servers. Often blocked by ISPs to prevent spam.
  • 53 (DNS): Domain Name System—translates domain names to IP addresses. Uses UDP (and TCP for large responses).
  • 67/68 (DHCP): Dynamic Host Configuration Protocol—server on 67, client on 68, assigns IP addresses automatically.
  • 80 (HTTP): Unencrypted web traffic.
  • 110 (POP3): Post Office Protocol v3—retrieves email from a server (downloads messages).
  • 143 (IMAP): Internet Message Access Protocol—retrieves email but keeps it on the server (syncs across devices).
  • 443 (HTTPS): HTTP over TLS/SSL—encrypted web traffic, the default for modern websites.
  • 445 (SMB): Server Message Block for Windows file and printer sharing.
  • 3306 (MySQL): Default port for MySQL/MariaDB databases.
  • 3389 (RDP): Remote Desktop Protocol for Windows remote GUI access.
  • 5432 (PostgreSQL): Default port for PostgreSQL databases.
  • 8080 (HTTP-alt): Common alternative for web servers and proxies (e.g., Tomcat, dev servers).

TCP vs. UDP: Why Ports Need a Protocol

A port number alone isn’t enough—you also need the transport protocol (TCP or UDP). TCP provides reliable, ordered delivery with error checking; UDP is faster and connectionless but doesn’t guarantee delivery. Some services use both (e.g., DNS uses UDP for queries and TCP for zone transfers). When configuring firewalls or port forwarding, you must specify both the port and the protocol (e.g., “TCP 443” vs. “UDP 53”).

How to Choose a Port Number for a New Service

If you’re running a custom service, follow these steps:

  1. Pick a number from the registered range (1024–49151) to avoid conflicts with well-known services.
  2. Check the IANA registry or your system’s /etc/services (Linux) or %WINDIR%\system32\drivers\etc\services (Windows) to see if the port is already assigned.
  3. Use a port above 1024 so you don’t need root privileges (unless you deliberately want to run as root).
  4. Avoid using an ephemeral port (49152–65535) for a server, because clients may randomly pick those and collide.
  5. Document the choice in your firewall rules and application config.

Common Port Problems and Misconceptions

One frequent misconception is that “closing a port” makes a service invisible. In reality, a closed port just means the OS rejects packets; the service is still running locally. To truly disable a service, you must stop it or block it with a firewall.

Another common issue is port conflicts—two services trying to use the same port. Symptoms include “Address already in use” errors. You can check with netstat -tulpn (Linux) or netstat -ano (Windows).

Port scanning (e.g., with tools like Nmap) is often misunderstood. Scanning a network without permission is illegal in many jurisdictions, but scanning your own devices is a legitimate troubleshooting step.

Security: Why Ports Matter

Open ports are potential entry points for attackers. Best practices:

  • Close or block any port you don’t need (e.g., disable Telnet, use SSH instead).
  • Use a firewall to restrict which IP addresses can reach a port.
  • Prefer encrypted protocols (HTTPS, SSH, SFTP) over plaintext ones (HTTP, Telnet, FTP).
  • Keep services patched—many attacks exploit known vulnerabilities in services listening on open ports.
  • For remote access, consider using a VPN instead of exposing RDP or SSH directly to the internet.

Alternatives and Modern Trends

Some traditional ports are being replaced by more secure or flexible options:

  • FTP (21) → SFTP (22) or FTPS (990/989): Adds encryption.
  • Telnet (23) → SSH (22): Encrypted remote shell.
  • HTTP (80) → HTTPS (443): Encrypted web traffic is now the default.
  • POP3 (110) → IMAP (143) or Exchange/Outlook Web Access: Better for multi-device sync.
  • Port 8080 as a web proxy: Still common, but many devs now use 3000 or 5000 for local dev servers.

Frequently Asked Questions

Q: What is the difference between a port and a protocol?
A: A protocol is a set of rules for communication (like HTTP or FTP), while a port is a numeric address that identifies a service. Protocols use ports to deliver data to the right application.

Q: Can I use any port number I want?
A: Yes, technically any port from 0–65535 can be used, but you should avoid well-known ports (0–1023) unless you’re running that service, and avoid ephemeral ports (49152+) for servers to prevent conflicts.

Q: What does “port forwarding” do?
A: It tells your router to send incoming traffic on a specific port to a specific device on your local network. For example, forwarding port 3389 to a PC enables remote desktop from the internet.

Q: Why is port 80 still used if HTTPS is on 443?
A: Many servers still listen on 80 to redirect HTTP requests to HTTPS, or to serve non-sensitive content. Browsers may also try 80 first if you don’t specify a protocol.

Q: How can I see what ports are open on my computer?
A: Use netstat -an (Windows) or ss -tulpn (Linux) to list listening ports. On Windows, you can also use Resource Monitor or PowerShell’s Get-NetTCPConnection.

Q: Is it safe to open a port for online gaming?
A: Generally yes, but only open the specific port(s) the game requires, and close them when not playing. Using a firewall to restrict access to your IP can reduce risk.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →