Top 20 Network Ports Every IT Pro Must Know

The definitive visual guide to the 20 most important network ports. Not just a list — each port comes with real-world context, a story, and a security insight.

Visual grid of the 20 most important network ports, each with its service name and port number
📧

Get weekly IT guides

Join 5,000+ IT professionals

Subscribe Free

You don’t need to memorize 65,535 port numbers. In real-world IT work — from configuring firewalls to debugging network issues to hardening servers — the same 20 ports come up over and over.

Learn these 20. The rest you’ll look up when needed.

How to Use This Guide

Don’t try to memorize this all at once. Read each port entry, think about the “Real-World Story”, and scan the security note. Come back here whenever you configure a firewall, open a port, or hit a network error. Within a month of real server work, these will be automatic.


The 20 Ports (Visual Reference)

Color-coded grid of 20 network ports grouped by category: Remote Access ports 22 and 3389, Web ports 80 and 443, Email ports 25 587 110 143 and 993, File Transfer ports 20 21 and 22, Database ports 3306 5432 6379 and 27017, Infrastructure ports 53 67 123 161 and 514
The 20 most important ports, grouped by purpose. Remote Access (blue), Web (green), Email (pink), File Transfer (orange), Database (yellow), Infrastructure (purple).

🔵 Remote Access

Port 22 — SSH (Secure Shell)

Transport: TCP | Range: Well-Known

The most important port for any Linux/server admin. Every day you use SSH.

What it does: Encrypted remote terminal access. Type commands on a server 10,000 km away as if it’s your keyboard.

Real-World Story: An attacker runs an automated scan: nmap -p 22 0.0.0.0/0. Every server with port 22 open gets a barrage of brute-force login attempts — thousands per hour. If you allow password authentication, they will eventually get in.

Security Rule: Harden Port 22
  1. Disable password auth: PasswordAuthentication no in /etc/ssh/sshd_config
  2. Use SSH keys only (see SSH Key Management guide)
  3. Consider changing to a non-standard port (obscurity, not real security)
  4. Use fail2ban to auto-block IPs after failed attempts
ss -tn | grep ':22'

See active SSH connections to your server right now

beginner
  • Each line is one active SSH session
  • The 'Peer Address' is the IP of the person connected

Port 3389 — RDP (Remote Desktop Protocol)

Transport: TCP | Range: Registered

Windows equivalent of SSH — but with a full graphical desktop.

Real-World Story: RDP is one of the most attacked ports on the internet. In 2020, ransomware groups gained access to thousands of companies through exposed RDP ports with weak passwords. Never expose port 3389 directly to the internet.

Best Practice

If you need RDP access, put it behind a VPN or use a jump server. Port 3389 should never be in a public firewall allow rule.


🟢 Web Traffic

Port 80 — HTTP (HyperText Transfer Protocol)

Transport: TCP | Range: Well-Known

The original unencrypted web. But don’t block it — modern servers use it to redirect to HTTPS.

What it does: Serves web pages. No encryption. Everything you send on HTTP is readable by anyone between you and the server (your ISP, coffee shop WiFi owner, etc.)

In 2026: Browsers show “Not Secure” warnings for HTTP. Your web server should return a 301 redirect from port 80 → port 443. That’s the only legitimate use for port 80 today.

server {
    listen 80;
    return 301 https://$host$request_uri;  # Redirect HTTP → HTTPS
}

Port 443 — HTTPS (HTTP Secure)

Transport: TCP | Range: Well-Known

The encrypted web. ~95% of all web traffic today.

What it does: Same as HTTP but wrapped in TLS encryption. Your browser and the server negotiate an encryption key, then all data is encrypted. Your ISP can see you visit google.com but can’t read what you searched.

TLS vs SSL

You’ll hear “SSL” used everywhere, but SSL is deprecated. Modern HTTPS uses TLS 1.2 or TLS 1.3. When someone says “SSL certificate”, they mean a TLS certificate. Same thing, different name.


🩷 Email

Port 25 — SMTP (Simple Mail Transfer Protocol)

Transport: TCP | Range: Well-Known

Server-to-server email delivery. Your mail server uses port 25 to send email to other mail servers.

Important: Your ISP almost certainly blocks outbound port 25 to prevent spam. If you run your own mail server, you’ll need special ISP approval or use a transactional email provider (SendGrid, AWS SES).


Port 587 — SMTP Submission (with STARTTLS)

Transport: TCP | Range: Registered

Client-to-server email sending. This is the port your email client (Thunderbird, Outlook) uses to send email through your email provider (Gmail, Fastmail).

Rule of thumb: Port 25 = server-to-server. Port 587 = your email app sending email.


Port 993 — IMAPS (IMAP over SSL/TLS)

Transport: TCP | Range: Registered

Encrypted email retrieval. Your email client connects here to sync your inbox.

IMAP vs POP3: IMAP (ports 143/993) syncs your mailbox across devices — delete on phone, it’s deleted everywhere. POP3 (port 110) downloads and removes from server — old, avoid it.


🟠 File Transfer

Port 21 — FTP Control

Transport: TCP | Range: Well-Known

The original file transfer protocol — completely unencrypted. Avoid in 2026.

Real-World Story: In the 1990s, FTP was how the web worked. Developers would FTP files to their servers. Today, any FTP session on a coffee shop WiFi is fully readable to anyone listening. Your password, your files, all transmitted in plain text.

Never Use Plain FTP in 2026

Use SFTP (SSH File Transfer Protocol, also on port 22) or FTPS (FTP over TLS, port 990) instead. They encrypt everything. Most modern FTP clients support SFTP.


Port 20 — FTP Data

Transport: TCP | Range: Well-Known

FTP splits into TWO connections: port 21 for commands, port 20 for actual data transfer. This is why FTP has “active” and “passive” mode — they handle the data channel differently.


