March 26, 20265 min read

Common Port Numbers Reference Guide

Complete reference for well-known TCP and UDP port numbers. Search protocols, find port assignments, and understand which ports to open or block in your firewall.

networking ports firewall protocols calchub
Ad 336x280

Port numbers are how your operating system routes incoming network traffic to the right application. When a web server and an SSH daemon both listen for connections, the port number tells the OS which process gets each incoming packet. Knowing your ports is basic fluency for anyone configuring firewalls, debugging connectivity, or reading server logs.

Port Number Ranges

The 65,535 available ports are divided into three ranges:

RangeNameDescription
0–1023Well-known portsAssigned by IANA; standard services
1024–49151Registered portsRegistered applications; less standardized
49152–65535Dynamic/ephemeralTemporary outbound connections
When your browser connects to a web server on port 443, your OS assigns your browser a random ephemeral port (say, 52,847) as the source. The server responds back to 52,847 on your IP, completing the two-way conversation.

Essential Well-Known Ports

PortProtocolServiceNotes
20, 21TCPFTP21 = control, 20 = data (active mode)
22TCPSSHSecure shell, SFTP, SCP
23TCPTelnetUnencrypted — never use on public networks
25TCPSMTPEmail sending (MTA to MTA)
53TCP/UDPDNSUDP for queries, TCP for zone transfers
67, 68UDPDHCP67 = server, 68 = client
80TCPHTTPUnencrypted web traffic
110TCPPOP3Email retrieval (legacy)
123UDPNTPNetwork time synchronization
143TCPIMAPEmail retrieval (modern)
161, 162UDPSNMPNetwork device monitoring
443TCPHTTPSEncrypted web traffic (TLS)
445TCPSMBWindows file sharing
465, 587TCPSMTPS / SubmissionEncrypted email sending
993TCPIMAPSIMAP over TLS
995TCPPOP3SPOP3 over TLS
3389TCPRDPWindows Remote Desktop

Common Application and Service Ports

PortServiceNotes
1433MSSQLMicrosoft SQL Server
1521Oracle DBOracle database listener
3306MySQL / MariaDBDefault MySQL port
5432PostgreSQLDefault Postgres port
5672AMQPRabbitMQ messaging
6379RedisIn-memory data store
8080HTTP altDevelopment servers, proxies
8443HTTPS altDevelopment HTTPS
9200ElasticsearchREST API
27017MongoDBDefault MongoDB port

Using the CalcHub Port Reference

The CalcHub Port Number Reference is searchable — enter a port number to see the protocol, or search a protocol name to find its port. It also shows whether to use TCP, UDP, or both, and flags ports that are commonly targeted by attackers.

The firewall mode lets you build a rule set: specify your server type (web server, mail server, database) and it generates a recommended allow-list of ports, blocking everything else by default.

Firewall Basics: Default Deny

The safest firewall posture is default deny: block all inbound traffic, then explicitly allow only what you need. For a web server:

  • Allow 80/TCP from anywhere (redirect to HTTPS)
  • Allow 443/TCP from anywhere
  • Allow 22/TCP from your IP only (or use a VPN)
  • Block everything else
For an application server that only receives traffic from a load balancer, block 80 and 443 from the public internet entirely — only allow them from the load balancer's IP.

Tips

  • Change SSH port? Only security theater. Moving SSH to a non-standard port (like 2222) reduces noise in your logs from automated scanners but provides no real security. SSH keys and fail2ban are the actual defenses.
  • Port 0 is reserved. It's technically valid in some implementations for OS-assigned port selection, but not a real service port.
  • UDP is connectionless. Services like DNS and NTP use UDP for speed. There's no handshake, so firewall rules for UDP are stateless — you need to explicitly allow responses back in or use a stateful firewall.

How do I check which ports are open on my server?

ss -tulnp on Linux shows all listening sockets with the process name. netstat -ano on Windows does the same. From outside your server, use nmap -sT -p 1-1024 to scan well-known ports (only on systems you own or have permission to test).

Why is port 8080 commonly used for development?

Ports below 1024 (including 80 and 443) require root/administrator privileges to bind on most systems. Port 8080 is the convention for running HTTP development servers without elevated privileges. It has no official IANA assignment but is universally understood.

What should I do if I see unexpected ports listening on my server?

Check the process with ss -tulnp | grep or lsof -i :. If you don't recognize the service, it could be legitimate (a package installed a background service) or a sign of compromise. Investigate before blocking it.

Ad 728x90