How can i Whitelist an IP address in ModSecurity on CentOS 7?

Operating System & Version
CENTOS 7.9 kvm
cPanel & WHM Version
92.0 (build 6)

haidermaa

Registered
Dec 25, 2020
2
0
1
United Arab Emirates
cPanel Access Level
Root Administrator
Hi!

I would like to know how can i whitelist an IP address in ModSecurity?

I need to whitelist some IP addresses for GoDaddy Firewall as some of my plugins are not being blocked like Shortpixel.

Looking forward to your reply!

Sincerely,

Hayder
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,266
406
243
cPanel Access Level
Root Administrator
Hey there! We have an article on how to make this change here:


Can you try that work on your machine and see if that works well for you?
 
  • Like
Reactions: haidermaa

haidermaa

Registered
Dec 25, 2020
2
0
1
United Arab Emirates
cPanel Access Level
Root Administrator
H
Hey there! We have an article on how to make this change here:


Can you try that work on your machine and see if that works well for you?
Hi!

Thanks for your reply!

I do have one issue with opening the file at this directory --> /etc/apache2/conf.d/modsec2.user.conf

I get that no such file exists, i'm pretty certain that i have ModSecurity Enabled but how do i access that file.

Looking forward to your reply!

Sincerely,

Hayder