first commit

This commit is contained in:
2024-11-28 00:01:14 +03:00
commit 989693564a
17 changed files with 525 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/bash
target_ip=$1
check_ip_config='/usr/local/etc/scripts/custom.fail2ban-check-ip.conf'
test -s "${check_ip_config}" && . "${check_ip_config}"
function check_ip_in_ipset() {
for list in "${check_ip_lists[@]}"; do
/sbin/ipset save "${list}" | grep -qE "${target_ip}" && return 0
done
return 1
}
check_ip_in_ipset