Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

But it does not work. :(

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

share|improve this question

Did not try it, but I think it should work

<LocationMatch /administrator>
  <IfModule mod_security2.c>
    SecRule REMOTE_HOST "@ipmatch" \
share|improve this answer

Your Answer


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.