Kernel of Truth

A solid grasp of networking is fundamental for any cyber or infrastructure engineer. This page provides a quick reference to the most commonly used IP ports (including secure variants), a breakdown of TCP/UDP usage, and the key internal IP ranges — including the lesser-known APIPA.


🔌 Common IP Ports (with TCP/UDP and Protocol Reasoning)

PortProtocolServiceTCP/UDPWhy TCP or UDP?
20FTP DataFile Transfer ProtocolTCPReliable data delivery is essential for file integrity.
21FTP ControlFile Transfer ProtocolTCPCommands must be reliably delivered and acknowledged.
22SSHSecure ShellTCPRequires secure, reliable, and ordered communication.
23TelnetRemote login (insecure)TCPReliable terminal session needed for command execution.
25SMTPEmail SendingTCPEnsures emails are delivered and acknowledged.
53DNSDomain Name SystemTCP/UDPUDP for fast lookups, TCP for larger queries like zone transfers.
67DHCP ServerIP Address AssignmentUDPConnectionless protocol; client/server discover each other via broadcast.
68DHCP ClientIP Address AssignmentUDPSame reason as above; used on the client side.
69TFTPTrivial File TransferUDPLightweight and simple, often used for booting devices.
80HTTPWeb Traffic (Insecure)TCPReliable page delivery and session tracking.
110POP3Email RetrievalTCPEmail contents must be delivered completely and in order.
123NTPNetwork Time ProtocolUDPFast and efficient; time sync doesn’t require reliable delivery.
143IMAPEmail RetrievalTCPEnables complex mail handling that requires reliability.
161SNMPNetwork ManagementUDPLightweight polling of devices — speed over reliability.
162SNMP TrapSNMP NotificationsUDPFast, fire-and-forget notifications.
389LDAPDirectory ServicesTCP/UDPTCP for directory queries; UDP in some lightweight cases (less common).
443HTTPSSecure Web TrafficTCPRequires encryption and session persistence.
445SMBFile Sharing (Windows)TCPFile transfers and authentication must be reliable.
514SyslogLog ForwardingUDPPrioritises speed over delivery confirmation; logs may be sent in high volume.
636LDAPSSecure LDAPTCPSame as LDAP but encrypted — reliability still critical.
993IMAPSSecure IMAPTCPSecure, reliable retrieval of email.
995POP3SSecure POP3TCPSame as POP3, but encrypted.
1433MS SQL ServerDatabaseTCPReliable database connections are essential.
1521Oracle DBDatabaseTCPEnsures consistent query/response handling.
3306MySQLDatabaseTCPStructured data transactions require reliability.
3389RDPRemote Desktop ProtocolTCP/UDPTCP for session reliability; UDP (optional) for multimedia optimisation.
5060SIP (unencrypted)VoIP SignallingTCP/UDPUDP common for VoIP efficiency; TCP for NAT traversal and reliability.
5061SIP (TLS)Secure VoIP SignallingTCPTLS encryption requires reliable, ordered transport.
5900VNCRemote GUI AccessTCPVisual interface requires reliable transmission of screen data.
8080HTTP-AltWeb Proxy / Alt HTTPTCPUsed for alternative or proxy HTTP traffic — reliability required.

🔒 Secure Versions of Common Ports

Insecure ServiceSecure EquivalentPort
HTTPHTTPS443
FTPFTPS / SFTP990 / 22
TelnetSSH22
POP3POP3S995
IMAPIMAPS993
LDAPLDAPS636
SIPSIP over TLS5061

🧠 Database Ports Reference Guide


🗄️ Relational Database Ports (SQL)

PortServiceDatabaseTCP/UDPWhy TCP or UDP?
1433SQL ServerMicrosoft SQL ServerTCPEnsures reliable delivery of queries and results.
1434SQL Browser ServiceMS SQL (Discovery)UDPUsed to locate named instances via broadcast.
3306MySQLMySQLTCPHandles transactional communication reliably.
33060X ProtocolMySQL (JSON API)TCPSupports modern apps using MySQL as a document store.
5432PostgreSQLPostgreSQLTCPMaintains consistent, stateful client-server communication.
1521ListenerOracle DBTCPDirects client connections to appropriate Oracle services.
2483Net8 (Unencrypted)Oracle DBTCPLegacy Oracle connections.
2484Net8 (Encrypted)Oracle DB (TLS)TCPSecure alternative to port 2483.

