Skip to content
EN
Get Started

Port

A port is a number from 0 to 65535 that directs TCP or UDP traffic to the right service on a device, such as 443 for HTTPS or 22 for SSH.

Table of Contents (8 sections)

How a port works

An IP address gets traffic to a host or network interface. The destination port in the TCP or UDP header tells the operating system which listening application should receive it. TCP and UDP have separate port spaces, so TCP port 53 and UDP port 53 are distinct endpoints.

Client 192.0.2.24:53014 → Proxy 198.51.100.8:8080 → example.com:443

Here, 53014 is a temporary source port selected by the client’s operating system. The proxy listens on port 8080, while the destination website accepts HTTPS traffic on port 443.

Port number ranges

  • Port 0: reserved and not normally used as a service port.
  • Well-known ports, 1–1023: used by common services, such as HTTP on 80 and HTTPS on 443.
  • Registered ports, 1024–49151: associated with registered applications and services, though registration doesn’t prevent other uses.
  • Dynamic or private ports, 49152–65535: available for temporary client connections or private applications.

Operating systems can use different ephemeral port ranges. A familiar number is also only a convention: software can serve HTTP on port 8080 or another available port.

IP addresses vs ports

IP address Port
Identifies A host or network interface A service or application
Used for Routing traffic between networks Delivering traffic inside the host
Example 198.51.100.8 8080

Together, the address and port form an endpoint such as 198.51.100.8:8080. Firewalls can allow or deny traffic based on the transport protocol and port as well as the IP address.

Ports in proxy settings

A proxy server setting normally requires a hostname or IP address and an exact listening port. These identify the proxy gateway, not the destination site’s port.

For example, a client may connect to a proxy on port 8080 and ask it to open example.com:443. Entering the wrong proxy port can cause a connection refusal, a timeout or a protocol error. The port number alone doesn’t prove which proxy protocol or encryption method is in use, so follow the supplied connection settings.

FAQ

What port should I use for a proxy?

Use the exact port supplied with the proxy hostname or IP address. There is no universal proxy port, even though numbers such as 8080 and 1080 are commonly associated with proxy services.

Is port 8080 always an HTTP proxy?

No. Port 8080 is often used for alternate HTTP services and proxies, but any application can listen on it. You must check the service configuration.

Can TCP and UDP use the same port number?

Yes. TCP and UDP maintain separate port spaces, so an application can listen on the same number for both protocols. It must open and handle each protocol separately.

Related Terms

View All Terms