Common Port Numbers Reference
Reference table for TCP and UDP port numbers used by common network services.
Back to all tools on ToolForge
Common Ports
| Port | Service | Description |
|---|
About Port Reference
This port reference lists well-known TCP and UDP port numbers used by common network services. Port numbers are 16-bit integers (0-65535) that identify specific processes or services on a host.
Port Number Ranges
Port numbers are divided into three ranges defined by IANA (Internet Assigned Numbers Authority):
| Range | Name | Description | Examples |
|---|---|---|---|
| 0-1023 | Well-known ports | System services, requires root/admin | HTTP(80), SSH(22), DNS(53) |
| 1024-49151 | Registered ports | User applications, vendor-specific | MySQL(3306), Redis(6379) |
| 49152-65535 | Dynamic/Ephemeral | Temporary client connections | OS-assigned ephemeral ports |
TCP vs UDP
Transport layer protocols determine how data is transmitted:
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Guaranteed delivery, retransmission | Best effort, no guarantee |
| Ordering | Packets delivered in order | No ordering guarantee |
| Speed | Slower due to overhead | Faster, minimal overhead |
| Use Cases | Web, email, file transfer | DNS, streaming, VoIP, gaming |
| Examples | HTTP(80), SSH(22), FTP(21) | DNS(53), DHCP(67/68), NTP(123) |
Common Port Categories
| Category | Ports | Services |
|---|---|---|
| Web Services | 80, 443, 8080, 8443 | HTTP, HTTPS, HTTP alternate |
| Remote Access | 22, 23, 3389, 5900 | SSH, Telnet, RDP, VNC |
| Email Services | 25, 110, 143, 587, 993, 995 | SMTP, POP3, IMAP, SMTPS, IMAPS |
| File Transfer | 20, 21, 69, 873 | FTP, FTP-data, TFTP, rsync |
| Database | 1433, 1521, 3306, 5432, 6379, 27017 | MSSQL, Oracle, MySQL, PostgreSQL, Redis, MongoDB |
| Network Infrastructure | 53, 67, 68, 123, 161 | DNS, DHCP, NTP, SNMP |
| Authentication | 88, 389, 636 | Kerberos, LDAP, LDAPS |
Port Security Considerations
Open ports are potential attack vectors. Follow these security practices:
| Risk | Mitigation |
|---|---|
| Unnecessary open ports | Close unused ports, minimize attack surface |
| Default credentials | Change default passwords on all services |
| Unencrypted protocols | Use TLS/SSL variants (HTTPS, SSH, SFTP) |
| Port scanning | Use firewall rules, rate limiting, IDS/IPS |
| Privilege escalation | Don't run services as root unnecessarily |
Checking Open Ports
Linux/Mac - List all listening ports: netstat -tulpn ss -tulpn # Modern replacement for netstat Linux - Check specific port: netstat -tulpn | grep :80 lsof -i :80 Windows - List all connections: netstat -ano Windows - Check specific port: netstat -ano | findstr :80 macOS - Check port usage: lsof -i :80 netstat -an | grep LISTEN Docker - List container ports: docker port <container_id>
Firewall Configuration Examples
iptables (Linux): # Allow SSH iptables -A INPUT -p tcp --dport 22 -j ACCEPT # Allow HTTP/HTTPS iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT # Drop all other incoming iptables -A INPUT -j DROP ufw (Ubuntu): ufw allow 22/tcp # SSH ufw allow 80/tcp # HTTP ufw allow 443/tcp # HTTPS ufw enable firewalld (RHEL/CentOS): firewall-cmd --permanent --add-service=ssh firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https firewall-cmd --reload Windows Firewall (PowerShell): New-NetFirewallRule -DisplayName "SSH" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow New-NetFirewallRule -DisplayName "HTTP" -Direction Inbound -LocalPort 80 -Protocol TCP -Action Allow
Common Port Conflicts
| Port | Common Conflict | Solution |
|---|---|---|
| 80 | Apache vs Nginx vs IIS | Stop conflicting service or use alternate port |
| 443 | Multiple web servers with SSL | Use reverse proxy or different ports |
| 3306 | Multiple MySQL instances | Configure different ports in my.cnf |
| 8080 | Tomcat, Jenkins, proxies | Change server.xml or Jenkins config |
IANA Port Assignment Process
Port numbers are assigned by the Internet Assigned Numbers Authority (IANA):
- Well-known ports (0-1023): Assigned by IANA for standardized services
- Registered ports (1024-49151): Assigned to vendors for specific applications
- Dynamic ports (49152-65535): Not assigned, used for ephemeral connections
To request a port assignment, submit an application to IANA with service description, transport protocol, and contact information.
Common Use Cases
- Firewall Configuration: Identify which ports to allow/block for specific services
- Troubleshooting: Determine which service uses a specific port
- Security Auditing: Review open ports for potential vulnerabilities
- Network Documentation: Document port assignments for infrastructure
- Application Deployment: Configure applications to use correct ports
- Penetration Testing: Identify services running on target systems
How to Use Port Reference
- Search by port: Enter a port number (e.g., 80) to find the associated service.
- Search by service: Enter a service name (e.g., http, ssh) to find the port number.
- Review results: The table shows port, service name, and description.
- Use for configuration: Apply port information to firewall rules or service configuration.
Tips
- Port numbers are case-insensitive in search
- Search supports partial matches for service names
- Some services use both TCP and UDP on the same port
- Well-known ports below 1024 typically require administrator privileges
- Use firewall rules to restrict access to sensitive ports
Frequently Asked Questions
- What are TCP and UDP ports?
- Ports are logical endpoints for network communications. TCP (Transmission Control Protocol) provides reliable, ordered delivery with connection establishment. UDP (User Datagram Protocol) provides faster, connectionless delivery without guaranteed order. Port numbers range from 0-65535, with 0-1023 being well-known ports assigned by IANA.
- What are the three port ranges?
- Well-known ports (0-1023): Assigned by IANA for system services like HTTP (80), SSH (22). Registered ports (1024-49151): Assigned for user applications like MySQL (3306), PostgreSQL (5432). Dynamic/private ports (49152-65535): Ephemeral ports used temporarily by client connections.
- Why are some ports TCP and others UDP?
- TCP is used when reliable delivery matters: web pages (HTTP), email (SMTP), file transfer (FTP). UDP is used for speed-sensitive applications: DNS queries, streaming, VoIP. Some services like DNS use both: UDP for queries, TCP for zone transfers.
- What is the difference between well-known and ephemeral ports?
- Well-known ports (0-1023) are fixed ports where servers listen for incoming connections. Ephemeral ports (49152-65535) are temporary ports assigned by the OS to client applications for the duration of a connection. Servers have fixed ports; clients use random ephemeral ports.
- How do I check which ports are open on my system?
- Linux/Mac: 'netstat -tulpn' or 'ss -tulpn'. Windows: 'netstat -ano'. These commands show listening ports and associated processes. Use 'lsof -i :PORT' on Unix to find which process uses a specific port. Firewall rules may block external access even if port is listening.
- Why shouldn't I run services on well-known ports?
- Well-known ports below 1024 typically require root/admin privileges and are reserved for standard services. Running custom services on these ports can conflict with system services, create security vulnerabilities, and violate security policies. Use ports above 1024 for custom applications.