GRC Careers

HomeResourcesPorts & Protocols

CS-042 · Network

Ports & Protocols

How a single IP address serves many services, and the port numbers that make it possible.

Executive Summary

Ports are numbered endpoints that let a single device run many network services at once, with each service reachable at a specific port. Protocols define the rules those services use to talk. Knowing the common port numbers and the protocols behind them is fundamental to configuring, defending, and troubleshooting networks.

What It Is

A port is a 16-bit number that identifies a specific service or process on a networked device, working alongside the IP address that identifies the device itself. If an IP address is like a building's street address, a port is like a numbered door to a particular office inside it. Ports are grouped into ranges: the well-known ports from 0 to 1023 are assigned to standard services, the registered ports from 1024 to 49151 are used by many applications, and the dynamic or ephemeral ports from 49152 to 65535 are assigned temporarily for outbound connections. A protocol is the agreed set of rules a service follows, and most services pair a protocol with a default port so that clients know where to connect.

Why It Matters

Ports and protocols are where network security becomes concrete. Firewalls decide what to allow or block largely by port and protocol, scanners map an organization's exposure by finding open ports, and attackers probe those same ports to find a way in. Every open port is a potential entrance, so knowing which services should be running and on which ports is essential to reducing attack surface. Confusing a secure protocol with its insecure predecessor, for example allowing plain FTP or Telnet, can quietly undermine an otherwise strong network. For professionals, memorizing common ports is a baseline expectation in interviews and daily operations.

How It Works

When a client connects to a service, it targets the server's IP address and a destination port, while the operating system assigns the client a temporary source port for the reply. The combination of source IP, source port, destination IP, and destination port uniquely identifies the connection. Services listen on their assigned ports: a web server listens on 80 for HTTP and 443 for HTTPS, a mail server listens on ports for SMTP, and so on. Some protocols run over TCP for reliability, some over UDP for speed, and a few use both. Administrators can change default ports, but standard assignments keep the internet interoperable and are coordinated by the Internet Assigned Numbers Authority.

Architecture Diagram

HTTP: port 80 (TCP)
HTTPS: port 443 (TCP)
SSH: port 22 (TCP)
DNS: port 53 (UDP and TCP)
SMTP: port 25 (TCP)
RDP: port 3389 (TCP)
A sample of common services with their default ports and transport protocols. Secure variants are preferred over their plaintext predecessors.

Visual Workflow

A client chooses the service it needs and the protocol that service uses.It connects to the server's IP address at the protocol's destination port.The operating system assigns a temporary source port for the return traffic.The server, listening on that port, accepts the connection and responds.The four-part tuple of source and destination IP and port uniquely tracks the session.

Common Attacks

Common Mistakes

Best Practices

Quick Checklist

Recommended Tools

Port scanner
Discovers open TCP and UDP ports and the services behind them
netstat or ss
Lists local listening ports and active connections
Firewall management console
Controls which ports and protocols are allowed or blocked
Service banner grabber
Identifies the software and version listening on a port

Industry Standards

IANA Service Name and Port Number Registry
Authoritative list of assigned port numbers
RFC 6335
Governs the procedures for port number assignment
CIS Benchmarks
Recommend disabling unneeded services and ports per platform

Career Relevance

Knowing ports and protocols cold is expected of network security engineers, SOC analysts, security engineers, and cloud security engineers. Analysts triage alerts by the ports and protocols involved, engineers write firewall and segmentation rules around them, and penetration testers map exposure by scanning them. It is one of the most frequently tested fundamentals in the interviews for roles that AI-Governance-Jobs.com serves.

Interview Questions

Related Certifications

CompTIA Network+ CompTIA Security+ Cisco CCNA

Further Reading

Key Takeaways

Download PDFDownload PNG

FAQ

What is the difference between a port and a protocol?

A protocol is the set of rules a service uses to communicate, such as HTTPS or SSH. A port is the numbered endpoint on a device where that service listens. Protocols usually have a default port, for example HTTPS on 443, but the two ideas are distinct.

Does changing a service to a nonstandard port make it secure?

Not meaningfully. Moving a service off its default port can reduce automated noise, but attackers routinely scan all ports. Real security comes from patching, strong authentication, encryption, and restricting access, not from hiding the port.

Why do some protocols use both TCP and UDP?

Some services need both. DNS uses UDP for fast, small lookups and switches to TCP for larger responses and zone transfers. The choice depends on whether speed or reliable delivery of larger data matters more for that exchange.

Get all 116 reference sheets
The complete AGJ Cybersecurity Professional Reference Library, print-ready PDFs and PNGs.
Browse the library

Related Careers

Related certifications

CompTIA Network+CompTIA Security+Cisco CCNA

Current openings

Live openings appear on the web version. Browse the job board for current GRC and security roles.
Browse all jobs

Suggested learning path

  1. Ground the basics with CS-001 Cybersecurity
  2. Study this sheet: Ports & Protocols
  3. Go deeper: TCP/IP
  4. Go deeper: Firewalls
  5. Validate it: work toward CompTIA Network+
  6. Find the role: browse current openings

Related sheets

More in Network

Share this LinkedIn Facebook X Email