Layered policies
A policy is a set of backend-neutral rules applied to many hosts: SSH only from the admin network, monitoring access, a threat feed block list, a final deny. FireHawk places policy rules around each host’s own rules: top policies before them, bottom policies after them.
Policies are never copied into hosts. They are added at deploy time, so editing a policy changes every affected host on its next deploy.
Creating and editing policies needs the policies.manage permission.

Order on each host
Section titled “Order on each host”top policies: all hosts → host group → host tagsthe host's own rulesbottom policies: host tags → host group → all hostsAll-hosts policies are outermost, then groups, then tags. Within a layer, lower Priority comes first, then the name.
Create a policy
Section titled “Create a policy”-
Open Policies and click New policy.
-
Fill in:
Field Notes Name Letters, digits, .,_,-; for examplessh-from-admin.Placement Top: before the host’s rules or Bottom: after the host’s rules. Priority (lower first) 0 to 10000. Description Enabled Disabled policies are not deployed. Applies to All hosts, or host groups and/or Host tags (comma separated) such as prod, web. -
Add rules:
Field Values Direction Inbound, Outbound, Forwarded Action accept, drop, reject Protocol tcp, udp, icmp, icmpv6 or any Source, Destination address, CIDR or alias Source port, Destination port ports or port aliases In interface, Out interface enabled by direction (outbound rules see outgoing traffic only, and so on) State connection state Lifetime permanent or temporary -
Click Create policy.
How policies are placed per backend
Section titled “How policies are placed per backend”Policy rules are written into each backend’s base chains, by direction:
| Backend | Inbound | Outbound | Forwarded |
|---|---|---|---|
| iptables, managed-chain mode | INPUT |
OUTPUT |
FORWARD |
| iptables, full mode | INPUT of the filter table (and filter (IPv6) when IPv6 is managed) |
OUTPUT |
FORWARD |
| nftables | input |
output |
forward |
| ufw | IN |
OUT |
ROUTED |
| firewalld | default zone | skipped | skipped |
- On full-mode iptables hosts a rule that can only match one IP version (literal addresses,
icmporicmpv6) is only copied into that family’s table. - On full-mode nftables hosts rules go to the filter base chain of the matching hook in
inet firehawk, else the firstinettable, elseip/ip6. A host without a matching base chain skips them. - ufw and firewalld cannot match connection state: policy rules with a state are skipped there.
Skipped rules appear as warnings in the host’s deploy preview and in its inherited policies.
On the host
Section titled “On the host”The host’s Desired tab shows Inherited policies: the number of rules before and after the host’s rules, any warnings, and the policies in Before this host’s rules (top), After this host’s rules (bottom) and Excluded on this host.
Exclude a host from a policy
Section titled “Exclude a host from a policy”A host can opt out of a single policy: click Exclude on this host and enter a reason, which is recorded in the audit log. The policy’s rules leave this host on its next deploy. Include again reverses it. Exclusions need the policies.manage permission.
Deploy policy changes
Section titled “Deploy policy changes”The policy list shows how many hosts each policy applies to and which have changes (to deploy). To deploy them:
- click Roll out on the policy card to start a rollout of its hosts; or
- deploy the hosts one by one or per group.
Deleting a policy removes its rules from its hosts on their next deploy.
Reserved comment prefix
Section titled “Reserved comment prefix”Policy rules carry the comment policy:<name> … on the host. When FireHawk reads rules from a host (Load from host, takeover, templates from live rules) it skips rules whose comment starts with policy:. Never use that prefix in a host rule’s comment.
