The correct order of the rules in the firewall.

I have long been tormented by the question, how do you all still correctly write rules in firewall? how best to do it?

in “Faerwall - Filter Rules”, such as:

  1. 10 rules packet mark, and then 1 rules “block” (“allow”) for this “packet mark”
    or
  2. at once - 10 rules “block” (“allow”)


    PS: may be the first option will load the processor more than a second?

Thanks.

Not sure I understand the question, but the order is top down. Top rules run first. You want your accept rules at the top to accept whatever traffic you want and the drop rules below.

A list of if/then rules should run faster than a list of if/mark because you have to execute all the mark rules before you start
processing them.
Putting rules most likely to be seen first will cut down on the processing time.