Hi again.
I also wonder if it's possible NOT to block permanent (could block temporary) when the country of an IP is mine (Canada) and a rule is triggered? This way, it would have way less impact on my customer that keeps forgetting their password.
No permanent block if country = Canada
Re: No permanent block if country = Canada
You can create a shebang file to unblock all Canadian IPs and then do a cron job for that file to run every 15 minutes. Also, you should avoid to unblock specific funtions like EXIM errors as an example.
Sergio
Sergio
Re: No permanent block if country = Canada
Ok !! It look way more complicated that what I had in mind.
A quick search show me that there is around 1700 blocks of IP address in Canada (http://www.nirsoft.net/countryip/ca.html). The script would have to go through each line and compare them to each line in the error log...
Thanks anyway for this answer.
A quick search show me that there is around 1700 blocks of IP address in Canada (http://www.nirsoft.net/countryip/ca.html). The script would have to go through each line and compare them to each line in the error log...
Thanks anyway for this answer.
Re: No permanent block if country = Canada
No, you don't have to check all of the 1700 blocks of Canada's IPs.
What you should do is to go to the csf.deny file and do a grep for the name of the country "Canada", As you can see csf.deny already has the country name on each blocked IP.
With the grep you will have all the IPs that were blocked in the last 15 minutes and I don't think it will be hundred of them. In my servers there are only one or two IPs blocked and not each hour, but that depends on your customers.
Also, you can set CSF MESSENGER and add the new option reCaptcha, so, your own customers can unblock by their selves.
I have both options, the cron and the recaptcha and they are working great..
What you should do is to go to the csf.deny file and do a grep for the name of the country "Canada", As you can see csf.deny already has the country name on each blocked IP.
With the grep you will have all the IPs that were blocked in the last 15 minutes and I don't think it will be hundred of them. In my servers there are only one or two IPs blocked and not each hour, but that depends on your customers.
Also, you can set CSF MESSENGER and add the new option reCaptcha, so, your own customers can unblock by their selves.
I have both options, the cron and the recaptcha and they are working great..