Actions Hooks needed to Automate some tasks.

Post Reply
wwwcad
Junior Member
Posts: 3
Joined: 07 May 2013, 19:07

Actions Hooks needed to Automate some tasks.

Post by wwwcad »

Once again thank you for this great package. I'm a donor already. ;)

Well.

1 - We have a modified version of the lfd .pl file but when an update ocurs, we need to make the modification again and it's a bit annoying. We would love a hook to trigger our modification script, some config like UPDATE_ACTION

2 - We need another hook in the logfile function inside lfd. pl, it's needed to execute different actions according to the lfd. log. Something like LOG_ACTION

For example, most of our customers are from a specific country, so we want to disable permanent blocks for an specific country but manteining the temp blocks.

Regards
Sergio
Junior Member
Posts: 1714
Joined: 12 Dec 2006, 14:56

Re: Actions Hooks needed to Automate some tasks.

Post by Sergio »

Work around:
You can modify /usr/local/csf/bin/csfpre.sh and set a few lines to modify LFD.PL before CSF starts, read "17. External Pre- and Post- Scripts" on the the readme file.

I have a similar situation with my country customers, I have an script that checks csf.deny file for my country IPs and deletes any from there using /usr/sbin/csf -dr. If you want to delete the IPs from the temporary files you will need to check csf.tempban and use /usr/sbin/csf -tr.
Post Reply