Skip to main content

csf.conf not rotating csf.deny entires?

Comments

2 comments

  • Infopro
    You might try setting it to another number, 1500 for example, save and restart. Then add an IP manually, to block it. When you save that, you should see output removing 500 items from the list.
    0
  • fuzzylogic
    My idea is that you have misinterpreted the observation that an ip was not added to the cfs.deny list when you expected it to be. If you have the cfs settings... LF_MODSEC = 5 LF_MODSEC_PERM = 1 You may expect 5 hits from your modsec wp-login.php rule to be enough to satisfy the conditions to be added to the cfs.deny list. That is not necessarily the case. cfs uses the lfd to parse apache error_log lines for the line fragment "Access denied with code 40*" If 5 lines with that fragment are present for a particular ip then it is added to the cfs.deny list. For Modsecurity to write that line in the apace error_log either the ruleset default action must be set to log... SecDefaultAction "phase:1,log,auditlog,pass"
    Note the word log. Or the rule in question must override the default action by including "log" in its actions. SecRule REQUEST_FILENAME "@endsWith wp-login.php" \ "msg:'wp-login rule is being hit',\ id:1111111,\ log,\ deny"
    0

Please sign in to leave a comment.