Common Port & Protocol Directory
Search any TCP/UDP port number or service name to see standard protocol definitions, default uses, and firewall security advice.
Complete Guide to Network Ports, Protocols & Firewall Defense
In computer networking, a network port is a 16-bit unsigned integer (ranging from 0 to 65535) assigned to identify specific processes and network services running on an IP host. Governed by the Internet Assigned Numbers Authority (IANA), ports distinguish whether incoming packets belong to web browsing, encrypted file transfers, database queries, or remote terminal access.
IANA Port Range Classifications
- Well-Known Ports (0 – 1023): Reserved for core foundational OS and internet services (HTTP, HTTPS, SSH, FTP, DNS, SMTP). Require root/administrator privileges to bind.
- Registered Ports (1024 – 49151): Registered by software companies and databases (MySQL 3306, PostgreSQL 5432, Redis 6379, MongoDB 27017).
- Dynamic / Ephemeral Ports (49152 – 65535): Allocated dynamically by client operating systems for temporary outbound sessions.
Server Security & Port Hardening
- Never Expose Databases: Ports 3306 (MySQL), 5432 (Postgres), and 6379 (Redis) must ALWAYS be bound to
127.0.0.1or isolated in a private VPC subnet. - Change Default SSH Port: Moving SSH from port 22 to a non-standard port reduces automated brute-force scanner noise by 95%.
- Default Deny Firewall: Configure
ufw default deny incomingand whitelist only necessary ports (e.g. 80, 443).
Frequently Asked Questions (FAQs)
What is the difference between TCP and UDP ports?
TCP (Transmission Control Protocol) is connection-oriented and guarantees reliable, ordered packet delivery with 3-way handshakes (used for HTTP, SSH, FTP, databases). UDP (User Datagram Protocol) is connectionless, prioritizing extreme speed and low latency without delivery confirmations (used for DNS queries, VoIP, gaming, and video streaming).
Why should port 21 (FTP) and port 23 (Telnet) never be used today?
Legacy protocols like FTP and Telnet transmit credentials and data in clear unencrypted plaintext across the internet, making them instantly vulnerable to network packet sniffing. Always replace Telnet with SSH (Port 22) and FTP with SFTP or FTPS (TLS encrypted).
How can I check which ports are currently open on my Linux or Windows server?
On Linux, run sudo ss -tulpn or sudo netstat -tuln. On Windows PowerShell, execute Get-NetTCPConnection -State Listen or netstat -ano | findstr LISTENING.