Mod Security Whitelist IP

Sometimes it’s necessary to whitelist an IP address so it can get past the mod_security filters. This is a great feature in case you want to open the filters for one visitor while leaving the security features in place.

Open the mod_security whitelist file:
vi /usr/local/apache/conf/modsec2/whitelist.conf

Code:

SecRule REMOTE_ADDR "^111\.222\.333\.444" phase:1,nolog,allow,ctl:ruleEngine=off

Where 111.222.333.444 would be replaced with the IP address you wish to whitelist.

Leave a Reply

You must be logged in to post a comment.