mirror of https://github.com/fail2ban/fail2ban
#1689: Make lowest rule number in action.d/bsd-ipfw.conf configurable
parent
fe76cd9b7d
commit
861ce4177c
|
@ -22,6 +22,9 @@ releases.
|
||||||
(0.10th resp. IPv6 relevant only, amend for gh-1479)
|
(0.10th resp. IPv6 relevant only, amend for gh-1479)
|
||||||
* config/pathes-freebsd.conf
|
* config/pathes-freebsd.conf
|
||||||
- Fixed filenames for apache and nginx log files (gh-1667)
|
- Fixed filenames for apache and nginx log files (gh-1667)
|
||||||
|
* action.d/bsd-ipfw.conf
|
||||||
|
- Make the rule number, the action starts looking for a free slot to insert
|
||||||
|
the new rule, configurable (gh-1689)
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
* New Actions:
|
* New Actions:
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = ipfw show | fgrep -q 'table(<table>)' || ( ipfw show | awk 'BEGIN { b = 1 } { if ($1 <= b) { b = $1 + 1 } else { e = b } } END { if (e) exit e <br> else exit b }'; num=$?; ipfw -q add $num <blocktype> <block> from table\(<table>\) to me <port>; echo $num > "<startstatefile>" )
|
actionstart = ipfw show | fgrep -q 'table(<table>)' || ( ipfw show | awk 'BEGIN { b = <lowest_rule_num> } { if ($1 < b) {} else if ($1 == b) { b = $1 + 1 } else { e = b } } END { if (e) exit e <br> else exit b }'; num=$?; ipfw -q add $num <blocktype> <block> from table\(<table>\) to me <port>; echo $num > "<startstatefile>" )
|
||||||
|
|
||||||
|
|
||||||
# Option: actionstop
|
# Option: actionstop
|
||||||
|
@ -81,3 +81,11 @@ block = ip
|
||||||
# Values: STRING
|
# Values: STRING
|
||||||
#
|
#
|
||||||
blocktype = unreach port
|
blocktype = unreach port
|
||||||
|
|
||||||
|
# Option: lowest_rule_num
|
||||||
|
# Notes: When fail2ban starts with action and there is no rule for the given table yet
|
||||||
|
# then fail2ban will start looking for an empty slot starting with this rule number.
|
||||||
|
# Values: NUM
|
||||||
|
lowest_rule_num = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue