From c7de825006a4e1c6d73709d842ca0e4eaaaee356 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 11 Jun 2023 13:19:54 +1000 Subject: [PATCH] add external unblock script support Using the block script it's possible to maintain an ipset, however auto-unblocked IPs will not be removed from the ipset. This commit makes it possible to define an unblock script for such purpopses. --- psad | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/psad b/psad index 600d1c4..2db2cdb 100755 --- a/psad +++ b/psad @@ -7208,7 +7208,10 @@ sub ipt_rm_block() { } print STDERR "[+] ipt_rm_block(): removed iptables block ", "against $ip\n" if $debug; - + + if ($config{'ENABLE_EXT_UNBLOCK_SCRIPT_EXEC'} eq 'Y') { + &exec_external_script($ip, $config{'EXTERNAL_UNBLOCK_SCRIPT'}); + } return 1; }