Kernel of Truth

Well-Known TCP & UDP Ports (0–1023)

🌐 Well-Known TCP & UDP Ports (0–1023)

Ports are essential for networking—they define how data is routed to specific services. In cybersecurity, knowing port numbers helps with firewall rules, network forensics, and attack detection.


📌 What Are Well-Known Ports?

  • Ranges from 0–1023
  • Assigned by IANA for standardised services
  • Used by operating systems and common applications
  • Most are TCP, UDP, or both

🔐 Common TCP Ports (Connection-Oriented)

PortProtocolServiceDescription / Use Case
20TCPFTP (Data)File Transfer Protocol (data channel)
21TCPFTP (Control)Commands and login credentials for FTP
22TCPSSHSecure remote login / file transfer (SCP, SFTP)
23TCPTelnetInsecure remote shell—legacy system access
25TCPSMTPEmail sending (can be abused for spam relays)
53TCP/UDPDNSResolves hostnames to IP addresses
80TCPHTTPUnencrypted web traffic
110TCPPOP3Legacy email retrieval
143TCPIMAPEmail retrieval (more flexible than POP3)
443TCPHTTPSSecure web traffic using SSL/TLS
465TCPSMTPSSecure SMTP (legacy)
993TCPIMAPSSecure IMAP
995TCPPOP3SSecure POP3
3306TCPMySQLDefault MySQL database port
3389TCPRDPRemote Desktop Protocol (Windows)
8080TCPHTTP-altOften used for proxy servers or development servers

📡 Common UDP Ports (Connectionless)

PortProtocolServiceDescription / Use Case
53UDPDNSFaster hostname resolution using UDP (TCP for large responses)
67UDPDHCP (Server)Dynamic Host Configuration Protocol – server replies
68UDPDHCP (Client)Client sends DHCP request
69UDPTFTPTrivial File Transfer Protocol (insecure)
123UDPNTPNetwork Time Protocol – used to sync clocks
161UDPSNMPSimple Network Management Protocol – device queries
162UDPSNMP TrapReceives alerts from SNMP-enabled devices
500UDPIKE (IPSec VPN)Internet Key Exchange for VPNs
514UDPSyslogLogging messages (often sent to SIEM)
520UDPRIPRouting Information Protocol
33434UDPTracerouteUsed by traceroute tool to map network hops

🧠 Security Context: Why Port Knowledge Matters

ScenarioWhy It Matters
Firewall configurationBlock/allow traffic based on service ports
Threat huntingDetect unusual port usage (e.g. SSH on port 443)
Penetration testingPort scanning helps identify vulnerable services
Incident responseKnow what data moved where and how
Compliance (PCI, ISO)Ensure only necessary ports are exposed

🛡️ Tips

  • 🚫 Close unused ports to reduce attack surface
  • 🔍 Scan regularly using tools like Nmap
  • Use secure alternatives (e.g., SSH over Telnet, HTTPS over HTTP)
  • 📦 Log and monitor port activity for anomalies

✅ Summary Table (Quick Reference)

PortProtocolServiceSecure Version
20TCPFTP (data)FTPS / SFTP
21TCPFTP (control)FTPS / SFTP
22TCPSSH
23TCPTelnet
25TCPSMTP465 / 587
53TCP/UDPDNSDNSSEC
80TCPHTTP443 (HTTPS)
110TCPPOP3995
143TCPIMAP993
443TCPHTTPS
3389TCPRDPUse VPN / MFA