Full management mode
In full mode FireHawk manages the whole ruleset of an iptables or nftables host, not only its own chains: every table, builtin chain policy, custom chain and rule, with any match or target. Chains and tables that belong to other software (Docker, Kubernetes, fail2ban, …) are recognised and left untouched.
| Backend | What FireHawk owns in full mode |
|---|---|
| iptables | the raw, mangle, nat, filter and security tables: builtin chain policies, custom chains, rules with any match or target, goto; optionally the IPv6 tables (see IPv6) |
| nftables | every native table: sets, maps and other objects, base chains (type, hook, priority, device, policy), regular chains, rules as structured fields or nft text |
New iptables and nftables hosts start in full mode. ufw and firewalld hosts always use managed-chain mode.
Take over all rules
Section titled “Take over all rules”An iptables or nftables host in managed-chain mode shows a banner in its Desired tab: FireHawk only manages its own chains (or the inet firehawk table) there.
- Click Take over all rules.
- FireHawk reads the host and shows what it found, what belongs to other software (kept, read-only), rules that could not be imported, and the Changes to the desired rules.
- Click Take over all rules in the dialog.
What happens:
- The host’s current rules become the desired rules, so nothing changes on the host until you edit and deploy.
- Your existing FireHawk rules move into their real chains; FireHawk’s own chains are no longer needed.
- The NAT section is replaced by the
natchains themselves. - Chains, rules and tables of other software stay untouched and are shown read-only.
An iptables host still using FireHawk’s old single-chain layout must be deployed once before it can be taken over.
A full-mode host without desired rules refuses to deploy. Its Desired tab offers Load current rules from host; later, Reload from host reads the host again (with the same preview).
The full-mode editor
Section titled “The full-mode editor”The Desired tab shows one tab per table (IPv6 tables after a separator, labelled filter (IPv6) and so on) and a section per chain.
-
Policies: each builtin chain (iptables) or base chain (nftables) has a policy selector in its section header.
-
Chains: Add chain creates a custom chain. On nftables, tick base chain (hook) to set type (
filter,nat,route), hook, priority, policy and, foringress/egress, device. Delete chain refuses a chain that is still jumped to. -
Tables (nftables): + Add table and Delete table. Sets, maps and other objects holds the table’s objects in nft syntax, saved with Save objects:
set blocked {type ipv4_addrflags intervalelements = { 192.0.2.0/24 }} -
Rules: ↑↓ move a rule within its own chain; Edit, Del and the On checkbox work as in managed-chain mode.
Chains of other software appear greyed (managed by other software, left untouched), and their rules in builtin chains are listed as (other software, kept first).
Rule fields
Section titled “Rule fields”| Field | Notes |
|---|---|
| Proto | tcp, udp, icmp, icmpv6, all, or any protocol name; empty means any. |
| Source (IP/CIDR/alias), Destination | Addresses, networks or alias names. |
| Dest ports, Source ports | 22, 80,443, ranges. |
| In interface, Out interface | |
| Comment | |
| Connection state | Rendered as -m conntrack --ctstate (iptables) or ct state (nftables). |
| Extra matches | Any other match, written in the backend’s syntax: -m limit --limit 10/second (iptables) or limit rate 10/second (nftables). |
| Action / jump | A target or verdict, jump or goto a chain of the table, (no target), or other… for any target name. |
| Target options | Arguments of the target, for example --to-destination 10.0.0.5:22 or --log-prefix "x: ". |
| Lifetime | Permanent or temporary. |
On nftables, tick Write the rule as nft text to enter a rule in nft syntax without add rule …, for example ct state established,related accept. Rules FireHawk cannot split into fields are imported this way.
Other software
Section titled “Other software”FireHawk never imports, changes or deletes chains, rules and tables matching the host’s other software patterns. Click Other software… to edit them, one per line:
| Pattern | Matches |
|---|---|
chain:GLOB |
chains by name, for example chain:DOCKER* |
iface:GLOB |
rules using that interface, for example iface:docker* |
table:GLOB |
nftables tables, for example table:f2b-* |
The defaults cover Docker, Kubernetes, fail2ban, libvirt, Cilium, Calico, Flannel, CNI, Tailscale, ufw chains, Incus and LXD:
chain:DOCKER* chain:KUBE-* chain:f2b-* chain:fail2ban-* chain:LIBVIRT_*chain:CILIUM_* chain:cali-* chain:FLANNEL* chain:ts-* chain:CNI-*chain:ufw-* chain:ufw6-*iface:docker* iface:br-* iface:veth* iface:cni* iface:flannel* iface:cali*iface:virbr* iface:tailscale* iface:cilium*table:f2b-* table:docker* table:kube* table:cilium* table:firewalldtable:libvirt* table:tailscale* table:incus* table:lxd*Reset to defaults restores this list. Tables managed by iptables-nft (as Docker creates on nftables systems) are always skipped.
On deploy, other software’s chains are never declared, flushed or deleted, and its rules in builtin chains are re-added first, from the live state read at preview time.
How a full-mode deploy works
Section titled “How a full-mode deploy works”- FireHawk renders the whole ruleset into one document: an
iptables-restore --noflushfile, or onenft -ftransaction. - It uploads the file and checks it on the host first (
iptables-restore --test,nft -c). A file the host rejects is never applied. - It applies it in a single atomic step, so the order of rules and policies cannot lock the host out halfway.
Builtin chains are flushed and refilled, desired custom chains are declared, and obsolete chains (or nftables tables) that do not belong to other software are deleted.
SSH guard
Section titled “SSH guard”When a chain’s policy is DROP, the editor notes that FireHawk adds an SSH guard for the host’s SSH port at the top of the chain:
- INPUT /
input: accept the SSH port as destination port; - OUTPUT /
output: accept it as source port.
Rollback, snapshots, drift detection and history work as for other hosts. Drift compares the whole ruleset minus other software. Versions cannot be restored across modes.
