• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved IP Whitelist in ModSecurity: Found another rule with the same id

alex101

New Pleskian
My server configuration is Plesk Onyx 17.8.11 on Debian 9.5 with Comodo ModSecurity (subscription).

When trying to whitelist one IP serverwide in ModSecurity with a rule such as:
SecRule REMOTE_ADDR "^192\.168\.1\.1$" phase:1,id:210280,nolog,allow

It throws the following error:
"Invalid ModSecurity configuration: AH00526: Syntax error on line 1 of /etc/apache2/plesk.conf.d/modsecurity.conf: ModSecurity: Found another rule with the same id".

However modsecurity.conf file is empty.
 
Try to reinstall modsecurity:

# dpkg -P aum
# mv /var/asl /var/asl_bk
# mv /etc/asl /etc/asl_bk
# cat > /etc/apache2/conf.d/00_mod_security.conf
^C
# plesk installer remove --components modsecurity
# plesk repair web -y
# plesk installer add --components modsecurity
 
Thank you for your help.
It wasn't a Plesk issue after all. It was my dumb mistake. I misunderstood the modsecurity's whitelist syntax.
I thought by adding id:210280 that it would whitelist the IP for that particular rule's ID instead of being just the whitelist rule's ID.
Everything works fine with comodo rules in Debian 9.5.
 
Back
Top