mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
banip: new package to block incoming & outgoing ip addresses
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>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user