husayn gokal
Geneva

← Writeups

Ports

Concept
Date
2026-05-17

Ports are software-based, virtual network points managed by the OS where connections begin and end.

Ports associate themselves with a specific process/service, which allows computers to differentiate between different kinds of traffic. At a high level, ports help computers understand how to handle the types of data they receive.

UDP is useful compared to TCP when error correction is either not needed or is handled by the application itself. It’s suitable for time-sensitive tasks as dropping packets is faster than waiting for delayed, re-transmitted packets.

Most common ports:

Port(s) Protocol
20/21 (TCP) FTP
22 (TCP) SSH
23 (TCP) Telnet
25 (TCP) SMTP
80 (TCP) HTTP
161 (TCP/UDP) SNMP
389 (TCP/UDP) LDAP
443 (TCP) SSL/TLS (HTTPS)
445 (TCP) SMB
3389 (TCP) RDP

This is a great reference on the top 1,000 TCP and UDP ports from nmap along with the top 100 services scanned by nmap: https://nullsec.us/top-1-000-tcp-and-udp-ports-nmap-default/

https://www.stationx.net/common-ports-cheat-sheet/

If anything tries to bind to port 0, it will bind to the next available port above port 1,024 as it’s treated as the “wild card” port.

Ports 1 to 1,023 are reserved for privileged services.