From: Dirk Brenken Date: Fri, 20 Sep 2024 08:04:09 +0000 (+0200) Subject: banIP: update to 1.0.0-7 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=18d578cb30cffeeabcf51ec756e15e05e4ebeac0;p=feed%2Fpackages.git banIP: update to 1.0.0-7 * fixed auto allow-/blocklist-issue with IPv6 addresses in CIDR notation * removed edrop feed from readme (had been removed from feeds for a while) Signed-off-by: Dirk Brenken (cherry picked from commit aeda25086e7797b403a4307d88716e66f3239504) --- diff --git a/net/banip/Makefile b/net/banip/Makefile index e641bfce6f..c423f13406 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=1.0.0 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/banip/files/README.md b/net/banip/files/README.md index 7b2e8c178b..0fe6b4ba5a 100644 --- a/net/banip/files/README.md +++ b/net/banip/files/README.md @@ -31,7 +31,6 @@ IP address blocking is commonly used to protect against brute force attacks, pre | doh | public DoH-Provider | | | x | tcp: 80, 443 | [Link](https://github.com/dibdot/DoH-IP-blocklists) | | drop | spamhaus drop compilation | x | x | | | [Link](https://www.spamhaus.org) | | dshield | dshield IP blocklist | x | x | | | [Link](https://www.dshield.org) | -| edrop | spamhaus edrop compilation | x | x | | | [Link](https://www.spamhaus.org) | | etcompromised | ET compromised hosts | x | x | | | [Link](https://iplists.firehol.org/?ipset=et_compromised) | | feodo | feodo tracker | x | x | | | [Link](https://feodotracker.abuse.ch) | | firehol1 | firehol level 1 compilation | x | x | | | [Link](https://iplists.firehol.org/?ipset=firehol_level1) | diff --git a/net/banip/files/banip-functions.sh b/net/banip/files/banip-functions.sh index e9fa2f5d2c..35201afafa 100644 --- a/net/banip/files/banip-functions.sh +++ b/net/banip/files/banip-functions.sh @@ -527,7 +527,7 @@ f_getuplink() { if [ "${update}" = "0" ]; then "${ban_sedcmd}" -i "/# uplink added on /d" "${ban_allowlist}" fi - printf "%-42s%s\n" "${ip}" "# uplink added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_allowlist}" + printf "%-45s%s\n" "${ip}" "# uplink added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_allowlist}" f_log "info" "add uplink '${ip}' to local allowlist" update="1" fi @@ -1326,9 +1326,9 @@ f_lookup() { else [ "${ip##*:}" = "${ip}" ] && elementsv4="${elementsv4} ${ip}," || elementsv6="${elementsv6} ${ip}," if [ "${feed}" = "allowlist" ] && [ "${ban_autoallowlist}" = "1" ] && ! "${ban_grepcmd}" -q "^${ip}[[:space:]]*#" "${ban_allowlist}"; then - printf "%-42s%s\n" "${ip}" "# '${domain}' added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_allowlist}" + printf "%-45s%s\n" "${ip}" "# '${domain}' added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_allowlist}" elif [ "${feed}" = "blocklist" ] && [ "${ban_autoblocklist}" = "1" ] && ! "${ban_grepcmd}" -q "^${ip}[[:space:]]*#" "${ban_blocklist}"; then - printf "%-42s%s\n" "${ip}" "# '${domain}' added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_blocklist}" + printf "%-45s%s\n" "${ip}" "# '${domain}' added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_blocklist}" fi cnt_ip="$((cnt_ip + 1))" fi @@ -1714,7 +1714,7 @@ f_monitor() { fi fi if [ -z "${ban_nftexpiry}" ] && [ "${ban_autoblocklist}" = "1" ] && ! "${ban_grepcmd}" -q "^${ip}" "${ban_blocklist}"; then - printf "%-42s%s\n" "${ip}" "# added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_blocklist}" + printf "%-45s%s\n" "${ip}" "# added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_blocklist}" f_log "info" "add IP '${ip}' to local blocklist" fi fi