What is a Network Port? Protocols, Sockets & Services
16-bit network port numbers, socket multiplexing, well-known port ranges, and transport layer protocols, demystified.
The Role of Ports in Network Communications
While an IP address identifies a specific host machine on a network, a port number identifies the specific process or service running on that machine.
A network socket is defined as the combination of: `IP Address + Transport Protocol (TCP/UDP) + Port Number`
Port Number Classifications
0 ──────────────── 1023 ──────────────── 49151 ──────────────── 65535
[ Well-Known Ports ] [ Registered Ports ] [ Dynamic / Ephemeral ]
(HTTP, SSH, DNS, TLS) (MySQL, Redis, RDP) (Outbound Client Conns)Common Standard Ports Reference
| Port | Protocol | Default Service | Security Implication |
|---|---|---|---|
| 21 | TCP | FTP | Cleartext file transfer; avoid in production. |
| 22 | TCP | SSH | Secure remote administration; enforce key-based auth. |
| 25 | TCP | SMTP | Server-to-server email exchange. |
| 53 | UDP/TCP | DNS | Domain name resolution. |
| 80 | TCP | HTTP | Unencrypted web traffic; redirect to HTTPS. |
| 443 | TCP | HTTPS | Encrypted TLS web traffic. |
| 3306 | TCP | MySQL | Relational database; should NEVER be exposed publicly. |
| 5432 | TCP | PostgreSQL | Relational database; restrict to internal VPC. |
| 6379 | TCP | Redis | In-memory key-value cache; keep private. |
Example: A Typical Web Server's Scan Result (Illustrative)
Port 22 (SSH) OPEN — key-based admin access
Port 80 (HTTP) OPEN — redirects to HTTPS
Port 443 (HTTPS) OPEN — primary web service
Port 3306 (MySQL) FILTERED — correctly restricted to internal VPCThis is roughly what a well-configured public web server should look like: the services meant to be public (SSH, HTTP, HTTPS) are open, and the database port that should never face the internet is filtered rather than open — the scan can't even confirm MySQL is running there, which is the point.
Test Exposed Ports Safely
Audit your server's exposed attack surface and verify firewall rules with our Safe Port Scanner.
Guide FAQs
Key takeaways and technical clarifications.
Related Diagnostic Tools
Combine diagnostics for deep-dive network and DNS troubleshooting.