Skip to main content
⚡ OpenDevDocs
Networking
networkingnetworkingCore ConceptBeginner

Network Ports & Well-Known Port Numbers

Master TCP and UDP port numbers (0-65535), well-known vs ephemeral ports, and binding services.

Verified: 2026-09-30
Platforms:
webnodelinux
#networking#ports#tcp#udp#security

What is a Network Port?

While an IP Address directs network packets to a specific host machine, a Port Number directs those packets to a specific application or process running on that machine.

A port number is an unsigned 16-bit integer ranging from 0 to 65535.


3 Port Categories (Assigned by IANA)

RangeCategoryDescription
0 – 1023Well-Known / System PortsReserved for core internet services. On Unix/Linux, binding to these ports requires root / sudo privileges.
1024 – 49151Registered / User PortsUsed by user applications, databases, and development servers (Node.js, Postgres, Redis).
49152 – 65535Dynamic / Ephemeral PortsTemporary outbound ports allocated automatically by the OS when a client initiates an outgoing request.

Essential Developer Port Numbers Cheatsheet

Port NumberProtocol / ServiceDescription
22SSH (Secure Shell)Remote server administration
53DNSDomain name resolution
80HTTPPlaintext World Wide Web traffic
443HTTPSEncrypted TLS web traffic
3000 / 5173Next.js / Vite / ReactDefault frontend development web servers
4000 / 8080Express / Spring / FastAPIBackend API services
5432PostgreSQLPostgreSQL database server
3306MySQL / MariaDBMySQL database server
6379RedisIn-memory key-value cache
27017MongoDBDocument database

Checking Port Allocation on Linux

# Check all active listening ports
sudo ss -tulpn

# Find which process is listening on port 5432
sudo lsof -i :5432

On this page