📦 NoSQL & Search Engine Ports

PortServiceDatabaseTCP/UDPWhy TCP or UDP?
27017MongoDBMongoDBTCPHandles document-based queries reliably.
27018MongoDB ShardMongoDB (Shard)TCPInternal shard communication.
27019MongoDB ConfigMongoDB (Cluster)TCPCluster metadata management.
6379RedisRedisTCPIn-memory key-value operations — TCP used for reliability.
6380Redis TLSRedis (Secure)TCPSecure alternative to 6379.
9200REST APIElasticsearchTCPAccepts HTTP requests for search and indexing.
9300Cluster CommsElasticsearchTCPInternal node-to-node communication.
9042CassandraApache CassandraTCPReliable communication in a peer-to-peer distributed DB.
5984CouchDBApache CouchDBTCPRESTful JSON document DB over HTTP.

☁️ Cloud SQL Service Ports (Typically Encapsulated)

Cloud ServiceUnderlying DBDefault PortNotes
Amazon RDSMySQL, PostgreSQL, SQL Server, OracleVaries (3306, 5432, 1433, 1521)Same ports as on-prem; security groups control access.
Azure SQL DatabaseMicrosoft SQL Server1433Must whitelist client IPs and enable firewall rules.
Google Cloud SQLMySQL, PostgreSQL, SQL ServerVariesPort access wrapped in secure connection using Cloud SQL Auth Proxy.

🔐 Note: Cloud SQL services often use TLS by default and restrict access using IAM, firewalls, or client certificates rather than exposing raw database ports publicly.

🏠 Internal IP Address Ranges (RFC1918 & APIPA)

These IP ranges are not routable on the public internet and are used for internal networking:

🔹 Private IP Ranges

10.0.0.0 – 10.255.255.255       (Class A, /8)
172.16.0.0 – 172.31.255.255     (Class B, /12)
192.168.0.0 – 192.168.255.255   (Class C, /16)

These are often used in home networks, enterprise LANs, and VPNs. NAT (Network Address Translation) allows these private IPs to communicate externally.

🔹 APIPA (Automatic Private IP Addressing)

169.254.0.0 – 169.254.255.255

If a device cannot contact a DHCP server and has APIPA enabled, it assigns itself an IP in this range. This allows basic communication between devices on the same subnet but does not allow internet access.


🧭 Why This Matters

Understanding ports and addressing is critical for:

  • Configuring firewalls and ACLs
  • Diagnosing connectivity issues
  • Monitoring network traffic for threats
  • Securing services by enforcing encrypted communication

🔥 Top Exploited Ports (Attack Surface Awareness)

Ports commonly targeted by attackers:

PortServiceReason It’s Targeted
22SSHBruteforce attacks on remote logins.
23TelnetInsecure legacy service; credentials in plaintext.
3389RDPPopular for ransomware and brute-force entry.
445SMBUsed in attacks like WannaCry (EternalBlue).
80/443HTTP/HTTPSTargeted for web app vulnerabilities.
21FTPAnonymous access & misconfigurations.
53DNSDDoS amplification, DNS tunnelling.

🛡️ Hardening Tips

Include basic best practices for port/service security:

  • Close unused ports.
  • Use firewalls to restrict external access.
  • Prefer secure alternatives (SSH over Telnet, HTTPS over HTTP).
  • Monitor open ports with tools like nmap, netstat, or ss.
  • Use port knocking or VPNs for sensitive services like SSH and RDP.
  • Enforce 2FA where possible for remote access services.

🧰 Troubleshooting & Discovery Tools

Quick CLI examples to discover or check open ports:

# Discover open ports on a target
nmap -sS -Pn 192.168.0.10

# List listening ports on a Linux host
ss -tuln

# Find which process is using a port
lsof -i :3306

🧱 OSI Model with Protocol Examples

LayerNameExample Protocols
7ApplicationHTTP (80), DNS (53), SMTP (25)
6PresentationSSL/TLS
5SessionNetBIOS, RPC
4TransportTCP, UDP
3NetworkIP, ICMP
2Data LinkEthernet, ARP
1PhysicalCables, Switches

🛡️Latest Security Alerts 🛡️

NCSC Latest
(The National Cyber Security Centre UK)