The port numbers every security and networking student should know, with their secure alternatives.
Common ports
| Port | Protocol | Transport | Notes |
|---|---|---|---|
| 20, 21 | FTP | TCP | file transfer, cleartext; prefer SFTP (22) or FTPS |
| 22 | SSH / SFTP | TCP | encrypted remote login and file transfer |
| 23 | Telnet | TCP | cleartext remote login, avoid |
| 25 | SMTP | TCP | mail transfer between servers |
| 53 | DNS | UDP/TCP | name resolution |
| 67, 68 | DHCP | UDP | automatic IP addressing |
| 69 | TFTP | UDP | simple file transfer, no authentication |
| 80 | HTTP | TCP | web, cleartext |
| 88 | Kerberos | TCP/UDP | authentication in Active Directory |
| 110 | POP3 | TCP | mail retrieval; secure version 995 |
| 123 | NTP | UDP | time synchronisation |
| 137–139 | NetBIOS | TCP/UDP | legacy Windows networking |
| 143 | IMAP | TCP | mail retrieval; secure version 993 |
| 161, 162 | SNMP | UDP | network monitoring; use SNMPv3 |
| 389 | LDAP | TCP | directory services; secure version 636 (LDAPS) |
| 443 | HTTPS | TCP | web over TLS |
| 445 | SMB | TCP | Windows file sharing |
| 465, 587 | SMTPS / submission | TCP | secure mail submission |
| 514 | Syslog | UDP | logging |
| 1433 | Microsoft SQL Server | TCP | database |
| 3306 | MySQL | TCP | database |
| 3389 | RDP | TCP | Windows remote desktop |
| 5432 | PostgreSQL | TCP | database |
| 5900 | VNC | TCP | remote desktop |
| 8080 | HTTP alternate | TCP | web proxies and test servers |
OSI model
| Layer | Name | Examples |
|---|---|---|
| 7 | Application | HTTP, DNS, SMTP |
| 6 | Presentation | TLS encryption, encoding |
| 5 | Session | session set-up and tear-down |
| 4 | Transport | TCP, UDP |
| 3 | Network | IP, ICMP, routers |
| 2 | Data link | Ethernet, MAC addresses, switches |
| 1 | Physical | cables, radio, signals |
Learn more: OSI model explained, Networking fundamentals for security
Want to practise these formulas? Create a free account to try practice questions on every topic and save your progress.
Frequently asked questions
What port does HTTPS use?
HTTPS uses TCP port 443 by default.
What port does SSH use?
SSH uses TCP port 22 by default.
What is the difference between TCP and UDP?
TCP is connection-oriented and reliable, with ordered delivery and retransmission. UDP is connectionless and faster but does not guarantee delivery.