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)

PortTCPUDPNameDescription
20TCPftp-dataFTP data transfer
21TCPUDPftpFTP control channel
22TCPUDPsshSecure Shell remote access
23TCPtelnetUnencrypted remote terminal
25TCPsmtpSimple Mail Transfer Protocol
53TCPUDPdnsDomain name resolution
67UDPdhcp-serverDHCP server (BOOTP)
68UDPdhcp-clientDHCP client
69UDPtftpTrivial File Transfer Protocol
80TCPhttpHypertext Transfer Protocol
110TCPpop3Post Office Protocol v3
123UDPntpNetwork Time Protocol
143TCPUDPimapInternet Message Access Protocol
161UDPsnmpSimple Network Management Protocol
179TCPbgpBorder Gateway Protocol
443TCPhttpsHTTP over TLS
465TCPsmtpsSMTP over TLS (legacy)
587TCPsubmissionMail submission (STARTTLS)
993TCPimapsIMAP over TLS
995TCPpop3sPOP3 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

PortTCPUDPNameDescription
1080TCPsocksSOCKS proxy
1433TCPmssqlMicrosoft SQL Server
3306TCPUDPmysqlMySQL / MariaDB
3389TCPrdpRemote Desktop Protocol
5432TCPpostgresqlPostgreSQL database
6379TCPredisRedis in-memory store
8080TCPhttp-altCommon alternate HTTP
8443TCPhttps-altCommon alternate HTTPS
27017TCPmongodbMongoDB default

Common gaming & voice ports

PortTCPUDPNameDescription
25565TCPUDPminecraftMinecraft Java server
27015TCPUDPsource-engineCounter-Strike / Source games
30120TCPUDPfivemFiveM (GTA V multiplayer)
7777TCPUDPunrealUnreal Engine / ARK (common)
9987UDPteamspeak3TeamSpeak 3 voice
19132UDPminecraft-bedrockMinecraft Bedrock
2456TCPUDPvalheimValheim (common default)
28015TCPUDPrustRust 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.