Network Ports: How Numbers Sort Traffic Between Programs
One computer can serve a website, answer name lookups and handle other network requests at the same network address. The address gets traffic to that destination. Port numbers help sort out which service should receive it.
A network port is a numbered identifier used in network communication. A service is a program that accepts requests, such as a web server sending pages to browsers. The port helps direct traffic to the appropriate application inside the destination device.
These ports are numbers carried in network messages. They're different from the physical USB or Ethernet sockets where you plug in a cable.
To describe a network destination fully, you need more than its port number. You also need its IP address, a numerical address used by the Internet Protocol, and the communication rules being used.
- Skip the install: pfSense Plus comes preloaded, so you can start writing rules right away.
- Get a firewall, router and VPN in one silent box that sips power.
- Keep receiving pfSense Plus updates for the life of the product.
Follow One Request and Its Reply
TCP, the Transmission Control Protocol, and UDP, the User Datagram Protocol, are two sets of rules for carrying data between applications. They're called transport protocols.
TCP carries a stream of data, keeps it in order and resends missing portions. UDP carries individual messages, called datagrams, without itself guaranteeing delivery. Choosing a port number doesn't add those delivery features. The TCP standard and UDP specification describe their different jobs.
Suppose a browser makes an HTTPS connection using TCP. HTTPS is the protected form of web communication. For this example, the web server accepts connections at TCP port 443, and the browser's computer uses temporary port 53000.
| Direction | Source port | Destination port |
|---|---|---|
| Browser sends to server | 53000 on the browser's computer | 443 on the server |
| Server replies to browser | 443 on the server | 53000 on the browser's computer |
Both messages also carry source and destination IP addresses. Together, the two addresses, the two port numbers and the transport protocol distinguish the conversation. The server's port 443 doesn't become the browser's local port just because the browser visited that website.
What Do Port Numbers Actually Do?
The temporary client port is called an ephemeral port. The operating system, the software that manages the computer, chooses it under its own rules. It doesn't need a new port for every page or message. The standard for port selection explains this client-side role.
What a Familiar Number Tells You
TCP and UDP each have their own port numbers from 0 through 65,535. That's 65,536 possible values per protocol, with port 0 reserved rather than assigned as an ordinary service port. TCP port 53 and UDP port 53 are separate destinations in separate number spaces.
Both are registered for DNS, the Domain Name System, which helps look up addresses from readable names. HTTP, the Hypertext Transfer Protocol used for web communication, defaults to TCP port 80. HTTPS over TCP defaults to port 443.
Those defaults help programs agree on where to contact a service. They don't force a program to speak the expected protocol. A service can run on a different port, and a familiar number doesn't prove that the expected service is there. The official port registry explicitly warns against treating a registered number as proof of safe traffic or of a particular application.
- Give every phone, laptop and TV a steadier connection with Wi-Fi 6.
- Stop the buffering at busy hours, with room for many devices at once.
- Replace an aging router and get stronger coverage across more of your home.
Port 443 doesn't encrypt anything, either. For HTTPS over TCP, protection comes from TLS, short for Transport Layer Security. This protocol encrypts the exchange, making its contents unreadable without the right key, and verifies the server's identity. The port is the contact point. The HTTP specification defines these web defaults and HTTPS requirements.
Web traffic can also use UDP. HTTP/3, a newer version of HTTP, runs over a transport called QUIC, which uses UDP. The HTTP/3 standard describes that arrangement.
TCP or UDP: Which One Carries Your Data?
Reading an “Open Port” Finding
For a TCP service to accept incoming connections, a program must be listening: waiting for connection requests at a particular address and port. A UDP service accepts datagrams, without TCP's connection setup.
A port scan sends test traffic and examines the response. Nmap, a network-scanning tool, labels a port open when an application accepts connections or messages. A closed port is reachable but has no listener. A filtered result means traffic restrictions prevent a clear answer. Nmap's port-state documentation explains those labels.
These findings describe what the scanner can observe from its location. A firewall, which allows or blocks traffic according to rules, may let staff reach a service while preventing visitors from reaching it. A blocked test doesn't establish that the service is absent. With UDP scans, silence can leave the scanner unable to distinguish an open service from filtered traffic.
If you're investigating an open result, identify the application, its purpose and who should be allowed to contact it. The port number alone can't establish which software is running, let alone whether it has an exploitable weakness. Nmap documents a separate service-identification process for learning more about the program that answered.
For a file service intended only for staff, closing access to everyone would interrupt their work. Restricting guest access can address the unwanted exposure while employees keep using the service.
Sockets: How a Program Gets a Way to Communicate

Source Ports: The Number Changes Roles When the Reply Returns

Ephemeral Ports: Why That Web Connection Uses Port 52744

QUOTE:
"Amateurs hack systems, professionals hack people."

