Is it possible to white list an IP address in mod_security?
I found white ist whole domain name in mod_security. But I want to white list only the administrator IP.
OS: CentOS 6 Server: Apache httpd 2.15 Mod Security: Version 2.7
Is it possible to white list an IP address in mod_security?
I found white ist whole domain name in mod_security. But I want to white list only the administrator IP.
OS: CentOS 6 Server: Apache httpd 2.15 Mod Security: Version 2.7
I use modsec version 3 and in my case there wasn't a modsec configuration file in the location /etc/httpd/modsecurity.d/activated_rules/modsecurity_crs_10_whitelist.conf
but there was one in:
/etc/modsecurity/crs/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
in this file the following example is given:
# ModSec Rule Exclusion: Disable Rule Engine for known ASV IP
SecRule REMOTE_ADDR "@ipMatch 192.168.1.100" \
"phase:1,id:1000,pass,nolog,ctl:ruleEngine=Off"
If you are under a load Balancer use:
SecRule REQUEST_HEADERS:X-Forwarded-For "@Contains 37.161.74.122" phase:1,nolog,allow,pass,ctl:ruleEngine=off,id:1