kein funktionierendes Beispiel für Apache 2.4 modsecurity mit rate-limit?

jeudi 15 septembre 2016

Hallo,

ich finde nirgendwo ein funktionierendes Beispiel für ein simples rate-limit mit mod_security. Sämtliche Beispiele die verfügbar sind, haben Syntax-Errors.


Hier das aktuellste:
Code:

        <LocationMatch "^/(.*)">
                #counts everything but images and such
                SecAction initcol:ip=%{X-Forwarded-For},pass,nolog,id:4444446
                SecAction "phase:5,deprecatevar:ip.mysiteconncounter=1/1,pass,nolog,id:4444447"
                SecRule IP:MYSITECONNCOUNTER "@gt 150” “id:4444448,phase:2,pause:300,deny,status:509,setenv:RATELIMITED,skip:1,nolog"
                SecAction "id:4444449,phase:2,pass,setvar:ip.mysiteconncounter=+1,nolog"
                Header always set Retry-After "15" env=RATELIMITED
        </LocationMatch>
        ErrorDocument 509 "Rate Limit Exceeded"

Fehlermeldung lautet:

"ModSecurity: Rules must have at least id action"


was so aber nicht stimmt, da wie gefordert jede Rule eine id hat. Wo liegt hier das Problem?


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor