* major rewrite * add support for multiple chains * add mac whitelisting * add support for multiple ssh daemons in parallel * add an ipset report engine * add mail notifications * add suspend/resume functions * add a cron wrapper to set an ipset related auto-timer for automatic blocklist updates * add a list wrapper to add/remove blocklist sources * add 19.x and Turris OS 5.x compatibility code * sources stored in an external compressed json file (/etc/banip/banip.sources.gz) * change Country/ASN download sources (faster/more reliable) * fix DHCPv6/icmpv6 issues Signed-off-by: Dirk Brenken <dev@brenken.org>
14 lines
393 B
Bash
14 lines
393 B
Bash
#!/bin/sh
|
|
#
|
|
ban_pidfile="/var/run/banip.pid"
|
|
ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"
|
|
|
|
if [ "${ban_enabled}" = "0" ] && [ "${ACTION}" = "add" ] && [ -n "${INTERFACE}" ]
|
|
then
|
|
ban_ifaces="$(uci_get banip global ban_ifaces)"
|
|
if [ ! -s "${ban_pidfile}" ] && [ -n "$(printf "%s\n" "${ban_ifaces}" | grep -F "${INTERFACE}")" ]
|
|
then
|
|
/etc/init.d/banip refresh
|
|
fi
|
|
fi
|
|
exit 0
|