Pcornel
Linux · Linux Firewall

OUTPUT

Cheat sheet · https://pcornel.dk/topic.php?topic=2815

Back to the Topic

Answer

The OUTPUT chain filters packets the host itself sends. Most hosts allow all output; restricted servers allow only needed destinations (DNS, NTP, updates, specific services).

Remember

With a restrictive output policy remember DNS (53), NTP (123), package repositories and replies — and the loopback interface. Locally generated traffic does not pass INPUT or FORWARD.

First checks

  • nft list ruleset — all nftables rules
  • iptables -S; iptables -t nat -S — iptables rules (if used)
  • firewall-cmd --list-all — firewalld zone settings
  • ufw status verbose — UFW rules and defaults
  • ss -tulpn — which services listen

Verify in this order

local process sends → routing → output hook rules → postrouting → leaves the host

Where it usually breaks

First mismatch in link/interface → address/namespace → route/neighbor → firewall/policy → socket/daemon → DNS/TLS/SSH/application peer path; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2815

Confirmation

Confirm action

Continue?