OPNexusdocs

Position in the rule list

Firewalls evaluate rules from top to bottom; the first match wins. OPNsense puts new rules at the end; a block rule behind a matching allow rule therefore never takes effect. In the rule form you choose the position for a new (not yet deployed) rule; for an already deployed rule the field does not appear, you change its position in the "Live across all hosts" view (see below):

  • At the end (default, the previous behaviour): behind all existing rules.
  • Very top: on deployment OPNexus moves the rule before the first rule of its priority group (OPNsense only knows "before rule X" for this). Rules from the policy hierarchy (pre-rules) stay above. The position is set on creation and when you change it, not on every deployment: a rule that you move later (see below) stays there.

A new block or reject rule suggests "Very top"; if it is set to "At the end", the form points this out. If only the position changes, this counts as a change in the preview (field "Position"). If the firewall rejects the move, OPNexus reports an error; the window for the automatic rollback stays armed. The rollback restores the content of the rule, not its position. In configuration as code the field is called placement (end or top).

Protocol "TCP/UDP": for services that need both (e.g. DNS on port 53), choose TCP/UDP in the protocol field. The option is always available in rules, port forwards, outbound NAT and hierarchy rules.