TCP & UDP Ports Explained
Ports are the doors packets use to reach applications.
Every TCP and UDP packet carries source and destination port numbers (0-65535). Firewalls, DDoS filters and service hardening all start with knowing which ports should be open - and which should not.
What are ports?
When two hosts communicate over IP, the operating system must deliver each packet to the correct application. Port numbers identify that application endpoint. A web server listening on port 443 receives HTTPS traffic; SSH listens on port 22.
Ports 0-1023 are well-known and assigned by IANA. Ports 1024-49151 are registered for specific services. Ports 49152-65535 are dynamic/ephemeral - browsers and clients use these temporarily.
TCP vs UDP ports
TCP ports belong to connection-oriented sessions with handshakes and retransmissions - HTTP, SSH, SMTP. UDP ports are connectionless - DNS, NTP, QUIC, and most game protocols.
Many DDoS attacks target UDP because stateless handling is cheaper to flood. TCP attacks often abuse SYN floods or slow connections on ports 80/443. Good protection profiles ports separately.
Well-known, registered and gaming ports
The tables below list the ports operators see most often on hosting, transit and gaming networks. Use them when writing firewall rules, documenting services or explaining filter policy to customers.
Well-known ports (0-1023)
| Port | TCP | UDP | Name | Description |
|---|---|---|---|---|
| 20 | TCP | ftp-data | FTP data transfer | |
| 21 | TCP | UDP | ftp | FTP control channel |
| 22 | TCP | UDP | ssh | Secure Shell remote access |
| 23 | TCP | telnet | Unencrypted remote terminal | |
| 25 | TCP | smtp | Simple Mail Transfer Protocol | |
| 53 | TCP | UDP | dns | Domain name resolution |
| 67 | UDP | dhcp-server | DHCP server (BOOTP) | |
| 68 | UDP | dhcp-client | DHCP client | |
| 69 | UDP | tftp | Trivial File Transfer Protocol | |
| 80 | TCP | http | Hypertext Transfer Protocol | |
| 110 | TCP | pop3 | Post Office Protocol v3 | |
| 123 | UDP | ntp | Network Time Protocol | |
| 143 | TCP | UDP | imap | Internet Message Access Protocol |
| 161 | UDP | snmp | Simple Network Management Protocol | |
| 179 | TCP | bgp | Border Gateway Protocol | |
| 443 | TCP | https | HTTP over TLS | |
| 465 | TCP | smtps | SMTP over TLS (legacy) | |
| 587 | TCP | submission | Mail submission (STARTTLS) | |
| 993 | TCP | imaps | IMAP over TLS | |
| 995 | TCP | pop3s | POP3 over TLS |
Note
Ports 0-1023 are well-known and typically require elevated privileges on Unix systems. IANA assigns official service names.
Registered service ports
| Port | TCP | UDP | Name | Description |
|---|---|---|---|---|
| 1080 | TCP | socks | SOCKS proxy | |
| 1433 | TCP | mssql | Microsoft SQL Server | |
| 3306 | TCP | UDP | mysql | MySQL / MariaDB |
| 3389 | TCP | rdp | Remote Desktop Protocol | |
| 5432 | TCP | postgresql | PostgreSQL database | |
| 6379 | TCP | redis | Redis in-memory store | |
| 8080 | TCP | http-alt | Common alternate HTTP | |
| 8443 | TCP | https-alt | Common alternate HTTPS | |
| 27017 | TCP | mongodb | MongoDB default |
Common gaming & voice ports
| Port | TCP | UDP | Name | Description |
|---|---|---|---|---|
| 25565 | TCP | UDP | minecraft | Minecraft Java server |
| 27015 | TCP | UDP | source-engine | Counter-Strike / Source games |
| 30120 | TCP | UDP | fivem | FiveM (GTA V multiplayer) |
| 7777 | TCP | UDP | unreal | Unreal Engine / ARK (common) |
| 9987 | UDP | teamspeak3 | TeamSpeak 3 voice | |
| 19132 | UDP | minecraft-bedrock | Minecraft Bedrock | |
| 2456 | TCP | UDP | valheim | Valheim (common default) |
| 28015 | TCP | UDP | rust | Rust game server |
Note
Game ports vary by host and mod - these are common defaults frequently targeted in UDP floods and amplification attacks.
Port FAQ
- On one IP address, only one process can bind a given port per protocol (TCP/UDP). Different IPs or NAT can reuse numbers. Load balancers terminate connections and forward internally.
Add port-aware DDoS filtering.
TMW Shield ships protocol profiles for web, mail, DNS, BGP and 20+ game services - tuned per port, not one generic UDP rule.