Ports and Protocols


First — What Is a Port, Really?

Quick refresher since you know this from Layer 4. A port number identifies which service or application traffic is going to on a device. The IP gets you to the machine; the port gets you to the right service on it.

  • IP address = the building

  • Port = the specific door of an apartment

When you go to a website, you're hitting port 80 or 443 on that server. SSH? Port 22. Each service has a "well-known" port everyone agrees on.

How We'll Learn These

There are ~25 ports the exam expects. We'll do them in small themed groups, not all at once. Today let's nail the first group: Web & Remote Access — the most common ones, and you already know most.

Group 1 — Web & Remote Access

Port

Protocol

What it does

TCP/UDP

22

SSH

Secure remote login/access

TCP

23

Telnet

Remote login (insecure, old)

TCP

80

HTTP

Web (unencrypted)

TCP

443

HTTPS

Web (encrypted/secure)

TCP

3389

RDP

Remote Desktop (Windows)

TCP

Lab connections to lock these in:

  • 22 (SSH) — you used this to attack Ubuntu and brute-force login attempts. You know 22.

  • 80 (HTTP) — your Apache web server, and reaching Splunk

  • 443 (HTTPS) — the secure version of 80

  • 3389 (RDP) — Windows Remote Desktop

Two exam favorites in this group:

  1. 22 = SSH (secure) vs 23 = Telnet (insecure) — they're one number apart and the exam loves contrasting them. SSH replaced Telnet because Telnet sends everything in plaintext.

  2. 80 = HTTP vs 443 = HTTPS — unencrypted vs encrypted. The "S" = Secure.


Flashcards:

  1. Port 22? → SSH (secure remote access)

  2. Port 23? → Telnet (insecure remote access)

  3. Port 80? → HTTP (web, unencrypted)

  4. Port 443? → HTTPS (web, encrypted)

  5. Port 3389? → RDP (Remote Desktop)

  6. SSH vs Telnet — which is secure? → SSH (22). Telnet (23) is plaintext/insecure

  7. HTTP vs HTTPS port + difference? → 80 unencrypted, 443 encrypted



Group 2 — Email

Port

Acronym

Full Name

What it does

25

SMTP

Simple Mail Transfer Protocol

Sends email

110

POP3

Post Office Protocol v3

Receives email (downloads & removes from server)

143

IMAP

Internet Message Access Protocol

Receives email (syncs & keeps on server)

587

SMTP

Simple Mail Transfer Protocol (secure submission)

Sends email (encrypted)

Group 3 — Core Network Services

Port

Acronym

Full Name

What it does

53

DNS

Domain Name System

Resolves names → IP addresses

67/68

DHCP

Dynamic Host Configuration Protocol

Hands out IP addresses

123

NTP

Network Time Protocol

Synchronizes time

Group 4 — File Transfer & Remote Management

Port

Acronym

Full Name

What it does

20/21

FTP

File Transfer Protocol

Transfers files (21=control, 20=data)

69

TFTP

Trivial File Transfer Protocol

Simple, lightweight file transfer (no login)

161/162

SNMP

Simple Network Management Protocol

Monitors/manages network devices

389

LDAP

Lightweight Directory Access Protocol

Accesses directory services (like user lookups)

636

LDAPS

LDAP Secure

Encrypted LDAP

Group 5 — Microsoft & Database

Port

Acronym

Full Name

What it does

445

SMB

Server Message Block

Windows file/printer sharing

3389

RDP

Remote Desktop Protocol

Remote control of Windows desktop

1433

MS SQL

Microsoft SQL Server

Database connections

3306

MySQL

MySQL Database

Database connections

Quick hooks for the trickier ones
  • FTP = 20/21 — two ports: 21 control (commands), 20 data (the actual files)

  • TFTP = 69 — Trivial = stripped-down, simple, uses UDP, no authentication

  • SNMP = 161/162 — Simple Network Management → monitoring devices

  • LDAP = 389, LDAPS = 636 — directory/user lookups (think Active Directory — you used this at work!)

  • SMB = 445 — Windows file sharing (mapped drives, shared folders — also from your IT jobs)