mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
banip: update 0.3.0
* new 'ca-bundle' dependency as all https connections
are now validated by default
* automatically select the download utility: 'aria2', 'curl',
'uclient-fetch' with libustream-* or wget are supported
* track & ban failed LuCI login attempts as well
* add a small log/banIP background monitor to block
SSH/LuCI brute force attacks in realtime (disabled by default)
* add a config version check (please update your default config!)
* made the automatic wan detection more stable
* fix the IPv6 logfile parser
* fix the service status message
* update readme
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit ff8b853a6d)
This commit is contained in:
@@ -5,7 +5,7 @@ START=30
|
||||
USE_PROCD=1
|
||||
|
||||
EXTRA_COMMANDS="refresh status"
|
||||
EXTRA_HELP=" refresh Refresh ipsets only (no new download!)
|
||||
EXTRA_HELP=" refresh Refresh ipsets without new list downloads
|
||||
status Print runtime information"
|
||||
|
||||
ban_init="/etc/init.d/banip"
|
||||
@@ -53,9 +53,9 @@ stop_service()
|
||||
rc_procd "${ban_script}" stop
|
||||
}
|
||||
|
||||
status()
|
||||
status_service()
|
||||
{
|
||||
local key keylist value
|
||||
local key keylist value
|
||||
local rtfile="$(uci_get banip global ban_rtfile "/tmp/ban_runtime.json")"
|
||||
|
||||
json_load_file "${rtfile}" >/dev/null 2>&1
|
||||
@@ -76,14 +76,14 @@ status()
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
local ban_iface="$(uci_get banip global ban_iface)"
|
||||
local iface iface_list="$(uci_get banip global ban_iface)"
|
||||
local delay="$(uci_get banip extra ban_triggerdelay "2")"
|
||||
local type="$(uci_get banip extra ban_starttype "start")"
|
||||
|
||||
PROCD_RELOAD_DELAY=$((${delay}*1000))
|
||||
if [ -n "${ban_iface}" ]
|
||||
if [ -n "${iface_list}" ]
|
||||
then
|
||||
for iface in ${ban_iface}
|
||||
for iface in ${iface_list}
|
||||
do
|
||||
procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" "${type}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user