Common ports cheat sheet: secure vs insecure

Updated October 9, 2026

The pairing rule

A port number identifies a service on a host, and the exam question usually gives you a protocol and wants the number, or gives you an insecure protocol and wants the secure replacement. The decision rule: if a protocol sends credentials or data in clear text, there is an encrypted twin, and the twin is the right answer whenever the question mentions encrypted, secure or compliance. All numbers below were checked against the IANA service name and port number registry; protocol behaviour is from the RFCs named in each section.

Port ranges and TCP versus UDP

IANA divides the 16-bit space into system or well-known ports (0 to 1023), user or registered ports (1024 to 49151) and dynamic or private ports (49152 to 65535), as RFC 6335 describes. A client picks a random high source port for each connection; the well-known number belongs to the server side. That is why a firewall rule names the destination port, and why a return flow is allowed by connection tracking rather than by opening a high-numbered range.

Most services in this sheet use TCP because they need ordered, reliable delivery. The usual UDP exceptions are DHCP, TFTP, NTP, SNMP, syslog and RADIUS, plus DNS queries. When a question asks for the transport protocol and lists “TCP and UDP”, DNS is the safe pattern: UDP first, TCP when the answer is too large or for a zone transfer.

Remote access and file transfer

PortProtocolTransportSecure?
22SSH (also SFTP and SCP, which run over SSH)TCPYes
23TelnetTCPNo, replace with SSH
21FTP controlTCPNo
20FTP data (active mode)TCPNo
69TFTPUDPNo, no authentication
989 / 990FTPS data / controlTCPYes, FTP over TLS
3389RDPTCPEncrypted, but never expose to the internet

SFTP is not FTP over TLS. SFTP is a file transfer subsystem of SSH and uses port 22; FTPS is FTP wrapped in TLS and uses the 989/990 pair in implicit mode. Mixing the two up is the most common error in this group, and the clue is the word SSH: if the question says the transfer runs through an SSH session, the port is 22.

Web, name and address services

PortProtocolTransportNote
80HTTPTCPClear text
443HTTPSTCPHTTP over TLS
8080HTTP alternateTCPOften a proxy or test web server
53DNSUDP and TCPUDP for queries, TCP for large answers and zone transfers
853DNS over TLSTCPEncrypted DNS
67 / 68DHCP server / clientUDPDetails in DHCP and DNS
123NTPUDPTime; many exams include it

Email

PortProtocolNote
25SMTPServer to server relay, clear text unless upgraded
587SMTP submissionClient to server, normally with STARTTLS upgrade
465SMTP submission over TLS (SMTPS)Registered by IANA as message submission over TLS
110POP3Clear text
995POP3SPOP3 over TLS
143IMAPClear text
993IMAPSIMAP over TLS

RFC 8314 recommends that mail clients use “implicit TLS”, meaning TLS from the first byte, on 993 for IMAP, 995 for POP3 and 465 for submission, over the older STARTTLS-on-587 pattern. Older study material says 465 is deprecated; the IANA registry today lists it as submissions, so treat it as valid. The N10-009 objectives list 587 as “SMTPS”, because submission on 587 is normally upgraded with STARTTLS; for that exam, read SMTPS as 587, while IANA registers 465 as submissions over implicit TLS.

Directory, authentication and management

PortProtocolTransportNote
389LDAPTCP and UDPDirectory queries, clear text unless upgraded
636LDAPSTCPLDAP over TLS
88KerberosTCP and UDPTicket-based authentication
1812 / 1813RADIUS authentication / accountingUDP (also registered for TCP)Wireless and VPN logins
49TACACS+ (registered as tacacs)TCPPer-command administrator authorisation
161 / 162SNMP / SNMP trapUDPUse SNMPv3 for encryption and authentication
514SyslogUDPClear text; 6514 is syslog over TLS
445SMBTCPWindows file sharing
3306MySQLTCP
1433Microsoft SQL ServerTCP
5060 / 5061SIP / SIP over TLSTCP and UDPVoice signalling

Worked example: reading a firewall request

A ticket asks you to open “FTP, mail and remote admin” from the internet to one server, and the security team insists on no clear-text protocols. The mapping: FTP becomes SFTP on 22, mail clients use 993 and 587 or 465, and remote admin uses SSH on 22 instead of Telnet on 23. Everything that the ticket listed in clear text has an encrypted replacement, so the rule set needs 22, 993 and 465 or 587 and no more. Choosing FTPS instead would add 990 plus a range of data ports, which is why SFTP keeps the rule set smaller. The unneeded 23, 21, 110 and 143 stay closed.

Which exams test this

ExamHow it appearsWhere on this site
N10-009Networking Concepts, objective 1.4: an explicit list of ports to know, from FTP 20/21 to SIP 5060/5061, including the secure pairs (SSH, SFTP, HTTPS, LDAPS)Networking concepts, Cheat sheet
200-901Network Fundamentals, objective 6.7: recognise common protocol port values such as SSH, Telnet, HTTP, HTTPS and NETCONFNetwork fundamentals
200-301The outline names protocols rather than port numbers. v1.1 (until Feb 2, 2027): device management access with Telnet, SSH, HTTP, HTTPS and TACACS+/RADIUS (2.8), TCP versus UDP (1.5), SNMP, syslog and TFTP/FTP (4.4, 4.5, 4.9). v2.0 (from Feb 3, 2027): TACACS+ and RADIUS (4.1), SFTP/SCP (4.2), SNMP and syslog (5.4, 5.6)Network services and security
SY0-801Minor, indirect topic: the V8 outline has no port list; open ports and services appear as an attack surface (2.4), and secure communication and file transfer (3.2) and email security (4.1) favour the encrypted protocolSecurity architecture

How questions are built around it

The traps are the near neighbours: SFTP versus FTPS, 587 versus 465, 143 versus 993, and UDP versus TCP for DNS. Constraint words decide the answer: encrypted picks the TLS or SSH twin, time synchronisation picks 123, per-command authorisation picks TACACS+ and network access for wireless users picks RADIUS. Ports also appear inside scenario questions about NSG rule evaluation and access lists, where you must name the port to allow or deny, and how the transport layer carries them is covered in OSI vs TCP/IP.

Question 1. A security policy bans clear-text administration. Administrators currently manage switches with Telnet, and transfer configuration files with FTP. Which change meets the policy with the fewest protocols?

  • A. Replace Telnet with TFTP on UDP 69
  • B. Use SSH on TCP 22 for management and SFTP or SCP for file transfer
  • C. Use FTPS on TCP 990 for both management and file transfer
  • D. Move management to HTTP on TCP 80
Show answer

Answer: B

SSH on TCP 22 replaces Telnet, and SFTP and SCP run over the same SSH service, so one encrypted protocol covers both needs. TFTP has no authentication or encryption. FTPS would also be encrypted but adds a second protocol and more ports. HTTP on port 80 is clear text.

Question 2. A mail client must retrieve messages from a server so that the credentials and messages are encrypted from the first byte. Which port and protocol should the client use?

  • A. IMAP on TCP 143
  • B. POP3 on TCP 110
  • C. SMTP on TCP 25
  • D. IMAPS on TCP 993
Show answer

Answer: D

IMAPS on TCP 993 wraps IMAP in TLS from the start of the connection, which is the implicit TLS approach recommended in RFC 8314. IMAP on 143 and POP3 on 110 are clear text unless upgraded. SMTP on 25 sends mail between servers and does not retrieve messages.

Go deeper