0

Looking at https://www.openbsd.org/faq/pf/shortcuts.html it's not clear to me if these are the same-

block quick from <bruteforce>

and-

block in quick from <bruteforce> to any
block out quick from any to <bruteforce>

similarly, I wonder if this is also equivalent-

block quick <bruteforce>

(My goal here is to block any access, in or out, from the IPs listed in the table.)

hotkarl
  • 165
  • 2
  • 10

2 Answers2

1

They are not. To be short, only two rules in the middle are valid, others are just a noise. from requires a pair of addresses and a to keyword, and the last rule is just a total nonense.

drookie
  • 8,625
  • 1
  • 19
  • 29
  • 2
    The first form is valid on openbsd - `from` & `to` are each optional (default to `any`) - the rule is interpreted as `block quick from to any`, which _is_ equivalent to the two middle rules together – pete Dec 17 '16 at 02:01
0

Although with Pf some keywords could be redundant and thus allowed to be omitted the last rule is a total no-go. You can refer to man pf.conf which has its syntax rules outlined with BNF-like grammar description.

poige
  • 9,448
  • 2
  • 25
  • 52