OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: funfuck1337 on February 20, 2024, 02:34:07 PM

Title: Policy based route FW rules without quick match, just would not match
Post by: funfuck1337 on February 20, 2024, 02:34:07 PM
I just set up dual WAN in my environment and tried to add gateway-specified rules without quick match.

PBR rules will never match if you have quick match unchecked.
Attached my rule setup:
dead img /

Everything works great if quick match is checked.

I have tried the same rule on every type of rule set (floating, interface group, interface).

I am wondering if it is my issue. Could anyone try or explain this symptom?
Or this is the limitation that quick match could not be disabled when gateway is specified in the rule.
Title: Re: Policy based route FW rules without quick match, just would not match
Post by: tiermutter on February 20, 2024, 02:49:59 PM
First match is fine there as it is for most other rules you need...
Having loads of rules on several interfaces, also doing PBR, there is only one last match rule I created myself.
Title: Re: Policy based route FW rules without quick match, just would not match
Post by: funfuck1337 on June 11, 2024, 05:14:41 PM
OK, finally i figure it out after a while.

Rule first match and last match really works like the name.

First match would just work like a normal rule. First-come-first-serve according to the rule order.

But with last match everything is inverted. I would match the non-quick rule after all first match rule.
And it would match the non-quick rule from the bottom to the top accordingly, instead of from top to bottom like quick match.

A lesson for me.