Page 1 of 1

Send blocked ips to cloudflare

Posted: 31 May 2013, 23:01
by bettinz
Hello, i know that I can use this url:
cloudflare(dot)com/api.html?a=ban&key=<ip>&u=CLOUDFLARE_LOGIN&tkn=CLOUDFLARE_API_TOKEN"
 
to send banned ips to cloud flare, and this

cloudflare(dot)com/api.html?a=nul&key=<ip>&u=CLOUDFLARE_LOGIN&tkn=CLOUDFLARE_API_TOKEN"
to remove the ban.

The situation is pretty simple and common: we have CSF on the server, and some sites without cloudflare can block the malicious ips. But, sites with cloudflare can works (so CSF is useless).

My question is: can I configure CSF to send blocked ips to cloudflare? If yes, how? Or, can you add this feature?

I think will be a killer feature for CSF.

Thank you :)

Re: Send blocked ips to cloudflare

Posted: 03 Jun 2013, 12:59
by nemke
Yes, you can create shell scripts that will block and unblock ip's and use CSF configuration options to call them BLOCK_REPORT i UNBLOCK_REPORT.

Re: Send blocked ips to cloudflare

Posted: 03 Jun 2013, 19:44
by bettinz
Thank you, can you help me to write something like that? I'm not expert in bash programming :(

Re: Send blocked ips to cloudflare

Posted: 29 Mar 2014, 18:31
by NiTe
A script was recently made publicly available to accomplished this. Its name is Flarewall, and can be found at Flarewall [dot] net. Sorry, I cannot link to the site directly as I am a new member on this forum.

Edit: http://flarewall.net