Introduction
FireHawk is a self-hosted web application for managing the firewalls of many Linux hosts from one place. It connects to each host over SSH only: nothing is installed on the managed hosts, there is no agent and no daemon. You describe the rules you want, FireHawk computes the exact commands for the host’s firewall, shows them to you, and applies them with a snapshot you can roll back to.
FireHawk runs as a set of containers (API, background workers, web UI and PostgreSQL) with Docker Compose or on Kubernetes with a Helm chart.
How it works
Section titled “How it works”- Connect. You add a host with its address, SSH port and credentials (a key, a password or a stored credential, optionally through jump hosts). FireHawk logs in as root or escalates with
sudoordoas, and pins the host’s SSH key on the first connection. - Detect. FireHawk inspects the host: operating system, init system, privilege escalation, available firewall tools, and whether
ipsetis installed. It then detects which firewall backend is active: iptables, nftables, ufw or firewalld. - Describe the desired state. Instead of writing shell scripts, you edit desired rules: chain or direction, protocol, source and destination (addresses, networks or aliases), ports, interfaces, connection state, action and comment. You can also import what is configured on the host today.
- Preview. Before anything changes, the preview shows the rule-level differences against the last deployed version, warns about manual changes the deploy would undo, and lists the exact shell commands.
- Snapshot and apply. Every deploy first takes a full snapshot of the host’s firewall. With safe deploy (on by default), FireHawk leaves a restore script and a timer on the host and must reconnect over a new SSH connection afterwards. If the new rules lock FireHawk out, the host restores its previous rules by itself.
- Persist. After a successful apply (and after a rollback), the live ruleset is saved as the host’s boot configuration using the distribution’s own tooling (netfilter-persistent, OpenRC services, iptables-services,
nftables.service, ufw, firewalld). Hosts come back with the same rules after a reboot. - Watch for drift. FireHawk records the managed part of the live firewall after each deploy and re-checks it on a schedule. Hand-made changes mark the host as drifted; edits that were not deployed yet show as undeployed changes.
Every step is recorded in the audit log, and every successful deploy is stored as a version you can compare and restore.
Supported backends and distributions
Section titled “Supported backends and distributions”| Backend | Notes |
|---|---|
| iptables | Managed-chain or full mode, IPv4 and (full mode) IPv6 via ip6tables, aliases as ipsets when ipset is installed, NAT |
| nftables | Managed-chain or full mode, native nftables tables, sets and maps, aliases as named sets, NAT |
| ufw | Rules in ufw’s own syntax, no NAT, no connection-state matches |
| firewalld | Rich rules in the default zone, port forwarding and masquerading, no connection-state matches |
Native boot persistence is supported on Debian and Ubuntu, Alpine, RHEL-family distributions (RHEL, Rocky, Alma, Fedora) and openSUSE / SLES (nftables and firewalld). See Backends and persistence for the full matrix.
Key concepts
Section titled “Key concepts”| Term | Meaning |
|---|---|
| Host | A Linux machine FireHawk manages over SSH. Each host has one detected firewall backend, its own desired rules, deployments, snapshots, versions and drift status. See Hosts. |
| Desired rules | The rules you want on a host. They only reach the host when you deploy. See Rules and Deploy. |
| Managed-chain mode | FireHawk renders its rules into its own chains (iptables FIREHAWK, FIREHAWK_OUTPUT, FIREHAWK_FORWARD; nftables table inet firehawk), jumped to from the base chains, and leaves the rest of the host’s ruleset alone. Hosts added before full mode existed use this mode. |
| Full mode | For iptables and nftables, FireHawk owns the host’s whole ruleset: every table, builtin chain policy, custom chain and rule. Rules of other software (Docker, Kubernetes, fail2ban and so on) are matched by patterns and left untouched. New hosts start in full mode. See Full mode. |
| Alias | A named list of addresses and networks (or ports), such as LAN or OFFICE, used in rules instead of literal values. Aliases can include other aliases. Dynamic aliases fill themselves from URL feeds, DNS names, GeoIP countries or cloud provider ranges. See Aliases and Dynamic aliases. |
| Policy | Backend-neutral rules written once for all hosts, host groups or host tags and placed before (top) or after (bottom) each host’s own rules. See Policies. |
| Template | A reusable rule set for one backend that can be applied to hosts and host groups, exported and imported. See Templates. |
| Host group | A set of hosts (one group per host) used for organization, access grants, jump hosts, policies and group deploys. See Host groups. |
| Rollout | A server-side deploy of many hosts in batches, with a canary first and a failure limit, run by the background workers. See Rollouts. |
| Workspace | An isolated tenant inside one FireHawk installation, with its own hosts, aliases, policies, credentials, access rules and audit log. See Workspaces. |
Next steps
Section titled “Next steps”- Quickstart: run FireHawk and deploy to a first host in a few minutes.
- Requirements: what the server and the managed hosts need.
- Install with Docker Compose or on Kubernetes.
