// ports

Common Ports Cheat Sheet (TCP & UDP)

Every TCP and UDP port network engineers, NOC analysts and security teams actually see in tickets — grouped by category with operational notes, not just IANA assignments. Bookmark this. It answers 90% of 'what port is X?' questions in one glance.

Updated

Web & HTTP

PortProtoServiceNotes
80TCPHTTPPlain web — should redirect to 443.
443TCPHTTPSTLS web. Most common open port today.
8080TCPHTTP-altCommon dev / reverse-proxy port.
8443TCPHTTPS-altCommon admin UI / app server port.
3000TCPNode / React devDefault for Next.js, Vite preview, Express.
5000TCPFlask / .NET devDefault dev server port.

Remote access

PortProtoServiceNotes
22TCPSSH / SFTPRemote shell + secure file transfer.
23TCPTelnetCleartext — disable wherever found.
3389TCPRDPWindows remote desktop. Never expose to internet.
5900TCPVNCRemote desktop. Tunnel over SSH.
5985/5986TCPWinRM5985 HTTP, 5986 HTTPS.

Email (SMTP / IMAP / POP3)

PortProtoServiceNotes
25TCPSMTPServer-to-server mail relay.
110TCPPOP3Legacy mail retrieval (cleartext).
143TCPIMAPMail retrieval (cleartext).
465TCPSMTPSSMTP over implicit TLS (legacy submission).
587TCPSMTP submissionAuthenticated submission with STARTTLS — use for clients.
993TCPIMAPSIMAP over TLS.
995TCPPOP3SPOP3 over TLS.

Network services (DNS, DHCP, NTP, SNMP)

PortProtoServiceNotes
53TCP/UDPDNSUDP for queries, TCP for AXFR / responses > 512B.
67/68UDPDHCP67 server, 68 client.
69UDPTFTPSwitch/router image transfer.
123UDPNTPTime sync. Critical for auth & logs.
161/162UDPSNMP161 polling, 162 traps. Use v3.
179TCPBGPBorder Gateway Protocol peering.
514UDPSyslogLog shipping to collector.
520UDPRIPLegacy routing protocol.

File sharing & transfer

PortProtoServiceNotes
20/21TCPFTPData / control. Cleartext — avoid.
115TCPSFTP (legacy)Note: modern SFTP runs over SSH on 22.
137-139TCP/UDPNetBIOSLegacy SMB. Block at perimeter.
445TCPSMBWindows file sharing. Patch & restrict.
2049TCP/UDPNFSNetwork File System.
873TCPrsyncNative rsync daemon (not over SSH).

Databases

PortProtoServiceNotes
1433TCPMSSQLMicrosoft SQL Server.
1521TCPOracle DBOracle TNS listener.
3306TCPMySQL / MariaDBAuthenticate; never expose publicly.
5432TCPPostgreSQLUse SSL + pg_hba.conf rules.
6379TCPRedisDefault cleartext. Bind to localhost / require AUTH.
9200/9300TCPElasticsearch9200 REST, 9300 transport.
11211TCP/UDPMemcachedDisable UDP — used for reflection DDoS.
27017TCPMongoDBDefault cleartext. Authenticate.

Directory, auth & VPN

PortProtoServiceNotes
88TCP/UDPKerberosAD authentication.
135TCPMS RPCWindows endpoint mapper.
389TCP/UDPLDAPDirectory services (cleartext).
636TCPLDAPSLDAP over TLS.
500UDPIKE / IPsecVPN key exchange.
1194UDPOpenVPNDefault OpenVPN port.
1701UDPL2TPLayer 2 Tunneling Protocol.
1723TCPPPTPLegacy VPN — insecure.
4500UDPIPsec NAT-TIKE traversal through NAT.
51820UDPWireGuardModern VPN default.

VoIP & media

