mirror of
https://github.com/novatiq/packages.git
synced 2026-07-29 06:53:07 +01:00
a new script based package called "banIP" to block incoming & outgoing ip adresses/subnets via ipset. Features: * a shell script which uses ipset and iptables to ban a large number of IP addresses published in various IP blacklists (bogon, firehol etc.) * support blocking by ASN numbers * support blocking by iso country codes * support local white & blacklist (IPv4, IPv6 & CIDR notation) * auto-add unsuccessful ssh login attempts to local blacklist * auto-add the uplink subnet to local whitelist * per source configuration of SRC (incoming) and DST (outgoing) * supports IPv4 & IPv6 Strong LuCI support: * easy interface to track & change all aspects of your ipset configuration on the fly * integrated IPSet-Lookup * integrated RIPE-Lookup * Log-Viewer & online configuration of white- & blacklist LuCI-Screenshots will follow in the second post. Forum discussion: https://forum.openwrt.org/t/banip-new-project-needs-testers-feedback/16985 Signed-off-by: Dirk Brenken <dev@brenken.org>
13 lines
263 B
Bash
13 lines
263 B
Bash
#!/bin/sh
|
|
#
|
|
|
|
ban_pidfile="/var/run/banip.pid"
|
|
ban_enabled="$(/etc/init.d/banip enabled; printf "%u" ${?})"
|
|
|
|
if [ "${ban_enabled}" = "1" ] || [ ! -f "${ban_pidfile}" ] || [ -s "${ban_pidfile}" ] || [ "${ACTION}" != "add" ]
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
/etc/init.d/banip start
|