Networking Basics ยท 12
๐ช Port Numbers & Services
How your computer handles dozens of apps talking at onceโฑ ~2 min
๐ขIP address is the building, port number is the office
Imagine a large office building. The street address gets you to the building (IP address). But once inside, you need a room number to find the right person. Port 80 is the web server's office. Port 443 is the HTTPS web server's office. Port 22 is where the SSH remote access person sits. Your computer can have hundreds of conversations at once because each gets its own port number.
How Ports Work
- โขPort numbers range from 0 to 65535
- โขWell-known ports (0โ1023): reserved for standard services, assigned by IANA
- โขRegistered ports (1024โ49151): used by specific applications (e.g., 3389 for Remote Desktop)
- โขDynamic/ephemeral ports (49152โ65535): assigned randomly to client connections
- โขA socket = IP address + port number. Example: 93.184.216.34:443 = example.com HTTPS
- โขEvery network conversation is identified by: source IP:port โ destination IP:port
Essential Port Numbers to Know
| Port | Protocol | Service | Used For |
|---|---|---|---|
| 20 / 21 | TCP | FTP | File transfer (21=control, 20=data) |
| 22 | TCP | SSH | Secure remote terminal access |
| 23 | TCP | Telnet | Insecure remote access (never use!) |
| 25 | TCP | SMTP | Sending email between servers |
| 53 | UDP/TCP | DNS | Domain name resolution |
| 67/68 | UDP | DHCP | IP address assignment |
| 80 | TCP | HTTP | Unencrypted web traffic |
| 110 | TCP | POP3 | Download email (deletes from server) |
| 143 | TCP | IMAP | Sync email (stays on server) |
| 443 | TCP | HTTPS | Encrypted web traffic (TLS) |
| 3389 | TCP | RDP | Windows Remote Desktop |
Email Protocols Explained
POP3 (Port 110)
- โขDownloads email to your device
- โขDeletes from server after download
- โขWorks offline after download
- โขEmail only exists on one device
- โขOlder โ less common today
IMAP (Port 143)
- โขSyncs email โ stays on server
- โขSame inbox on phone, laptop, tablet
- โขDelete on one device = deleted everywhere
- โขNeeds internet to access email
- โขModern standard โ used by Gmail, Outlook
๐ SecurityTelnet (port 23) sends everything โ including passwords โ as plain unencrypted text. Anyone with a packet sniffer on the same network can read every character you type. SSH (port 22) encrypts the entire session: it uses public-key cryptography to authenticate and establish a shared key, then switches to fast symmetric encryption (like AES) for the actual data. This is why Telnet is disabled on every modern network device and SSH is the universal replacement. In CyberPatriot, finding and disabling Telnet and enabling SSH is a scored hardening task on Cisco devices.
โ
FactWhen you visit a website, your browser picks a random high-numbered ephemeral port (like 54231) for the return trip. The conversation is: your IP:54231 โ server IP:443. The server's reply comes back addressed to port 54231. This is how your computer knows which browser tab gets which response โ not all traffic goes to the same port.
๐ง Quick Checkfirst try = +5 XP
A security scan of a server reveals these open ports: 22, 23, 80, 443, 3389. Which port is an IMMEDIATE security concern that should be closed?
๐ฎ Practice what you learned
โญ 0 XP๐ฅ 0 days