Send blocked ips to cloudflare

Post Reply
bettinz
Junior Member
Posts: 5
Joined: 21 Jun 2012, 12:16

Send blocked ips to cloudflare

Post 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 :)
nemke
Junior Member
Posts: 10
Joined: 16 Aug 2012, 12:04

Re: Send blocked ips to cloudflare

Post 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.
bettinz
Junior Member
Posts: 5
Joined: 21 Jun 2012, 12:16

Re: Send blocked ips to cloudflare

Post by bettinz »

Thank you, can you help me to write something like that? I'm not expert in bash programming :(
NiTe
Junior Member
Posts: 1
Joined: 29 Mar 2014, 18:27
Location: United States
Contact:

Re: Send blocked ips to cloudflare

Post 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
Post Reply