Can't get to work BLOCK_REPORT script

vertebrac
Junior Member
Posts: 1
Joined: 16 Mar 2012, 20:19

Can't get to work BLOCK_REPORT script

Post by vertebrac »

Hi everyone!
I'm trying to call a simple script at the block_report option at csf.
In my configuration file i'v got this:

Code: Select all

# address block following for example a login failure. The following setting
# is to the full path of the external script which must be executable. See
# readme.txt for format details
#
# Leave this setting blank to disable
BLOCK_REPORT = "/usr/local/bin/scripts/cban"

# To also run an external script when a temporary block is unblocked: the
# following setting can be the full path of the external script which must be
# executable. See readme.txt for format details
#
# Leave this setting blank to disable
UNBLOCK_REPORT = "/usr/local/bin/scripts/cnul"
And the scripts are never executing, they have execution permissions for every user.
I'm trying to fire up those scripts simulating a 5 time whm failed login.
What could be happening?

Thanks!!
nemke
Junior Member
Posts: 10
Joined: 16 Aug 2012, 12:04

Re: Can't get to work BLOCK_REPORT script

Post by nemke »

I can only say that i have same issue without solution :(

I wanted to use BLOCK_REPORT and UNBLOCK_REPORT to also ban IP on my Cloudflare account, but scripts never get called.
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: Can't get to work BLOCK_REPORT script

Post by ForumAdmin »

You need to ensure that any scripts called have:

1. Executable bit set
2. A valid first line shebang
3. Use full paths to any binaries (there will be no PATH setting)
nemke
Junior Member
Posts: 10
Joined: 16 Aug 2012, 12:04

Re: Can't get to work BLOCK_REPORT script

Post by nemke »

1. Already set
2. I have it
3. I didn't have full paths. But I changed them, and it still script doesn't get called.

When i call my scripts from command line, they work fine.

Hm, i use csf -d and csf -dr to test this scripts, maybe they are called only when csf performs a ban?
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: Can't get to work BLOCK_REPORT script

Post by ForumAdmin »

They are only ever called by lfd when it blocks an IP, not csf - that is not the purpose of the options.
nemke
Junior Member
Posts: 10
Joined: 16 Aug 2012, 12:04

Re: Can't get to work BLOCK_REPORT script

Post by nemke »

You are right, thank you for the info. Now everything works as expected :)
johnang
Junior Member
Posts: 8
Joined: 08 Jan 2012, 13:20

Re: Can't get to work BLOCK_REPORT script

Post by johnang »

Can you enable BLOCK_REPORT and UNBLOCK_REPORT for csf, also?
nemke
Junior Member
Posts: 10
Joined: 16 Aug 2012, 12:04

Re: Can't get to work BLOCK_REPORT script

Post by nemke »

Yes that would be nice feature request, that block_report is called for every type of ban/unban.
snowwhiteeg
Junior Member
Posts: 1
Joined: 28 Mar 2013, 16:36

Re: Can't get to work BLOCK_REPORT script

Post by snowwhiteeg »

vertebrac wrote:Hi everyone!
I'm trying to call a simple script at the block_report option at csf.
In my configuration file i'v got this:

Code: Select all

# address block following for example a login failure. The following setting
# is to the full path of the external script which must be executable. See
# readme.txt for format details
#شركات التسويق 
# Leave this setting blank to disable
BLOCK_REPORT = "/usr/local/bin/scripts/cban"

# To also run an external script when a temporary block is unblocked: the
# following setting can be the full  seo egypt  path of the external script which must be
# executable. See اشهار الموقع  readme.txt for format details
#
# Leave this setting blank to ] نشر موقع   disable
UNBLOCK_REPORT = "/usr/local/bin/scripts/cnul"
And the scripts are never executing, they have execution permissions for every user.
I'm trying to fire up those scripts simulating a 5 time whm failed login.
What could be happening?

Thanks!!
i have the same problem , still no solution
Cyph3r
Junior Member
Posts: 4
Joined: 11 May 2014, 05:50

Re: Can't get to work BLOCK_REPORT script

Post by Cyph3r »

deleted
Last edited by Cyph3r on 05 Jun 2015, 04:13, edited 1 time in total.
Post Reply