NETWORKING / A CONCEPT NOTE

Firewalls

who gets in, who gets out

~60 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

A security barrier that inspects incoming and outgoing network traffic based on rules (IP, port, protocol). Statefulness lets it automatically allow return traffic for established sessions.

02 / FOLLOW THE MECHANISM

How firewall rule checking flows

  1. Connection request

    lands on the network interface card.

  2. Rules check

    firewall evaluates rules sequentially (IP, Port, Action).

  3. State tables

    if stateful, outbound packets update tables so return traffic passes without explicit rules.

  4. Drop/Allow

    matching packets are either accepted or silently dropped/rejected.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

list active Linux firewall rules

iptables -L -n -v

EXAMPLE 02 · REFERENCE

check Ubuntu firewall status

ufw status verbose

Explore command anatomy in the CLI lab