Setting multiple aliases as "Destination" and ticking "Invert destination" within a firewall rule declaration currently triggers error:
I am a bit buffled, what is meant by "mis-interpretations" - isn't this the application of De Morgan's laws?
Let's say, two firewall aliases A and B exist, each with couple of IPs. Then setting A and B in "Destination" creates the union of those two aliases A ∨ B ("match, if destination is in any of those aliases"). Additionally enabling "Invert destination" should lead to ¬ ( A ∨ B ) = ¬ A ∧ ¬ B ("match, if destination neither is in A nor in B").
I am not asking from a theoretical or academical standpoint, but would really like to express:
Especially with regards to point 3, if splitting up into
I definitely agree, these logic expressions sometimes can get confusing. So it might be worth to add a help message for "Invert destination":
Btw: https://forum.opnsense.org/index.php?topic=51467.msg263889#msg263889 is a bit similar, at least error message. But my issue does not have to do anything with migration. Above error already appeared with the old firewall rules format.
Happy to read any feedback.
QuoteInverting destinations is only allowed for single targets to avoid mis-interpretations
I am a bit buffled, what is meant by "mis-interpretations" - isn't this the application of De Morgan's laws?
Let's say, two firewall aliases A and B exist, each with couple of IPs. Then setting A and B in "Destination" creates the union of those two aliases A ∨ B ("match, if destination is in any of those aliases"). Additionally enabling "Invert destination" should lead to ¬ ( A ∨ B ) = ¬ A ∧ ¬ B ("match, if destination neither is in A nor in B").
I am not asking from a theoretical or academical standpoint, but would really like to express:
- If destination does not match any of the hosts in those aliases, block connection => block rule.
- Fail fast => quick/first match rule is to be used.
- Keep firewall rules strict.
Especially with regards to point 3, if splitting up into
- a pass rule for A ∨ B
- followed by blocking rule for non-matching hosts
I definitely agree, these logic expressions sometimes can get confusing. So it might be worth to add a help message for "Invert destination":
QuoteWithout inversion, the union of destinations is matched = "match if any destination A OR B matches".
With inversion, selected destinations A and B are processed as follows: ¬ ( A ∨ B ) = ¬ A ∧ ¬ B = "match, if destination neither is in A nor in B"
Btw: https://forum.opnsense.org/index.php?topic=51467.msg263889#msg263889 is a bit similar, at least error message. But my issue does not have to do anything with migration. Above error already appeared with the old firewall rules format.
Happy to read any feedback.
"