Security Operations

A firewall allows or denies traffic based only on TCP and UDP port numbers. At which layer does it operate?

Show the answer

Correct answerC. Layer 4

AWhy not this: Layer 7 firewalls inspect application content, not just port numbers.

BWhy not this: The session layer manages sessions between applications and is not what port filters match on.

CWhy this is right: Ports are transport layer information, so port-based filtering is Layer 4 filtering.

DWhy not this: Layer 2 deals with MAC addresses and frames, not TCP or UDP ports.

TCP and UDP ports belong to the transport layer, Layer 4. A Layer 7 firewall would inspect application content such as HTTP requests, which this firewall does not.