🟡 Databases

Port 3306 — MySQL / MariaDB

Transport: TCP | Range: Registered

The most common web application database port.

Security Rule: MySQL should never be exposed to the internet. In your server firewall, port 3306 should only accept connections from 127.0.0.1 (localhost) or your application server’s private IP.

sudo ufw deny 3306

Block port 3306 from all external connections (Linux UFW firewall)

beginner
  • Your web app connects to MySQL on localhost — no internet exposure needed
  • If you see port 3306 open on a public IP scan, that's a critical security misconfiguration

Port 5432 — PostgreSQL

Transport: TCP | Range: Registered

Same rules as MySQL. PostgreSQL listens on 5432. Never expose to internet. Same firewall rules apply.


Port 6379 — Redis

Transport: TCP | Range: Registered

Redis (cache, message broker, queue) listens on 6379. Default Redis install has no authentication. This has caused countless breaches.

Redis Without Auth = Free Data for Attackers

In 2018+, hundreds of thousands of Redis instances exposed on port 6379 were wiped by ransomware because default Redis has no password. Always: bind Redis to localhost only and set a strong password in redis.conf.


Port 27017 — MongoDB

Transport: TCP | Range: Registered

MongoDB default port. Default install (older versions) had no authentication enabled — same problem as Redis.

Historical note: The “MongoDB Ransomware” attacks of 2017 exposed 28,000 MongoDB instances because they were exposed on port 27017 with no auth. ~$680,000 in ransom was paid.


🟣 Infrastructure

Port 53 — DNS

Transport: UDP (small queries) + TCP (large responses) | Range: Well-Known

Every single web request starts with a DNS lookup on port 53. It’s the most used port on the internet that most people never think about.

DNS Amplification Attacks: Attackers use open DNS resolvers (port 53 open to internet) to amplify DDoS attacks. A 1KB DNS query can be amplified into a 60KB response — 60x amplification. Never run an open DNS resolver.


Port 67/68 — DHCP

Transport: UDP | Range: Well-Known

How your computer gets its IP address automatically when it connects to a network.

  • Server listens on port 67 (DHCP server)
  • Client sends from port 68 (DHCP client)

Rogue DHCP Attack: An attacker on your network runs a fake DHCP server. Clients connect and get the attacker’s IP as their default gateway — all traffic routed through the attacker. This is a real attack on enterprise networks.


Port 123 — NTP (Network Time Protocol)

Transport: UDP | Range: Well-Known

Time synchronization. Your server uses NTP to keep its clock accurate.

Why it matters for security: TLS certificates have an expiry time. If your server clock is wrong by more than a few minutes, TLS handshakes will fail. SSH keys have timestamps. Logs become unreliable. Time is foundational to security.


Port 161 — SNMP (Simple Network Management Protocol)

Transport: UDP | Range: Registered

Used for monitoring network devices (routers, switches, printers). Your monitoring system (Nagios, Zabbix, Datadog) polls devices on port 161 to collect metrics.

Security risk: SNMP v1 and v2 use “community strings” (essentially plain-text passwords). Default community string: public. Many network devices shipped with this default and were never changed — an attacker can read your entire network topology.


Port 514 — Syslog

Transport: UDP | Range: Well-Known

System logs sent from servers to a central log collector. Your servers stream their logs to a SIEM or log aggregator on port 514.

Security note: Traditional syslog on UDP 514 is unencrypted and unconfirmed (UDP = fire and forget). For security-critical environments, use syslog-ng over TCP 6514 (TLS-encrypted).


Quick Reference Card

PortProtocolTransportRemember It As
20FTP DataTCPFile transfer data (avoid — use SFTP)
21FTP ControlTCPFile transfer commands (avoid — use SFTP)
22SSH / SFTPTCPYour daily driver — secure remote access
25SMTPTCPServer-to-server email delivery
53DNSUDP/TCPEvery web request uses this first
67/68DHCPUDPHow computers get their IP address
80HTTPTCPRedirect to 443 only — never serve real content
110POP3TCPOld email fetch — avoid
123NTPUDPClock sync — critical for TLS and logs
143IMAPTCPEmail sync (unencrypted)
161SNMPUDPNetwork device monitoring
443HTTPSTCPThe encrypted web
514SyslogUDPCentral log collection
587SMTP/TLSTCPEmail sending from clients
993IMAPSTCPEncrypted email sync (use this, not 143)
3306MySQLTCPLocalhost only. Never expose.
3389RDPTCPWindows remote desktop — never public
5432PostgreSQLTCPLocalhost only. Never expose.
6379RedisTCPLocalhost only + auth required
27017MongoDBTCPLocalhost only + auth required

Key Takeaways

  1. Memorize the Big 5: 22 (SSH), 53 (DNS), 80 (HTTP), 443 (HTTPS), 3306 (MySQL). They appear in 80% of server work.
  2. Database ports (3306, 5432, 6379, 27017) should NEVER be public — bind to localhost only.
  3. Port 22 needs hardening — disable password auth, use SSH keys, consider fail2ban.
  4. FTP (20/21) is dead — use SFTP (port 22) or FTPS (990). Plain FTP transmits passwords in cleartext.
  5. Port 80 in 2026 has one job: redirect to 443. Nothing else.
  6. SNMP and Syslog have unencrypted defaults — upgrade to their TLS variants in production.
You Now Know

The 20 ports that cover 95% of real-world server administration. You can now read firewall rules, understand network scans, and spot critical security misconfigurations by port number alone.

Next Steps in This Series

🧠

Test Your Port Knowledge

Take a quick 3-question quiz to check your understanding.

📧

Get weekly IT guides

Join 5,000+ IT professionals

Subscribe Free
Type to start searching...