Firewall Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=2818
Answer
Firewall troubleshooting finds whether a host firewall is dropping a flow, and which rule: check the service, the active tool, rule order and counters, then trace the packet.
Remember
Refused (RST) usually means no service or a REJECT rule; timeout means DROP or a network problem. Prove it with counters or a capture on the host. Temporarily stopping the firewall is a last-resort test, never a fix.
First checks
nft list ruleset— all nftables rulesiptables -S; iptables -t nat -S— iptables rules (if used)firewall-cmd --list-all— firewalld zone settingsufw status verbose— UFW rules and defaultsss -tulpn— which services listen
Commands
nftnft monitor tracenft list table ip natiptables -t nat -Sss -ltnpnft -a listtcpdump -ni eth0 port 443nft list ruleset -aiptables -L -v -n
Verify in this order
packet seen on the interface → hook and chain → matching rule identified → accept/drop decision → service response
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=2818