Ok, so if I understood correctly, I can install Firewall Plesk and use the feature of blocking countries while leaving the ports disabled on Firewall Plesk and enabled on Firewall IONOS?
Hello,
If I I want to use the Plesk Firewall instead of Ionos Firewall, I need to open all ports in Plesk Firewall before remove them from Ionos ?
Note: I want to switch to Plesk Firewall so that I can use the feature of denying countries.
@Peter Debik
when I asked you the question, I had already tested it and there was no problem.
I just wanted to make sure if the code structure was good since you told me that NGINX and IF can cause problems.
As for the test, I always do it. Then I ask questions just to check, that's how we...
If I use the function multiple times, each time, for 1 country, like:
if ($geoip2_data_country_code = "COUNTRY 1") {
return 403;
}
if ($geoip2_data_country_code = "COUNTRY 2") {
return 403;
}
etc...
It's not a problem, right ?
Apparently, i must run a weekly update for geoipupdate, so I need to create a cron tab.
This cron tab below is correct ?
# top of crontab
[email protected]
0 12 * * 3 geoipupdate
# end of crontab
Got it.
I have successfully configured this in my server. All work as expected.
If I want to combine multiple ISO CODE (Countries) in 1 function, is it possible ? I have tried with , and space, but it doesn't work.
if ($geoip2_data_country_code = "XX") {
return 403;
}
Hello,
For the the Workaround II, when I try to save the custom directives in ModSecurity, this error occur:
Invalid ModSecurity configuration: nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsecurity.d/main.conf. Line: 6. Column: 44. Expecting an action...
Hello @Peter Debik ,
Sincerely, it's urgent now. I receive a lot of fake comments each day from a lot of IPs based in Russia/ China.
If I solve this, no bad bots from Russia and China can access to my site.
Can you confirm in the last post that the documentation apply for Plesk Obsidian ?
@Peter Debik
I found this in the documentation (another way)
https://docs.plesk.com/en-US/obsidian/administrator-guide/website-management/websites-and-domains/extended-website-management/plesk-for-linux-setting-up-ip-geolocation- for-a-website.80011/
Have you already tried it?
@Peter Debik , I have tried again, I can't save this Custom directives in ModSecurity.
I use Nginx + ModSec 3.0 + OWASP . Maybe this Workaround II work only for Apache ?
Hello @Peter Debik ,
When I try to save the custom directives in ModSec, this error occur:
Invalid ModSecurity configuration: nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsecurity.d/main.conf. Line: 6. Column: 44. Expecting an action, got: Include...
Hello,
I want to block few countries through Plesk via ModSec. I have read the documentation in this url: https://support.plesk.com/hc/en-us/articles/12377285410839
If I apply the Workaround 2, the Website hosted in the server will be unavailable in the blocked countries, right ?
Thank you.