Networking handbook · Chapter 21

Common ports and service endpoints

An application log says a client connected from 53124 to 443. Those numbers describe the two ends of one conversation. To interpret them, start with the transport and the direction of the first exchange.

In this guide13 sections

Introduction

An application log says a client connected from 53124 to 443. Those numbers describe the two ends of one conversation. To interpret them, start with the transport and the direction of the first exchange.

How a client reaches the right process

IP delivers a packet to an address. TCP or UDP then uses the destination port to deliver its contents to a socket. A web server can accept many TCP connections on port 443 because each connection also has a client address and source port.

Source and destination reverse when the server replies. The client typically chooses a temporary port for an outgoing connection. Its actual range depends on the operating system.

Reading a port registration

Port numbers occupy 16 bits, giving values from 0 through 65,535. IANA groups them into system ports (0–1023), user ports (1024–49151) and dynamic or private ports (49152–65535). Port zero is reserved.

TCP and UDP have separate number spaces. A DNS implementation can serve both on 53. HTTP/3 commonly uses QUIC over UDP 443, while HTTP/1.1 and HTTP/2 commonly use TLS over TCP 443 for HTTPS.

Match a service to its configuration

A port in a registry describes a convention. An administrator can bind an application to a different port or place a reverse proxy in front of it. Read the client URL and the listener configuration together. A proxy may receive traffic on 443 and forward requests to a backend on 8443.

Diagram

  1. Client TCP 53124
  2. Server TCP 443
  3. Reply to TCP 53124
A single connection uses a port at each end. The reply travels back to the client's selected port.

Worked examples

Distinguish two simultaneous HTTPS sessions

  1. A workstation at 192.0.2.10 uses TCP 53124 to reach 198.51.100.8 on 443.
  2. A second connection from that workstation uses 53125. The server address, port and transport are identical.
  3. The source port distinguishes the two TCP connections. A UDP exchange with those same numbers would belong to another transport.

TCP/UDP Port Reference: Read a DNS resolver configuration

  1. A resolver configuration lists DNS on port 53. Look up 53 and consider both UDP and TCP.
  2. For a conventional UDP query, model the client as sending from a temporary port to destination UDP 53. The response reverses those endpoints.
  3. A TCP exchange with the same DNS service uses TCP 53. Record the transport explicitly when describing the two cases.

Reference table

Common ports and service endpoints reference
ServiceUsual endpointInterpretation
SSHTCP 22Remote login session
DNSUDP or TCP 53Name-service messages
NTPUDP 123Time synchronization
HTTPSTCP 443HTTP over TLS
HTTP/3Usually UDP 443HTTP over QUIC

Configuration example

  • Document both the public listener and any backend listener. Record the transport beside every port.
  • For the proxy example, a client uses https://portal.example on its default HTTPS port. The proxy's backend configuration names the separate service on 8443.

Common mistakes

  • Inferring the application or encryption settings from the number alone.
  • Treating a temporary client port in a reply as the server's configured listener.

Frequently asked questions

Can two services use port 53?

TCP 53 and UDP 53 are separate endpoints. Processes can also bind different local IP addresses. Whether a particular bind succeeds depends on the socket configuration.

Does selecting a port here check a server?

The reference looks up locally stored service conventions. Listener configuration and application logs provide evidence about an actual installation.

Is a port number alone enough to identify a service?

No. Interpret it with transport protocol, destination host, listening process, and configuration. A familiar port assignment is a convention, not proof of the running service.

What is the valid TCP or UDP port range?

Port fields are 16 bits, so values range from 0 through 65,535. Operating systems and registries assign conventions and usage categories within that range.

Can the same number be used by TCP and UDP?

Yes. TCP and UDP have separate transport namespaces, so the same numeric port can be assigned to different services or listeners for each protocol.

Does an open port prove a host is vulnerable?

No. It only indicates that a service or network behavior responded under the test conditions. Security depends on the service, configuration, exposure, and authorization context.

What are ephemeral ports used for?

A client operating system commonly selects a temporary source port for an outgoing connection. The range and reuse policy vary by operating system and configuration.

Does a service always listen on its registered port?

No. A service can use another port, and unrelated software can bind a familiar number. Confirm the protocol and service response rather than relying only on a number.

Are ports zero through 1023 always privileged on every platform?

They are the well-known range in IANA terminology, but local operating-system rules determine which users may bind particular ports.

Why are TCP 443 and UDP 443 both used for web traffic?

Traditional HTTPS commonly uses TCP 443, while HTTP/3 uses QUIC over UDP, commonly also on 443. Transport must be considered alongside the number.

What is a listening port?

It is a transport endpoint bound by a process or service to accept traffic for a protocol and local address. A port number alone does not identify the process or prove external reachability.

Why can a firewall rule need both protocol and port?

TCP and UDP have separate port spaces and different traffic behavior. A rule that permits TCP 53 does not automatically permit UDP 53.

What is the difference between assigned and observed port use?

A registry can document a service's customary port assignment, while a packet capture or socket table shows what a particular system is actually using.

Can port scanning identify the exact software version?

A port response alone cannot reliably establish a version. Service banners can be hidden or changed, and the same port can host different implementations.

Does opening an inbound port guarantee access?

No. The service must listen, host and network firewalls must permit it, and routing or translation must deliver traffic to the host.

Further learning and references