Share cPHulk Country Blacklist with Apache?
I really like the new cphulk features to block countries. Is it possible to share cphulk's rules with apache or firewalld?
-
use the csf firewall as you be able to block countries and much easier. 0 -
Hi @dstana We're happy you like the new feature! You'd need separate rules for FirewallD and I wouldn't suggest blocking through Apache nor is there a way to move the cPhulk blacklist to something that would be recognizable by Apache. You can read cPHulkd's documentation for more information here: cPHulk Brute Force Protection - Version 70 Documentation - cPanel Documentation Thanks! 0 -
Where can I get access to cphulkd's rules so I can set them up as rules in the firewall? Something like: whmapi1 get_countries_with_known_ip_ranges
How about something like this that will return the IP ranges and I can query over time to adjust?0 -
Hello? 0 -
Hello, It does not appear that there's a way to obtain this through the API. The list of cPHulk related API functions are as follows: WHM API 1 Sections - cPHulk - Developer Documentation - cPanel Documentation You should know the country codes that are blocked but if you're unaware which you've blocked you can obtain this information by running the following: # grep country_blacklist /var/cpanel/hulkd/conf country_blacklist=AF
All country code blocking does is obtain the IP addresses associated with a country (the output of whmapi1 get_countries_with_known_ip_ranges) and create rules to block those ranges.0
Please sign in to leave a comment.
Comments
5 comments