Last active
December 9, 2022 14:08
-
-
Save anunay/5376902 to your computer and use it in GitHub Desktop.
Whitelist IP in ModSecurity (whitelist.conf)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Whitelist IP in ModSecurity | |
#1. If you need to whitelist an IP in ModSecurity (v2.7+), here’s what to do: | |
nano /usr/local/apache/conf/modsec2/whitelist.conf | |
#2. add this line, replacing (#####) with a unique ID number for mod security, I used a version of my whitelisted ip address: | |
SecRule REMOTE_ADDR "@ipMatch 1.2.3.4" "phase:1,t:none,nolog,allow,ctl:ruleEngine=Off,ctl:auditEngine=Off,id:(#####)" | |
#3. Then restart apache. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment