I have modsecurity2 installed on the server which blocks dangerous HTTP requests, and also use fail2ban to block brute force. I have additional security scripts that run under PHP. I would like these scripts to be able to put an IP on the block list too, either in mod_security or in IP tables. Are there scripts around which can handle these bans? For example, PHP could call a URL on the same server to ban an IP. Thank you for help.
ok, I've probably found an answer to my question - make the PHP script that detect the offender to write a log txt file and then configure fail2ban to read that log.