Technology · Germany · informational

What Is a Port Number? Network Addresses for Services Explained

A port number is a numeric identifier (0–65535) used in TCP and UDP networking to direct incoming data to the correct application or service on a computer already identified by an IP address. If an IP address is like a building's street address, a port is like an apartment or office number — many services share one host without mixing up their traffic. When your browser loads a website, it connects to the server's IP on port 443 (HTTPS); SSH remote login typically uses port 22.

Port numbers enable multiplexing — one server running web, email, and DNS simultaneously, each listening on different ports. Firewalls often allow or block traffic by port (among other rules), making ports central to security configuration and troubleshooting "connection refused" errors.

What It Is

Network conversations use sockets: IP address + port + protocol (TCP/UDP).

Example: 203.0.113.10:443 — host 203.0.113.10, port 443, usually HTTPS.

Client vs. server ports

  • Server listens on well-known ports (0–1023 historically privileged) — e.g., 80 HTTP, 53 DNS
  • Client chooses ephemeral high ports (often 49152–65535 range varies by OS) for outbound connections — return traffic routes correctly via NAT connection tracking

A single web page load opens many simultaneous connections — HTML on 443, images on 443, maybe WebSocket on 443 — each client-side ephemeral port unique.

TCP vs. UDP ports

Both protocols have separate port spacesTCP port 53 and UDP port 53 both used for DNS with different semantics.

TCP — reliable, ordered (web, SSH, email). UDP — lightweight, loss-tolerant (DNS queries, video streaming, gaming).

Port Number Ranges (IANA conventions)

| Range | Name | Typical use |

|-------|------|-------------|

| 0–1023 | Well-known | System services — HTTP, SSH, FTP |

| 1024–49151 | Registered | Vendor-registered apps — 3306 MySQL, 5432 PostgreSQL |

| 49152–65535 | Dynamic/private | Ephemeral client ports |

Port 0 is reserved; port numbers are not globally unique across the internet alone — they matter per IP host.

Common Port Examples

| Port | Protocol | Service |

|------|----------|---------|

| 20/21 | TCP | FTP data/control |

| 22 | TCP | SSH secure shell |

| 25 | TCP | SMTP email (often blocked outbound on residential ISPs) |

| 53 | UDP/TCP | DNS |

| 80 | TCP | HTTP (unencrypted web) |

| 443 | TCP | HTTPS (TLS web) |

| 3306 | TCP | MySQL database |

| 3389 | TCP | RDP remote desktop (Windows) |

HTTPS everywhere means much public web traffic concentrates on 443 — but APIs, games, and IoT use thousands of other ports.

How Ports Appear in Daily Tech

Web browsing

Browser connects server IP:443; TLS Server Name Indication (SNI) selects correct certificate when many sites share one IP — ports alone do not route virtual hosts on shared hosting (HTTP Host header / SNI handle that).

Home routers and NAT

Your laptop's private IP (192.168.x.x) shares one public IP via NAT. Outbound connections map internal ephemeral port to public ephemeral port — return packets find the right device.

Port forwarding

Expose internal server (security camera, game server) by forwarding public port 8080 to internal 192.168.1.50:80 — misconfiguration risks exposing services to internet scans.

Firewalls

Allow 22 from office IP only; block 3389 from world — port-based rules are coarse but common first layer.

Port Scanning and Security

Attackers scan IP ranges for open ports — SSH, RDP, databases — seeking default passwords or vulnerabilities. Defenders close unused ports, patch services, use VPNs instead of public RDP, and deploy intrusion detection.

Security through obscurity — moving SSH to port 2222 — adds minimal protection; keys and firewalls matter more.

Common Misconceptions

"Port number and IP address are the same thing"

IP identifies host. Port identifies service on host. Both required for TCP/UDP delivery.

"HTTPS always means port 443"

Default yes, but URLs can specify https://example.com:8443 — non-standard ports used in dev environments or locked-down networks.

"Closing port 443 blocks all web tracking"

Tracking uses HTTP within open 443 — blocking port stops service, not cookies inside allowed traffic.

"More open ports always mean better performance"

Open ports are attack surface — expose only needed services.

"UDP ports are less important"

DNS, QUIC (HTTP/3), VoIP rely on UDP — blocking UDP 53 breaks name resolution.

"I need to forward ports for all home devices"

Most home users need no forwarding for browsing — only for self-hosted servers or specific games — enable deliberately.

FAQ

How do I check open ports on my computer? OS tools: netstat, ss, Resource Monitor (Windows), lsof (macOS/Linux) — show listening services.

Why "connection refused"? Nothing listening on that port, or firewall DROP/REJECT — distinguish with traceroute and logs.

Can two apps use the same port? Not simultaneously on same IP for same protocol — one listener per port. Different IPs or protocols (TCP vs UDP) can share number.

What is a socket vs. port? Socket is the programming endpoint (IP + port + protocol); port is one component.

Are port numbers secret? No — well-known ports are public knowledge. Security comes from authentication, encryption, patching — not hiding port 22.

The Takeaway

A port number identifies which application or service on a host should receive TCP or UDP traffic, paired with an IP address to form a network socket. 443, 80, 22, and 53 are familiar examples shaping web, remote access, and DNS. Understanding ports clarifies firewall rules, NAT forwarding, and connection troubleshooting on servers and home networks.

---

*This article is general technology education for informational purposes.*

What Is a Port Number - Network Service Addresses Explained | All Over The World