Skip to main content

csf does not BAN ip for all rules. some rules just blocked on modsec, other rules ban IP

Comments

7 comments

  • cPRex Jurassic Moderator
    Hey there! If ModSecurity is processing the rules properly it sounds more like an issue with CSF. Have you reached out to their team at Technical Support to see if they are aware of these specific rule issues?
    0
  • leonep
    Hello, Yes i have open support ticket, but CSF it's free product and there is no support . i can try post on forum but it is not very visited by people ... do you know if there is difference between actions deny and block ? and do you know what is the mechanism in csf to ban ? csf parse the log file using some regex ? thanks
    0
  • cPRex Jurassic Moderator
    That is how I'm assuming it happens - CSF reads the log file and pulls the IP and then adds it to their block list. I can't really speak about the inner workings because I just don't for sure. Even though the product is free, their forums and support have been fairly responsive over the years.
    0
  • leonep
    et voil"
    0
  • cPRex Jurassic Moderator
    Hopefully they are able to get you the details on the inner workings there!
    0
  • quietFinn
    I think it's not the rules but the error messages you should be looking at. What is the difference between the error messages those rules trigger? In file /usr/local/csf/lib/ConfigServer/RegexMain.pm you see how csf/lfd is reading MODSEC_LOG. I am lousy in Regex so I don't really understand that code.
    0
  • leonep
    thanks, the only solution i find is to disable anomaly score and activate traditional mode i edit crs-setup.conf: SecDefaultAction "phase:2,deny,status:403,log" about traditional mode documantation says: Pros
    • The functionality of this mode is much easier for a new user to understand.
    • Better performance (lower latency/resources) as the first disruptive match will stop further processing.
    Cons
    • Not all rules that could have triggered will be logged, only th first
    • Not every site has the same risk tolerance
    • Lower severity alerts may not trigger traditional mode
    • Single low severity alerts may not be deemed critical enough to block, but multiple lower severity alerts in aggregate could be
    so in the end I don't mind the traditional mode..... however it bothers me that I was able to make it work with anomaly score which is the suggested method thanks
    0

Please sign in to leave a comment.