PortProtoServiceNotes
1935TCPRTMPLive video streaming (Flash legacy + still common in OBS).
3478TCP/UDPSTUN / TURNWebRTC NAT traversal.
5060/5061TCP/UDPSIP / SIPSVoIP signaling. 5061 = TLS.
5004/5005UDPRTP / RTCPVoice/video media + control.

IANA port ranges

The 16-bit TCP and UDP port space (0–65535) is split into three ranges by RFC 6335.

RangeNameNotes
0 – 1023Well-known portsAssigned by IANA. Bind requires root on Unix.
1024 – 49151Registered portsVendor-registered (e.g. 3306 MySQL, 5432 Postgres).
49152 – 65535Ephemeral / dynamicClient source ports, RFC 6335.

Never expose these to the internet

The ports most commonly responsible for breaches when left open. Put them behind a VPN, SSH tunnel or zero-trust proxy.

PortServiceWhy it's dangerous
23TelnetCleartext credentials.
445SMBWormable history (WannaCry, EternalBlue).
3389RDPBrute-force + ransomware vector #1.
1433 / 3306 / 5432 / 6379 / 27017DatabasesDirect data exfiltration if exposed.
161SNMP v1/v2cCommunity strings sniffed in cleartext.
5900VNCOften unauthenticated by default.

Quick lookup tips

  • On Linux: getent services 443 or cat /etc/services | grep -w 443.
  • See what's listening: ss -tulpn (Linux) or netstat -ano (Windows).
  • Test a remote port: nc -zv host 443 or nmap -p 443 host.
  • Ephemeral range on Linux: cat /proc/sys/net/ipv4/ip_local_port_range.
// free download

Get the Network Engineer Starter Pack

A printable 5-page PDF: first-60-seconds triage, modern Linux network commands, BGP show commands & path-selection order, and a symptom → root-cause map. Free, no fluff.

No spam. Unsubscribe anytime. We send occasional updates when we ship new tools or cheatsheets.

FAQ

What's the difference between TCP and UDP ports?
Same 16-bit number space, but they're separate. TCP port 53 and UDP port 53 are independent endpoints. TCP is connection-oriented and reliable; UDP is connectionless and fast — used for DNS, NTP, VoIP and streaming.
Which ports should never be exposed to the public internet?
RDP (3389), SMB (445), Telnet (23), all database ports (1433, 3306, 5432, 27017, 6379, 9200), SNMP (161) and Memcached (11211 UDP). Put them behind a VPN, SSH tunnel or zero-trust proxy.
What's the difference between SMTP ports 25, 465 and 587?
25 is server-to-server relay (often blocked outbound by ISPs). 465 is legacy implicit-TLS submission. 587 is the modern client submission port using STARTTLS with authentication. Use 587 for clients, 25 only for MTA-to-MTA.
Why does DNS use both TCP and UDP port 53?
UDP for normal queries (small and fast). TCP for zone transfers (AXFR/IXFR) and any response larger than 512 bytes (or 4096 with EDNS). DNS over TLS uses 853, DNS over HTTPS uses 443.
What's the range of well-known ports?
0–1023 are well-known (assigned by IANA, require root to bind on Unix). 1024–49151 are registered ports. 49152–65535 are ephemeral / dynamic ports used as client source ports (RFC 6335).
What port does SFTP use?
Modern SFTP runs over SSH on port 22 — it's a subsystem of SSH, not the old standalone protocol. The legacy port 115 (SFTP over its own protocol) is essentially never used today. FTPS is different — that's FTP with TLS on 21 (explicit) or 990 (implicit).
How many TCP ports exist in total?
65,536 (0–65535) for TCP and another 65,536 for UDP — they're separate namespaces. Port 0 is reserved and shouldn't be used.
What ports does Active Directory use?
Kerberos (88 TCP/UDP), LDAP (389), LDAPS (636), Global Catalog (3268/3269), DNS (53), SMB (445), RPC endpoint mapper (135) and a dynamic RPC range (49152–65535 on modern Windows).

Related