Pcornel
Linux · Linux Firewall

firewalld

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

Back to the Topic

Answer

firewalld manages the firewall on RHEL-family systems with zones (trust levels) bound to interfaces or sources, services and ports per zone, and a runtime vs permanent configuration.

Remember

Changes without --permanent are lost at reload; changes with it need --reload. Check which zone an interface or source is in — a rule in the wrong zone does nothing. Rich rules allow source-specific rules.

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

interface/source mapped to a zone → zone services/ports/rich rules → nftables rules → packet allowed or rejected

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=2813

Confirmation

Confirm action

Continue?