mirror of https://github.com/fail2ban/fail2ban
Merge pull request #1690 from chtheis/master
#1689: Make lowest rule number in action.d/bsd-ipfw.conf configurablepull/1816/head
commit
205edff65d
|
@ -17,6 +17,9 @@ releases.
|
|||
### Fixes
|
||||
* Fix for systemd-backend: fail2ban hits the ulimit (out of file descriptors), see gh-991.
|
||||
Partially back-ported from v.0.10.
|
||||
* 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)
|
||||
* filter.d/apache-overflows.conf:
|
||||
- Fixes resources greedy expression (see gh-1790);
|
||||
- Rewritten without end-anchor ($), because of potential vulnerability on very long URLs.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# Notes.: command executed once at the start of Fail2Ban.
|
||||
# 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
|
||||
|
@ -81,3 +81,11 @@ block = ip
|
|||
# Values: STRING
|
||||
#
|
||||
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 = 111
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue