Hello,
I'm using CSF generic on Gentoo.
I have a feature suggestion: Run a script whenever an IP is banned or unbanned. It would run on any kind of ban/unban: auto or manual and perm or temp.
It would pass similar arguments as BLOCK_REPORT to the custom script.
Currently I am using BLOCK_REPORT to run a script that talks to the CloudFlare API when an IP is auto-banned, and using bash aliases to run the script when I need to manual ban.. But I dont have a way to automatically unban from CloudFlare when the tempban expires.
Thanks
Suggestion: Run a custom script after ban and unban
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Suggestion: Run a custom script after ban and unban
We will add this for the next release for temporary IP unblocks.
Re: Suggestion: Run a custom script after ban and unban
Can you share a script you've wrote based on BLOCK_REPORT and CloudFlare API? Many thanks in advance.
Re: Suggestion: Run a custom script after ban and unban
There's a script to ban using BLOCK_REPORT detailed here:
http://www.aetherweb.co.uk/automaticall ... loudflare/
But ideally CSF could have a couple of config options for CloudFlare API and user account so it can do something like this automatically perhaps.
For unblocking there's an alternative to using CSF UNBLOCK_REPORT which I find preferable:
http://www.aetherweb.co.uk/automaticall ... ks-by-age/
http://www.aetherweb.co.uk/automaticall ... loudflare/
But ideally CSF could have a couple of config options for CloudFlare API and user account so it can do something like this automatically perhaps.
For unblocking there's an alternative to using CSF UNBLOCK_REPORT which I find preferable:
http://www.aetherweb.co.uk/automaticall ... ks-by-age/