• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Issue CloudFlare with modsecurity problem

infoo

New Pleskian
Server operating system version
Debian 11
Plesk version and microupdate number
Plesk Obsidian v18.0.44_build1800220614.18
I installed the Plesk, after days not working, not reachable sites. In the logs I see the modsecurity blocked attackers (yet CloudFlare IP adresses) and nobody can visit the sites...
I don´t know why at 21th century is not integrated there CloudFlares real IP getting... I must completely disable the modsecurity to start working pages.
Is this normal? How get work with CloudFlare? Chinese free panel have this function too (aaPa...).
 
In apache nginx settings add this

#additional http and https directive
RemoteIPHeader CF-connecting-IP

#additional nginx directive
real_ip_header CF-Connecting-IP;

correct ip will be logged.

In fail2ban settings you have to add all CF ips as trusted or turn that off. Else if someone tries to bruteforce/attack your plesk panel,mail,ftp like yoursite.com:8443 CF ip will be jailed.
 
The whole point of banning attackers is to prevent them from connecting to your server at all. That doesn't work when all your traffic passes through cloudflare so the only addresses connecting to your server are all from cloudflare. For that to make sense, you would have to ban them at cloudflare, if that's possible with their api.
 
Back
Top