0

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.

Sgaduuw
  • 1,823
  • 12
  • 16

1 Answers1

0

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>
NuTTyX
  • 1,128
  • 5
  • 10