Skip to main content
>_ supraj.dev
TOPIC NETWORKING
Firewalls who gets in, who gets out
IN 10 SECONDS

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.

GOTCHA Stateless firewalls require rules in both directions. If you forget to allow outbound ephemeral ports, connections establish but receive no replies.
HOW FIREWALL RULE CHECKING FLOWS
01 Connection request lands on the network interface card.
02 Rules check firewall evaluates rules sequentially (IP, Port, Action).
03 State tables if stateful, outbound packets update tables so return traffic passes without explicit rules.
04 Drop/Allow matching packets are either accepted or silently dropped/rejected.
POKE IT YOURSELF
iptables -L -n -v — list active Linux firewall rules
ufw status verbose — check Ubuntu firewall status