Hierarchical policies
Policy › Policy hierarchy is a group tree with pre and post rulebases. A rule attached to a parent group is automatically rolled out to all hosts of the group and its subgroups, in the correct order:
- Pre rules: the top group first. An organisation-wide pre rule wins over anything more specific.
- Post rules: the most specific group first, close to the host-local default deny.
A host belongs to at most one hierarchy group (set in the host form). Aliases and all NAT kinds can likewise target a subtree, but deliberately have no pre/post. The order is changed by drag and drop or with the arrows. Restore order then brings already deployed rules onto the firewall; after normal rule, alias and NAT deploys this happens automatically. OPNexus rejects cycles in the tree and the deletion of referenced groups.
If sorting fails after a successful push, the deployment shows error instead of "open": a rule that is live but sorted wrongly is wrong in a security-relevant way, not just unconfirmed. OPNsense does not move legacy and automatic rules, and OPNexus does not touch them.