Page 1 of 1

Actions Hooks needed to Automate some tasks.

Posted: 21 Jul 2014, 03:50
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

Re: Actions Hooks needed to Automate some tasks.

Posted: 21 Jul 2014, 14:38
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.