Ravi Sir's Cyber Security Cards › Comparison Cards
What is a well-known port versus an ephemeral port?
What is a well-known port versus an ephemeral port? A port is a numbered door on a computer for one service. Well-known ports (0–1023) : fixed doors for common services, like 22 for SSH and 443 for HTTPS. Ephemeral ports : short-lived ports your computer picks for its own outgoing connections. The s

Read card text
What this card says
What each one is
A port is a numbered door on a computer for one service.
Well-known ports (0–1023): fixed doors for common services, like 22 for SSH and 443 for HTTPS.
Ephemeral ports: short-lived ports your computer picks for its own outgoing connections.
Server vs client
The server listens on a well-known port.
The client uses a random ephemeral port to talk to it.
Example
Your browser uses port 50001 to reach a website on port 443.
When the page closes, port 50001 is freed.
Why it matters
In ss -tulnp output, look at listening well-known ports.
Short-lived client ports are normal, not open doors.
Learn more in the lesson: 46.2 Networking Interview Questions