What Does a Port Number Mean?
A port number helps a computer determine which application or network service should receive incoming traffic.
An IP address identifies a device or network endpoint, while a port number identifies a particular service or process using that address.
What is a port number?
When a device communicates over a network, the IP address tells the network which device or interface should receive the traffic.
The port number provides another layer of identification by indicating which application or network service should handle that traffic.
For example, a server may use one IP address while simultaneously providing:
- a website,
- email services,
- remote administration,
- DNS,
- and other network applications.
Different ports allow these services to share the same IP address.
IP address vs port number
A useful way to think about the relationship is:
IP address = destination device
Port number = destination service
A network connection may therefore be described using an address and port together.
For example:
192.0.2.10:443
In this example:
- 192.0.2.10 is the IP address.
- 443 is the port number.
How many port numbers are there?
TCP and UDP port numbers are 16-bit values.
This provides a numerical range from:
0 to 65535
These ports are commonly divided into three broad ranges.
| Range | Port numbers | Typical use |
|---|---|---|
| Well-known ports | 0–1023 | Common standardized services |
| Registered ports | 1024–49151 | Applications and registered services |
| Dynamic / private ports | 49152–65535 | Temporary client-side connections and private use |
What are well-known ports?
Well-known ports are the lower-numbered ports traditionally associated with widely used network services.
Some common examples include:
| Port | Common service |
|---|---|
| 22 | SSH |
| 25 | SMTP |
| 53 | DNS |
| 80 | HTTP |
| 110 | POP3 |
| 143 | IMAP |
| 443 | HTTPS |
What is port 80?
Port 80 is commonly associated with HTTP, the protocol traditionally used for unencrypted web traffic.
A web server listening on port 80 can receive ordinary HTTP requests.
What is port 443?
Port 443 is commonly associated with HTTPS.
HTTPS protects web traffic using TLS encryption and is now the standard for secure websites.
When you visit a modern HTTPS website, your browser commonly connects to the server on port 443.
What is port 53?
Port 53 is commonly associated with DNS.
DNS can use both UDP and TCP depending on the type and size of the request or response.
What is port 22?
Port 22 is commonly used by SSH, or Secure Shell.
SSH is widely used for secure remote administration of servers and network systems.
What is TCP?
TCP stands for Transmission Control Protocol.
TCP is connection-oriented and is designed to provide reliable, ordered delivery of data between applications.
It is commonly used by services where reliable delivery is important, such as:
- web traffic,
- email,
- remote administration,
- and many application protocols.
What is UDP?
UDP stands for User Datagram Protocol.
UDP is connectionless and has less protocol overhead than TCP.
It is commonly used where speed, low latency, or simple request-response behavior is important.
Examples include:
- many DNS queries,
- real-time media,
- some online games,
- and other latency-sensitive applications.
TCP ports vs UDP ports
TCP and UDP have separate port spaces.
This means that TCP port 53 and UDP port 53 are technically separate endpoints, even though both may be associated with DNS.
A service can therefore listen on:
- a TCP port,
- a UDP port,
- or both.
What is a listening port?
A service that is waiting for incoming network connections is often described as listening on a port.
For example, a web server may listen for HTTPS connections on TCP port 443.
When a connection reaches that port, the operating system can direct the traffic to the application associated with it.
What does an open port mean?
An open port generally means that a network service is reachable and accepting traffic on that port.
However, the meaning of a port scan result depends on:
- the protocol being tested,
- firewall behavior,
- routing,
- NAT,
- and whether a service is actually listening.
What does a closed port mean?
A closed port usually means the destination can be reached, but no application is accepting connections on that port.
The exact network response depends on the transport protocol and system configuration.
What does a filtered port mean?
A port may appear filtered when a firewall or another network control prevents a scanner from determining whether the port is open or closed.
Instead of receiving a clear response, packets may simply be dropped.
Open vs closed vs filtered ports
| Status | General meaning |
|---|---|
| Open | A service appears to be accepting traffic |
| Closed | The host responds, but no service appears to be listening |
| Filtered | A firewall or network control may be blocking or dropping traffic |
Does an open port mean a device is insecure?
Not automatically.
Network services need open ports to communicate. A web server, for example, normally needs a reachable port to serve visitors.
The security risk depends on factors such as:
- which service is exposed,
- whether the service is necessary,
- whether the software is up to date,
- authentication strength,
- firewall rules,
- and whether the service contains vulnerabilities.
Why close unused ports?
A common security principle is to expose only the services that are actually required.
Unnecessary listening services can increase the attack surface of a system.
Administrators therefore often disable unused applications and restrict inbound traffic with firewall rules.
What is an ephemeral port?
When your device connects to an internet service, it commonly uses a temporary local port called an ephemeral port.
For example, your browser might connect from a temporary local port to:
server.example:443
This allows multiple simultaneous connections to be distinguished from one another.
What is a socket?
In networking, a socket is commonly associated with a combination of:
- IP address,
- transport protocol,
- and port number.
A TCP connection is identified more precisely using both the local and remote endpoint information.
Can two applications use the same port?
Usually, two applications cannot both independently listen on the exact same IP address, transport protocol, and port combination at the same time without special operating-system or application behavior.
If one service is already listening on TCP port 8080, another application may fail to bind to that same endpoint.
Can the same port number exist on different computers?
Yes.
Port numbers are local to an IP endpoint.
Millions of different web servers can all listen on port 443 because each server has a different network address.
Can the same port use TCP and UDP?
Yes.
TCP and UDP maintain separate port namespaces.
An application can use TCP port 53 while another process or the same service uses UDP port 53.
What is port forwarding?
Port forwarding is a router configuration that directs incoming traffic arriving on a particular external port to a device or service inside a private network.
For example:
Public Port → Router → Private Device and Port
Port forwarding is commonly used for:
- self-hosted services,
- remote access,
- game servers,
- and other applications requiring inbound connections.
Why might port forwarding not work?
Common reasons include:
- incorrect router configuration,
- the target device having the wrong private IP,
- a local firewall blocking the connection,
- the service not listening on the expected port,
- double NAT,
- or Carrier-Grade NAT.
How does CGNAT affect ports?
Carrier-Grade NAT allows an internet provider to share public IPv4 addresses among multiple customers.
If your connection is behind CGNAT, your router may not directly control the public IP address seen by the internet.
Traditional inbound port forwarding may therefore fail unless the provider offers another solution.
How do firewalls use port numbers?
Firewalls can allow or block traffic according to information such as:
- source IP,
- destination IP,
- transport protocol,
- source port,
- destination port,
- and connection state.
For example, a firewall might allow inbound TCP traffic on port 443 while blocking other unsolicited inbound connections.
Why can a service use a non-standard port?
Applications are not always required to use their commonly associated well-known ports.
A web server, for example, could be configured to listen on:
8080
instead of port 80.
In that case, the client must know which port to use.
Does changing a port make a service secure?
Changing a service from its default port may reduce some automated noise, but it should not be treated as a strong security measure by itself.
A service can still be discovered through scanning or other network analysis.
Proper security should rely on measures such as:
- strong authentication,
- updated software,
- firewall restrictions,
- encryption,
- and limiting unnecessary exposure.
How can I check whether a port is open?
You can check whether a TCP port is reachable using a trusted network diagnostic tool or a port-testing service.
Results can be affected by:
- firewalls,
- NAT,
- CGNAT,
- routing,
- server availability,
- and whether a service is actively listening.
Why can a port test give unexpected results?
A port test depends on several parts of the network path.
A result can be affected by:
- firewalls,
- NAT,
- CGNAT,
- router configuration,
- server availability,
- the protocol being tested,
- and temporary network conditions.
A failed test does not always mean the remote computer itself is offline.
Does every website use port 443?
Most modern HTTPS websites commonly use port 443, but web services can be configured on other ports.
When the standard port is used, browsers usually do not need it to be written explicitly in the URL.
A non-standard web port may appear explicitly, for example:
https://example.com:8443/
Ports and IPv4 vs IPv6
Port numbers are used with both IPv4 and IPv6.
TCP and UDP continue to provide port-based application identification whether the network layer is using IPv4 or IPv6.
Do ports belong to the router or the device?
Ports fundamentally belong to transport-layer endpoints on devices and applications.
Routers performing NAT can also translate port numbers as they map internal connections to public-facing connections.
This is why the ports seen on the public side of a NAT connection may differ from those used internally.
Port number example
Imagine your browser connects to a secure website.
The connection might conceptually look like:
Your Device:Temporary Port → Website Server:443
Your device selects a temporary source port, while the destination server listens on the well-known HTTPS port 443.
When the response returns, the operating system uses the connection information to deliver the traffic back to the correct browser session.
A port number identifies a network service or application using an IP address. TCP and UDP ports range from 0 to 65535, and familiar services such as HTTPS, DNS, and SSH commonly use standard port numbers. Open ports are necessary for network services, but only required services should normally be exposed.
Related IP & network guides
For the addressing foundation used alongside ports, read What Is an IP Address? .
To understand local and internet-facing addressing, see Public vs Private IP .
For name resolution and DNS port usage, read What Is DNS? .
To understand the public address being used by your connection, see How to Check Your Public IP .