What is a Network Port?
In computer networking, a port is a 16-bit logical communication endpoint that identifies a specific process or network service running on a host operating system. While an IP address routes packets to a destination computer, the port number directs those packets to the correct application waiting to process them.
Network ports range from 0 to 65535 and are categorized into three standardized tiers maintained by the Internet Assigned Numbers Authority (IANA):
- Well-Known Ports (
0–1023): Assigned to universal system and internet foundational protocols (HTTP, SSH, DNS, SMTP, FTP). Binding to these ports typically requires root or administrative privileges on Unix/Linux systems. - Registered Ports (
1024–49151): Assigned to specific vendor applications, databases, and software services (e.g., MySQL on port3306, MSSQL on1433, Redis on6379). - Dynamic / Private / Ephemeral Ports (
49152–65535): Dynamically allocated by client operating systems as temporary source ports during outbound communication sessions.
TCP vs. UDP: Transport Protocol Differences
- TCP (Transmission Control Protocol): Connection-oriented protocol providing reliable, ordered, and error-checked byte streams. Uses a three-way handshake (
SYN,SYN-ACK,ACK). Standard for web pages (80,443), file transfers (21,22), and database connections. - UDP (User Datagram Protocol): Connectionless, lightweight transport protocol without handshake or delivery guarantees. Prioritizes low latency and minimal overhead. Standard for DNS queries (
53), DHCP broadcasts (67/68), time synchronization (123), and voice/video streaming.
Security Hardening: Closing Insecure Cleartext Ports
Modern cybersecurity frameworks mandate the phase-out of unencrypted legacy protocols in favor of TLS/SSL encrypted alternatives:
| Legacy Cleartext Port | Vulnerability | Modern Encrypted Replacement |
|---|---|---|
| Port 21 (FTP) | Credentials and files passed in cleartext | Port 22 (SFTP / SSH) |
| Port 23 (Telnet) | Complete terminal keystrokes vulnerable to packet sniffing | Port 22 (SSH) |
| Port 80 (HTTP) | Session tokens and cookies unencrypted | Port 443 (HTTPS / TLS 1.3) |
| Port 110 (POP3) | Mailbox credentials sent unencrypted | Port 995 (POP3S over TLS) |
| Port 143 (IMAP) | Email payloads readable in transit | Port 993 (IMAPS over TLS) |
How to Check Open Listening Ports on Your Computer
In Windows (PowerShell / Command Prompt):
netstat -ano | findstr LISTENING
Or with modern PowerShell:
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess
In Linux / macOS (Terminal):
sudo ss -tulpn
# Or legacy netstat:
sudo netstat -tulnp