Common TCP/UDP Ports Cheat Sheet

About 50 common ports with protocol, service name, purpose, security note and common misconfiguration.

PortProtocolServicePurposeSecurity note
20 / 21TCPFTPFile transfer (20 data, 21 control)Cleartext — use SFTP instead
22TCPSSH / SFTPRemote shell, secure file transferRestrict source IPs and prefer keys over passwords
23TCPTelnetLegacy remote loginCleartext — always replace with 22/SSH
25TCPSMTPMail transfer between serversMany ISPs block outbound 25; use 587
53TCP / UDPDNSName resolutionOpen resolvers are abused for amplification
67 / 68UDPDHCPAutomatic IP assignmentUnauthenticated; enable DHCP snooping
69UDPTFTPDevice config and firmware transferNo auth or encryption — isolated segments only
80TCPHTTPWeb (cleartext)Should redirect to 443
110TCPPOP3Mail retrieval (cleartext)Use 995 (POP3S)
123UDPNTPTime synchronizationAllow only internal NTP peers
143TCPIMAPMail retrieval (cleartext)Use 993 (IMAPS)
161 / 162UDPSNMPDevice monitoring and trapsv2c community is cleartext; use v3
389TCPLDAPDirectory serviceUse 636 (LDAPS)
443TCPHTTPSWeb (encrypted)Check certificate validity and TLS version
445TCPSMBWindows file sharingNever expose to the internet (ransomware entry point)
465 / 587TCPSMTPS / SubmissionEncrypted mail submissionRequire STARTTLS on 587
514UDPSyslogLog collectionUnencrypted; tunnel it across the internet
636TCPLDAPSEncrypted directory serviceValidate the certificate chain
873TCPrsyncFile synchronizationDisable anonymous mode — it leaks directory listings
993 / 995TCPIMAPS / POP3SEncrypted mail retrievalPreferred
1433TCPSQL ServerMicrosoft SQL ServerDo not expose directly
1521TCPOracle DBOracle databaseRestrict to app server subnets
2049TCP / UDPNFSNetwork file systemIP-allowlist only; never across untrusted networks
3306TCPMySQLMySQL databaseDisallow remote root login
3389TCPRDPWindows Remote DesktopDo not expose publicly — use VPN or an allowlist
5432TCPPostgreSQLPostgreSQL databaseReview trust entries in pg_hba.conf
5900TCPVNCRemote desktopWeak default auth; internal only
6379TCPRedisIn-memory databaseNo auth by default — public exposure means data loss
8080 / 8443TCPHTTP 备用端口App servers, admin consolesRestrict admin consoles by source IP
9200TCPElasticsearchSearch and log storageEarly versions had no auth — enable it
Source: IANA Service Name and Transport Protocol Port Number Registry. Security notes are general practice; some ports have vendor-specific uses. Last updated: 2026-11-20