DNSfinder.net
Ports & Firewalls Architecture

What is a Network Port? Protocols, Sockets & Services

16-bit network port numbers, socket multiplexing, well-known port ranges, and transport layer protocols, demystified.

DNSfinder.net Team (Network Engineering)
•
Updated Aug 3, 2026, 12:00 AM UTC
•
3 min read

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

PortProtocolDefault ServiceSecurity Implication
21TCPFTPCleartext file transfer; avoid in production.
22TCPSSHSecure remote administration; enforce key-based auth.
25TCPSMTPServer-to-server email exchange.
53UDP/TCPDNSDomain name resolution.
80TCPHTTPUnencrypted web traffic; redirect to HTTPS.
443TCPHTTPSEncrypted TLS web traffic.
3306TCPMySQLRelational database; should NEVER be exposed publicly.
5432TCPPostgreSQLRelational database; restrict to internal VPC.
6379TCPRedisIn-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 VPC

This 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.

Knowledge Base & FAQ

Guide FAQs

Key takeaways and technical clarifications.

There are 65,536 available port numbers (ranging from 0 to 65535) for both TCP and UDP, defined by a 16-bit unsigned integer in transport layer headers.