banIP: update to 1.0.0-7
authorDirk Brenken <dev@brenken.org>
Fri, 20 Sep 2024 08:04:09 +0000 (10:04 +0200)
committerDirk Brenken <dev@brenken.org>
Fri, 20 Sep 2024 08:05:45 +0000 (10:05 +0200)
* 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 <dev@brenken.org>
(cherry picked from commit aeda25086e7797b403a4307d88716e66f3239504)

net/banip/Makefile
net/banip/files/README.md
net/banip/files/banip-functions.sh

index e641bfce6fb16c665359891f97f51c81cd93a39f..c423f134062417cb480f590dc1535d9625edefe5 100644 (file)
@@ -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 <dev@brenken.org>
 
index 7b2e8c178b39f283804f98548fe4c8cb579bc867..0fe6b4ba5abab37f74a8c5fa26ef9de23de61e08 100644 (file)
@@ -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)    |
index e9fa2f5d2cc70fcd0ed6ade53f0fca0e1ac15f33..35201afafa29a833254bd7269241b6aa3b08be7d 100644 (file)
@@ -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