01Chapter 1: What a port number identifiesThis chapter assumes you know what an IP address is, understand the client-server model, can run commands in a terminal, and can read a short Python script.2 min read
02Chapter 2: Well-known, registered and dynamic port rangesThis chapter assumes you know that a port number identifies a service on a host, that IP addresses identify hosts, and that you can run short Python scripts and terminal commands.2 min read
03Chapter 3: TCP and UDP: which protocols use whichThis chapter assumes you know what a port number identifies and the three port ranges. It also assumes you can run short Python scripts and terminal commands. Here you learn how TCP and UDP differ, and why each application protocol uses one, the other, or both.2 min read
04Chapter 4: Sockets and ephemeral client portsThis chapter assumes you know what a port number identifies, the three port ranges, and the difference between TCP and UDP. It explains how a connection is named and why clients use temporary ports.3 min read
05Chapter 5: Where port assignments come fromThis chapter assumes you know what a port number identifies and the three port ranges (well-known, registered and dynamic). It explains who decides which service gets which number, and how your system learns those numbers.2 min read
06Chapter 6: HTTP on ports 80 and 443This chapter assumes you know what a port is, how a socket is formed from an IP address, a port and a transport protocol, and that you can read short Python scripts and run terminal commands.2 min read
08Chapter 8: DNS: port 53 over UDP and TCPThis chapter assumes you know what an IP address is, how a client talks to a server, and how to run commands in a terminal. It also assumes you can read a short Python script. You should already know the difference between TCP and UDP from the earlier chapter.2 min read
09Chapter 9: Email ports: SMTP, IMAP and POP3This chapter assumes you know what a port is, how TCP carries a connection to a port, and how a plain-text protocol differs from its TLS-protected variant. Email uses three protocols, each with its own ports and its own job.2 min read
10Chapter 10: Remote access: SSH, Telnet and RDPThis chapter assumes you know what a port is, how TCP differs from UDP, and how to run commands in a terminal. Remote access protocols let you control another machine over the network. Three are common, and each has a default port.2 min read
11Chapter 11: File transfer: FTP, SFTP and TFTPThis chapter assumes you know what a port is, the difference between TCP and UDP, and how SSH works at the level of the previous chapter. Three protocols move files, and their names look alike. They differ in transport, ports and security.2 min read
12Chapter 12: DHCP, NTP, SNMP and syslogThis chapter covers four infrastructure protocols that keep a network running. It assumes you know what a port is, the difference between TCP and UDP, and how a client talks to a server on a well-known port. All four mainly use UDP, because their messages are small and a lost message is cheap to ret2 min read
13Chapter 13: LDAP and SMBThis chapter assumes you know what a port is, the difference between TCP and UDP, and how a client connects to a server socket. It covers two protocols used in corporate networks: LDAP for directory lookups and SMB for file and printer sharing.2 min read
14Chapter 14: Common database portsThis chapter assumes you know what a port is, the three port ranges, and the difference between TCP and UDP. It also assumes you can read short Python scripts and run commands in a terminal.2 min read
15Chapter 15: Listing and testing ports from the command lineThis chapter assumes you know what a port number identifies, the difference between TCP and UDP, and how to run commands in a Linux terminal. You will learn to answer two questions: which ports is this machine listening on, and can I reach a port on another machine?2 min read
16Chapter 16: Ports in firewall rulesThis chapter assumes you know what a port is, how TCP and UDP differ, and the default ports of common services. It shows how firewalls use ports to decide which traffic to allow.2 min read
17Chapter 17: Non-standard ports and why port numbers are not proof of protocolThis chapter assumes you know the well-known, registered and dynamic port ranges, the difference between TCP and UDP, and how to list and test ports from the command line. It also assumes you can read a short Python script.3 min read