From 3f83b22de26ac0ef2643a81827194b996c4d185c Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 16 Aug 2017 11:58:39 +0200 Subject: [PATCH] action.d/pf.conf: anchored call arguments combined as `` parameter; test cases fixed; --- config/action.d/pf.conf | 23 +++++++---- fail2ban/tests/servertestcase.py | 66 ++++++++++++++++---------------- 2 files changed, 48 insertions(+), 41 deletions(-) diff --git a/config/action.d/pf.conf b/config/action.d/pf.conf index 02fbcd8d..943f016a 100644 --- a/config/action.d/pf.conf +++ b/config/action.d/pf.conf @@ -15,8 +15,8 @@ # # we don't enable PF automatically; to enable run pfctl -e # or add `pf_enable="YES"` to /etc/rc.conf (tested on FreeBSD) -actionstart = echo "table <-> persist counters" | pfctl -a f2b/ -f- - echo "block proto from <-> to " | pfctl -a f2b/ -f- +actionstart = echo "table <-> persist counters" | -f- + echo "block proto from <-> to " | -f- # Option: start_on_demand - to start action on demand # Example: `action=pf[actionstart_on_demand=true]` @@ -27,16 +27,16 @@ actionstart_on_demand = false # Values: CMD # # we only disable PF rules we've installed prior -actionstop = pfctl -a f2b/ -sr 2>/dev/null | grep -v - | pfctl -a f2b/ -f- - pfctl -a f2b/ -t - -T flush - pfctl -a f2b/ -t - -T kill +actionstop = -sr 2>/dev/null | grep -v - | -f- + -t - -T flush + -t - -T kill # Option: actioncheck # Notes.: command executed once before each actionban command # Values: CMD # -actioncheck = pfctl -a f2b/ -sr | grep -q - +actioncheck = -sr | grep -q - # Option: actionban @@ -47,7 +47,7 @@ actioncheck = pfctl -a f2b/ -sr | grep -q - #