Commit Graph

127 Commits

Author SHA1 Message Date
Dirk Brenken 7383b4817b
banIP: release 1.5.6-1
* the ETAG function now supports country and asn feeds as well
* fixed becyber URL and other small fixes
* LuCI fixes and improvements (separate commit)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-04-11 21:59:31 +02:00
Dirk Brenken 251f58d513
banIP: update 1.5.5-2
* fixed a JSON reporting issue (when the map and NFT counters are disabled)
* optimized the getfetch function call within the reporting function
* removed the stale IPv6 links in the becyber feed
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-03-29 17:07:09 +01:00
Dirk Brenken 716e73da56
banIP: release 1.5.5-1
* added a geoIP Map to show home IPs and potential attacker IPs on a leafletjs based map
* significantly improved the reporting performance on multicore hardware
* removed aria2 support (it doesn't support post data requests)
* removed the following outbound feeds due to too many false positives:
   adaway, adguard, adguardtrackers, antipopads, oisdbig, oisdnsfw, oisdsmall, stevenblack and yoyo
* renamed the banIP command "survey" to "content"
* various other small tweaks
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-03-28 07:57:42 +01:00
Dirk Brenken 764a77acfd
banIP: update 1.5.3-3
* fix a race condition in the process scheduler
* sync the banIP country file with ipdeny feed
* refine etag handling with country/asn feeds
* refine logging with country/asn feeds
* refine the banIP status output (incl. LuCI changes)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-03-07 13:26:12 +01:00
Dirk Brenken 62a4633e7c
banIP: update 1.5.3-2
* fix uci config processing (ban_logterm)
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-03-03 19:45:11 +01:00
Dirk Brenken d5cd6f3cf2
banIP: release 1.5.3-1
* optimized uci config processing (list options)
* optimized icmp rules in pre-routing (thanks @brada)
* set inbound marker in pre-routing only if inbound logging is enabled (fixes #26044)
* fix cornercase in Set removal function
* print chain-, set- and rules-counter in the banIP status
* clean up logging und download queue handling
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-02-28 16:50:56 +01:00
Dirk Brenken 884876c7e1
banIP: release 1.5.2-1
* add memory measurements:
 - free memory in MB (MemAvailable from /proc/meminfo)
 - script run max. used RAM in MB (VmHWM from /proc/$$/status)
* removed the obsolete (domain) lookup command in init script
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-02-21 22:08:45 +01:00
Dirk Brenken 4e3d7845fd
banIP: release 1.5.1-1
* optimized the f_nftload function
* reduced the prerouting priority to -175
* optimized the output of the f_survey function
* removed a needless fw4 call/check
* no longer skips regular blocklist feeds in "allowlist only" mode
* optimized init checks
* turris feed: enable IPv6 parsing, too (prvided by @curbengh)
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-02-13 21:48:15 +01:00
Dirk Brenken bf2fb994fa
banIP: update 1.5.0-6
* fixed  the incomplete rule maintainance during banIP reloads
* fixed the Set query function (if the Set counters are disabled)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-02-02 22:15:41 +01:00
Dirk Brenken 737c0601cb
banip: update 1.5.0-5
* fix a reporting issue with multiple ports/protocols

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-01-26 19:58:53 +01:00
Juan Orti Alcaine f80fbec40f banip: Block UDP ports for HTTP/3
Block HTTP/3 by including UDP in the feeds that have the 80 443 ports in
their flag.

Signed-off-by: Juan Orti Alcaine <jorti@pm.me>
2025-01-25 19:36:40 +01:00
Dirk Brenken 481215bab0
banIP: update 1.5.0-3
* better logging of nft load errors
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-01-23 20:11:32 +01:00
Dirk Brenken c4f95cb0f2
banIP: update 1.5.0-2
* fix typo in the log_outbound target
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-01-19 21:08:47 +01:00
Dirk Brenken 80768dfdae
banIP: release 1.5.0-1
* change the chain structure: only two regular chains contain the generated banIP sets.
  “_inbound” covers the base chains WAN-Input and WAN-Forward, ‘_outbound’ covers the base chain LAN-Forward.
* pre-configure the default chains for every feed in the banip.feeds json file, no longer blocks
  selected feeds in all chains by default
* it's now possible to split country and asn Sets by country or asn (disabled by default)
* support Set counters to report easily suspicious IPs per Set (disabled by default)
* make it possible, to opt out certain chains from the deduplication process
* the element search now returns all matches (and not only the first one)
* the report engine now includes statistics about the Inbound & Outbound chains and the Set counters (optional)
* save the temp. files of possible nft loading errors in "/tmp/banIP-errors" by default for easier debugging
* various code improvements
* remove ssbl feed (deprecated)
* add two new vpn feeds
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-01-16 20:10:34 +01:00
Dirk Brenken 3140259fc6
banIP: update 1.0.1-2
* correctly parse json objects with hyphens in the autodetection function

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-11-26 07:05:24 +01:00
Dirk Brenken 8609a5bbe5
banIP: release 1.0.1-1
* optimized procd settings for better performance
* made the log monitor working again (even on master with apk migration issues)
* reworked the fetch autodetection function (still broken in master due to apk migration)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-11-24 15:44:38 +01:00
Dirk Brenken 4f00d8f0ee
banIP: update to 1.0.0-10
* minimal fix to support all download utilities in currently broken apk snapshots
  (see https://github.com/openwrt/openwrt/issues/16907 for details)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-11-16 12:45:40 +01:00
Dirk Brenken fb19c14696
banIP: update to 1.0.0-9
* fixed gathering/printing of system information in banIP status
* removed broken iblocklist.com feeds
* updated readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-10-26 21:25:20 +02:00
Dirk Brenken 270e6f1264
banIP: update to 1.0.0-8
* supports comments (introduced with a #), for MAC addresses
  in the allow and block list, e.g. 26:5e:a0:6a:9c:da # Test
* added hagezi threat ip feed
* added an adguard logterm to the readme
* removed the broken talos feed

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-10-11 19:46:16 +02:00
Dirk Brenken aeda25086e
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 <dev@brenken.org>
2024-09-20 10:04:40 +02:00
Dirk Brenken b157e03e80
banip: update 1.0.0-6
* automatic blocking of IP ranges via RDAP request now supports multiple CIDRs
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-09-09 21:08:48 +02:00
Dirk Brenken 9968fe6bf7
banip: update 1.0.0-5
* filter crappy IP entries from urlhaus feed

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-07-14 22:27:07 +02:00
JetVarimax bda55290f4
banip: Correct Mb to MB when referring to RAM in README.md
Signed-off-by: JetVarimax <140423365+JetVarimax@users.noreply.github.com>
2024-07-08 20:21:30 +01:00
Dirk Brenken d17f661aee
banip: update 1.0.0-4
* relax the firewall pre-check if fw4 is not running
* replace former stale tor feed source with 'https://www.dan.me.uk/torlist/?exit'
* add openvpn log term/search pattern example to the readme
* the default config now includes only log terms for dropbear and LuCI, all others are optional
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-06-22 10:13:22 +02:00
Dirk Brenken 2cc7cf3ca0
banip: update 1.0.0-3
* fixed a regression in the split Set function (reported in the forum)
* fixed regex for urlhaus feed

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-06-18 17:04:15 +02:00
Dirk Brenken 059a530329
banip: update 1.0.0-2
* fixed a possible "Argument list too long" error in the f_log function
* fixed multiple, incomplete digit character classes
* fixed/optimized split file handling
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-06-16 21:52:10 +02:00
Dirk Brenken cc709768b5
banip: release 1.0
* made sure, that the domain lookup always add the found IPs to the underlying allow-/blocklist-Set
* major readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-06-08 10:34:09 +02:00
Dirk Brenken 3584187f69
banip: update 0.9.6-3
* fixed concurrent, too high nft loads during feed processing (seen in LuCI frontend)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-06-01 16:06:59 +02:00
Dirk Brenken 27e86ef42e
banip: update 0.9.6-2
* fix regex for nixspam and sslbl feed
* list the pre-routing limits in the banIP status
* small fixes and log improvements

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-05-30 21:36:57 +02:00
Dirk Brenken ccca9c8325
banip: release 0.9.6-1
* refine IPv4 parsing, skip rough feed entries like loopback addresses
* better error logging during banIP nftables initialization and Set loading
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-05-18 08:30:04 +02:00
Dirk Brenken 083554094b
banip: update 0.9.5-5
* fix a processing race condition
* it's now possible to disable the icmp/syn/udp safeguards in pre-routing - set the threshold to '0'.

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-05-05 21:58:13 +02:00
Dirk Brenken 4d7c38c770
banip: update 0.9.5-4
* optimized adding suspicious IPs to Sets in the log monitor
* re-added ipblackhole feed

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-05-01 15:03:13 +02:00
Dirk Brenken 2c6d5adac0
banip: update 0.9.5-3
* allow multiple protocol/port definitions per feed, e.g. 'tcp udp 80 443 50000'
* removed the default protocol/port limitation from asn feed

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-04-26 17:03:33 +02:00
Dirk Brenken ad755e0c4d
banip: update 0.9.5-2
* fixed possible Set search race condition (initiated from LuCI frontend)
* fixed the "no result" Set search problem in LuCI
* removed abandoned feeds: spamhaus edrop (was merged with spamhaus drop)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-04-21 21:58:32 +02:00
Dirk Brenken fa80fefe22
banip: release 0.9.5-1
* added a DDoS protection rules in a new pre-routing chain to prevent common ICMP, UDP and SYN flood attacks and drop spoofed tcp flags & invalid conntrack packets, flood tresholds are configured via 'ban_icmplimit' (default 10/s), 'ban_synlimit' (default 10/s) and 'ban_udplimit' (default 100/s)
* the new pre-routing rules are tracked via named nft counters and are part of the standard reporting, set 'ban_logprerouting' accordingly
* block countries dynamically by Regional Internet Registry (RIR)/regions, e.g. all countries related to ARIN. Supported service regions are: AFRINIC, ARIN, APNIC, LACNIC and RIPE, set 'ban_region' accordingly
* it's now possible to always allow certain protocols/destination ports in wan-input and wan-forward chains, set 'ban_allowflag' accordingly - e.g. ' tcp 80 443-445'
* filter/convert possible windows line endings of external feeds during processing
* the cpu core autodetection is now limited to max. 16 cores in parallel, set 'ban_cores' manually to overrule this limitation
* set the default nft priority to -100 for banIP input/forward chains (pre-routing is set to -150)
* update readme
* a couple of bugfixes & performance improvements
* removed abandoned feeds: darklist, ipblackhole
* added new feeds: becyber, ipsum, pallebone, debl (changed URL)
* requires a LuCI frontend update as well (separate PR/commit)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-04-20 12:43:37 +02:00
Dirk Brenken 4356180197
banip: update 0.9.4-3
* fix another logical glitch in the logfile monitor

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-03-04 21:26:44 +01:00
Dirk Brenken 7b06b1d312
banip: update 0.9.4-2
* fix a long standing problem in the logfile-parser with dropbear and compressed IPv6 addresses

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-03-02 21:26:11 +01:00
Dirk Brenken 730ad59cb9
banip: release 0.9.4-1
* add support for destination port & protocol limitations for external feeds (see readme for details),
  useful for lan-forward ad- or DoH-blocking, e.g. only tcp ports 80 and 443
* add turris sentinel blocklist feed
* update readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-03-02 09:28:39 +01:00
Dirk Brenken 79ae76806b
banip: update 0.9.3-5
* fix the nft Set survey function

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-01-26 19:51:05 +01:00
Dirk Brenken 6c9cd77596
banip: update 0.9.3-4
* made the default mail template "responsive" to get a better view esp. on mobile devices

Signed-off-by: Dirk Brenken <dev@brenken.org>
2024-01-07 18:11:10 +01:00
Dirk Brenken 8c8a335eaf
banip: update 0.9.3-3
* more init fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-12-28 21:13:16 +01:00
Dirk Brenken 5af101564a
banip: update 0.9.3-2
* rework the device/interface auto-detection (only layer-3 network devices will be detetcted correctly), disable the auto-detection e.g. for special tunnel interfaces
* supports now full gawk (preferred, if installed) and busybox awk
* raise the default boot timeout to 20 seconds (if 'ban_triggerdelay' is not set)
* various small fixes and improvements
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-12-28 17:57:04 +01:00
Dirk Brenken df81585cea
banip: bump to release 0.9.3-1
* provides an option to transfer log events on remote servers via cgi interface (disabled by default), see readme for details
* refine the allowlist check to support IP intervals as well before adding an IP to the blocklist

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-12-11 17:35:40 +01:00
Dirk Brenken e7979d6b04
banip: update 0.9.2-4
* fix: accidently upload a faulty urlhaus feed regex in the former commit

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-11-25 08:57:43 +01:00
Dirk Brenken 1557ddfe83
banip: update 0.9.2-3
* fix the urlhaus regex
* fix a possible init race condition

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-11-25 08:24:36 +01:00
Dirk Brenken 2411bcffaf
banip: update 0.9.2-2
* support backup/restore for remote allowlists
* report the used log variant in status message

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-11-08 15:59:24 +01:00
Dirk Brenken c4e8140740
banip: release 0.9.2-1
* the log file monitor now supports standard log files used by other log daemons like syslog-ng
  Set 'ban_logreadfile' accordingly, by default it points to /var/log/messages
* removed logd dependency, closes #21932

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-11-05 09:20:23 +01:00
Dirk Brenken 00cad2980c
banip: release 0.9.1-1
* drop packets silently on input and forwardwan chains or actively reject the traffic, set 'ban_blocktype' accordingly
* optimized banIP boot/reload handling
* removed pppoe quirk in device detection
* small fixes and optimizations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-10-03 21:34:49 +02:00
Dirk Brenken 1c14eb6d8c
banip: release 0.9.0-1
* supports allowing / blocking of certain VLAN forwards in segregated network environments,
   set 'ban_vlanallow', ''ban_vlanblock' accordingly
* simplified the code/JSON to generate/parse the banIP status
* enclose nft related devices in quotation marks , e.g. to handle devices which starts with a number '10g-1'
* made the new vlan options available to LuCI (separate commit)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-07-16 07:32:48 +02:00
Dirk Brenken 5e2a9f082a
banip: update 0.8.9-4
* made the etag id parsing more bulletproof (to catch unverified etags as well)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-07-09 07:01:17 +02:00