Essential Network Ports: Complete TCP & UDP Reference for Sysadmins and Engineers
Comprehensive guide to well-known TCP and UDP network ports (20 to 65535). Learn the differences between Layer 4 transport protocols, port multiplexing, and firewall hardening strategies.
TCP & UDP Network Port Inspector
Search common database, web, mail, and VPN ports with security ratings and risk analysis.
What is a Network Port?
In computer networking, an IP address identifies a specific host machine on a network, while a port number identifies the specific service, process, or application running on that host.
Ports operate at Layer 4 (Transport Layer) of the OSI model, primarily managed by two foundational protocols:
SYN -> SYN-ACK -> ACK), flow control, and packet retransmission. Used by web traffic, SSH, file transfers, and transactional databases.A port number is represented as a 16-bit unsigned integer, giving a total range from 0 to 65,535.
The Three Official IANA Port Ranges
The Internet Assigned Numbers Authority (IANA) partitions the 65,536 available ports into three distinct tiers:
1. Well-Known Ports (0 – 1023)
Reserved for fundamental, system-level internet services. On Unix-like operating systems (Linux, macOS, BSD), binding a socket listener to a port below 1024 requires elevated administrative privileges (root or CAP_NET_BIND_SERVICE).
2. Registered Ports (1024 – 49,151)
Assigned by IANA to specific vendors, user processes, or enterprise software upon request (such as database engines and message queues like MySQL on 3306 or Redis on 6379). Ordinary user accounts can bind to these ports without root privileges.3. Dynamic / Private / Ephemeral Ports (49,152 – 65,535)
Never assigned to standard listening daemons. When your web browser initiates an outbound connection to an HTTPS server on port 443, your operating system kernel dynamically assigns an unused ephemeral port (e.g.,52418) as the client-side return socket.
Critical Port Reference Cheatsheet
Here are the most vital ports that every software engineer, sysadmin, and cloud architect must know:
Core Internet & Remote Administration
301 Moved Permanently.Database & In-Memory Caching (High Risk if Public)
0.0.0.0/0). Bind to 127.0.0.1 or private VPC subnet.Modern VPNs & Cloud Orchestration
kubectl commands and cluster controllers.Firewall Hardening: The Principle of Least Privilege
Unused open ports represent an unnecessary attack surface. Automated bots continuously scan IPv4 address space using high-speed scanners like Masscan and ZMap to probe for exposed ports.
Follow these four rules for firewall security:
1. Default Deny Inbound: Configure ufw (Ubuntu) or AWS Security Groups to reject all inbound traffic by default. Explicitly whitelist only required ports.
2. Move Administrative Ports Off Defaults: While security through obscurity is not absolute protection, changing your SSH port from 22 to a random port like 2222 or 58222 eliminates 99% of automated credential-stuffing noise in your server logs.
3. Use Bastion Hosts or WireGuard Tunnels: Instead of opening database ports (3306, 5432) or internal dashboards to your office IP, tunnel access through an encrypted VPN gateway.
4. Inspect Port Status with netstat / ss:
# Check listening TCP/UDP sockets on Linux
sudo ss -tuln
Need to inspect a mystery port number or verify protocol safety? Search our interactive Network Port Directory anytime for immediate details.
Editorial Integrity & Peer Review
All technical guides on MicroTools are independently authored and peer-reviewed by software and infrastructure professionals. Content is updated periodically to ensure compliance with the latest IETF RFC specifications, IEEE standards, and cloud provider architectural recommendations.