Common Ports Reference
Essential ports for DevOps, cloud infrastructure, and networking. Use this as a quick reference when configuring firewalls, security groups, and network policies.
🌐Web & HTTP
🗄️Databases
📨Message Queues & Streaming
📊Monitoring & Observability
🔄CI/CD & DevOps Tools
🐳Container & Orchestration
🔑SSH & Remote Access
🌍DNS & Networking
🛡️ Security Best Practices
Principle of Least Privilege
Only open ports that are strictly necessary. Use security groups and network policies to restrict access to specific CIDR ranges.
Avoid Exposing Management Ports
Keep ports like 2375 (Docker), 10250 (Kubelet), and 2379 (etcd) internal. Never expose them to the public internet.
Use Non-Standard Ports for SSH
Moving SSH from 22 to a non-standard port (e.g., 2222) reduces automated brute-force attempts, though it is not a security measure on its own.
Encrypt Everything in Transit
Use TLS variants when available (2376 instead of 2375 for Docker, 9093 instead of 9092 for Kafka). Never send credentials over unencrypted ports.
Monitor Open Ports
Regularly audit open ports with tools like nmap, ss, or cloud provider security scanners. Unexpected open ports may indicate compromise.
Why Do Port Numbers Matter?
Port numbers are a fundamental concept in networking that allow multiple services to run on a single IP address. They range from 0 to 65535, divided into well-known ports (0-1023) reserved for standard services like HTTP and SSH, registered ports (1024-49151) used by specific applications, and dynamic/private ports (49152-65535) used for temporary connections. When configuring firewalls, security groups, Kubernetes network policies, or Docker port mappings, knowing the correct port for each service is essential.
DevOps engineers and cloud architects work with port numbers when designing network architectures, writing security group rules in Terraform, configuring Kubernetes ingress controllers, setting up monitoring with Prometheus exporters, and troubleshooting connectivity issues. Incorrect port configurations are one of the most common causes of service communication failures in distributed systems. This reference covers the ports you will encounter most frequently in modern cloud-native infrastructure.
Frequently Asked Questions
What port does HTTPS use?
HTTPS uses port 443 by default. This is the TLS-encrypted version of HTTP (which uses port 80). When you visit a website with https:// in the URL, your browser connects to port 443. In server configurations, you need port 443 open in your firewall and security groups for any service that serves HTTPS traffic, including web servers, APIs, and load balancers.
What port does PostgreSQL use?
PostgreSQL uses port 5432 by default. When configuring security groups for RDS instances or self-managed PostgreSQL, you need to allow inbound traffic on port 5432 from your application servers. MySQL uses 3306, MongoDB uses 27017, and Redis uses 6379. These should never be exposed to the public internet—restrict access to specific application subnets only.
How to check what is using a port?
On Linux, use ss -tlnp | grep :PORT or lsof -i :PORT to see which process is listening on a specific port. On macOS, use lsof -i :PORT. To scan remote hosts, use nmap -p PORT hostname. In Kubernetes, use kubectl get svc to see service port mappings, and kubectl port-forward to access services locally for debugging.