diff options
| author | Daniel Black <grooverdan@users.sourceforge.net> | 2013-04-16 21:11:06 +1000 |
|---|---|---|
| committer | Daniel Black <grooverdan@users.sourceforge.net> | 2013-05-03 16:34:54 +1000 |
| commit | 0c5a9c53e1542784b7c1ab2d41463aa464f54104 (patch) | |
| tree | 59d54f4183eb1db2c5979f80330038b99f4b5a43 /config/action.d/pf.conf | |
| parent | 617fe6cb02d387c9eabe22267794c4eb7b3147f9 (diff) | |
| download | fail2ban-0c5a9c53e1542784b7c1ab2d41463aa464f54104.tar.gz | |
ENH: pf action thanks to Nick Hilliard <nick@foobar.org>.
Diffstat (limited to 'config/action.d/pf.conf')
| -rw-r--r-- | config/action.d/pf.conf | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/config/action.d/pf.conf b/config/action.d/pf.conf new file mode 100644 index 00000000..d82cbb12 --- /dev/null +++ b/config/action.d/pf.conf @@ -0,0 +1,62 @@ +# Fail2Ban configuration file +# +# OpenBSD pf ban/unban +# +# Author: Nick Hilliard <nick@foobar.org> +# +# + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +# we don't enable PF automatically, as it will be enabled elsewhere +actionstart = + + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +# we don't disable PF automatically either +actionstop = + + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = + + +# Option: actionban +# Notes.: command executed when banning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: <ip> IP address +# <failures> number of failures +# <time> unix timestamp of the ban time +# Values: CMD +# +actionban = /sbin/pfctl -t <tablename> -T add <ip>/32 + + +# Option: actionunban +# Notes.: command executed when unbanning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: <ip> IP address +# <failures> number of failures +# <time> unix timestamp of the ban time +# Values: CMD +# +# note -r option used to remove matching rule +actionunban = /sbin/pfctl -t <tablename> -T delete <ip>/32 + +[Init] +# Option: tablename +# Notes.: The pf table name. +# Values: [ STRING ] Default: fail2ban +# +tablename = fail2ban + |
