Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to disable a rule by Mod Security2, only for one specified IP addresses?

Only for one specified IP addresses & only for one specified path ( /administrator ) ?

I tried this:

<LocationMatch /administrator>
Allow from 123.456.78.999
 SecRuleRemoveById 000000
</LocationMatch>

But it does not work. :(

I have Ubuntu 14.04 LTS Server and just I managed to install mod security2.

share|improve this question

1 Answer 1

Did not try it, but I think it should work

<LocationMatch /administrator>
  <IfModule mod_security2.c>
    SecRule REMOTE_HOST "@ipmatch 1.2.3.4" \
    "id:12345,phase:2,t:none,pass,nolog,noauditlog,ctl:ruleRemovebyID=000000"
  </IfModule>
</LocationMatch>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.