Find the Standard Port Number for Any Common Service
Firewall rules, Docker Compose files, and cloud security groups all demand a port number, and guessing wrong means a service that refuses connections. The Internet Assigned Numbers Authority assigns well-known ports so that ssh always means 22 and https always means 443, but the list is long and easy to forget. This reference tool maps common services to their standard ports, notes which protocols they use, and flags ports you should avoid exposing publicly. It is the quick lookup you need when writing a config, opening a firewall hole, or debugging a connection refused error.
How to Use the Port Reference
- Type a service name like
mysql,postgres, orredisinto the search box. - Alternatively, enter a port number such as
5432to find which service owns it. - Read the result row, which lists the port, protocol, and the service it belongs to.
- Check the risk note to see whether the port is safe to expose or should stay behind a firewall.
- Filter by category, such as web, database, or mail, to browse related services.
Real Example: Opening a Database Port
A developer deploying PostgreSQL on a cloud VM needs to allow remote connections. The reference shows 5432/tcp is the standard PostgreSQL port, so the security group rule can be written correctly the first time instead of after a support round trip.
| Input | Output |
|---|---|
postgres | 5432/tcp — PostgreSQL database |
3306 | 3306/tcp — MySQL database |
https | 443/tcp — HTTPS web traffic |
Tips for Working with Ports
- Never expose databases directly — 3306, 5432, and 6379 belong behind a firewall or VPN, not on the public internet.
- Prefer high ports for custom services — pick a number above 1024 and outside the registered range to avoid collisions.
- Match client and server — a port is only useful if both ends agree, so configure the client explicitly instead of relying on defaults.
- Know your ranges — ports 0 to 1023 are privileged, 1024 to 49151 are registered, and 49152 to 65535 are dynamic.
When to Use This Tool
- Firewall configuration — write accurate allow rules without memorizing the registry.
- Container orchestration — map host ports to container ports correctly in Docker Compose and Kubernetes manifests.
- Connection troubleshooting — confirm you are testing the right port when a service will not connect.
- Security reviews — audit which well-known ports are open and whether they should be reachable.
Frequently Asked Questions
What are the three official port ranges?
Ports 0 to 1023 are well-known and privileged, 1024 to 49151 are registered for specific services, and 49152 to 65535 are dynamic ports used for ephemeral client connections.
Is it safe to expose port 22 for SSH?
SSH on port 22 is standard, but exposing it publicly invites brute-force attacks. Use key-based authentication, disable password logins, or move SSH behind a VPN.
Why can I not bind to port 80 on my server?
Ports below 1024 require root privileges on Linux and macOS. Run the service as root behind a reverse proxy, or use a high port and forward 80 to it.
What port does HTTPS use and why does it matter?
HTTPS uses port 443. Because browsers assume 443 for HTTPS, your web server must listen there (or behind a proxy that does) for secure URLs to load without a port in the address bar.
Can a service run on a non-standard port?
Yes, any service can be configured to listen on another port. Just update every client and firewall rule to match, and be aware that scanners will still find the open port.
What is the difference between TCP and UDP for the same port?
TCP and UDP are separate namespaces, so port 53 UDP (DNS queries) and port 53 TCP (zone transfers) are different conversations. A service may use both protocols on the same number.
Why do some services share a port number?
Port numbers are suggestions, not guarantees. Two services can use the same number on different hosts or protocols, which is why you check the actual listener with a tool like netstat or ss.
What does the service on port 8080 do?
Port 8080 is the common alternative HTTP port, used by development servers, proxies, and applications that cannot bind to port 80. It is not an IANA-assigned name but a widely adopted convention.