# Fail2Ban configuration file # # OpenBSD pf ban/unban # # Author: Nick Hilliard # Modified by: Alexander Koeppe making PF work seamless and with IPv4 and IPv6 # # [Definition] # Option: actionstart # Notes.: command executed once at the start of Fail2Ban. # Values: CMD # # 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 -f- echo "block proto from <-> to " | pfctl -f- # Option: actionstop # Notes.: command executed once at the end of Fail2Ban # Values: CMD # # we only disable PF rules we've installed prior actionstop = pfctl -sr 2>/dev/null | grep -v - | pfctl -f- pfctl -t - -T flush pfctl -t - -T kill # Option: actioncheck # Notes.: command executed once before each actionban command # Values: CMD # actioncheck = pfctl -sr | grep -q - # Option: actionban # Notes.: command executed when banning an IP. Take care that the # command is executed with Fail2Ban user rights. # Tags: IP address # number of failures #