Course contentsShow
← Security
Lesson 338 of 3,0528. Network Security - ReconnaissanceFree lesson

Port Scanning Fundamentals

Core concepts of port scanning including open, closed, and filtered states and what they reveal about targets.

Port Scanning Fundamentals

What you'll learn: How port scanning reveals which network services are accessible on a target system and what different port states mean for security assessment.

What Is Port Scanning?

Port scanning is the active reconnaissance technique of systematically probing a target system's network ports to determine which ones are accepting connections. Think of ports like doors on a building—a port scan checks each door to see if it's open (accepting visitors), closed (locked but acknowledging you tried), or filtered (a security guard blocking you before you even reach the door).

The Three Port States

When you scan a port, it will be in one of three states:

Open

The port is actively accepting connections. A service (like a web server on port 80 or SSH on port 22) is listening and responds to your probe. This reveals running services that could be entry points or attack surfaces.

Closed

The port is accessible, but no service is listening. The target system responds with a "nobody home" message (typically a TCP RST packet). This confirms the host is alive and reachable, but this specific service isn't running.

Filtered

Your probe is blocked—usually by a firewall, router, or security device. You receive no response or an ICMP error message. This reveals security controls are in place, but doesn't tell you if a service exists behind the filter.

What Port States Reveal

Port scanning results create a service fingerprint of your target. Open ports identify potential attack vectors. Closed ports confirm host reachability. Filtered ports reveal defensive measures. Together, they map the target's network attack surface and help prioritize further investigation.

Key Takeaway: Port scanning maps a target's network attack surface by testing which ports are open (running services), closed (reachable but unused), or filtered (blocked by security controls)—each state reveals critical information for security assessment.