Commit Graph

26 Commits

Author SHA1 Message Date
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 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
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 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 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 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
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 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 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 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 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 88e64a2ae4
banip: update 0.8.9-3
* prevent superflous etag function calls during start action (on start backups will be used anyway)
* changed the ipthreat feed download URL (load a compressed file variant to save bandwidth)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-07-08 19:51:52 +02:00
Dirk Brenken 68cdc3952d
banip: release 0.8.9-1
* added HTTP ETag or entity tag support to download only ressources that have been updated on the server side,
  to save bandwith and speed up banIP reloads
* added 4 new feeds: binarydefense, bruteforceblock, etcompromised, ipblackhole (see readme)
* updated the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-07-07 18:28:58 +02:00
Dirk Brenken 7ac5f0a3d9
banip: release 0.8.5-1
* add support for external allowlist URLs to reference additional IPv4/IPv6 feeds, set 'ban_allowurl' accordingly
* make download retries in case of an error configurable, set 'ban_fetchretry' accordingly (default 5)
* small fixes
* readme update
* LuCI update (separate commit)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-05-06 22:42:20 +02:00
Dirk Brenken 97d6c8bf77
banip: update 0.8.4-4
* add housekeeping to the autoallow function, only the current uplink will be held
* fix small issues
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-05-04 12:07:32 +02:00
Dirk Brenken c5d9b3ded2
banip: release 0.8.4-1
* add support for a custom feeds file (/etc/banip/banip.custom.feeds). Add new or edit existing banIP feeds on your own with the integrated custom feed editor (LuCI-component
* add a new option 'ban_blockpolicy' to overrule the default bblock policy (block all chains), see readme for details
* change the feed file format and add a new ipthreat feed, see readme
* refine (debug) logging
* multiple small fixes and improvements
* readme update
* luci update (separate commit)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-04-23 22:03:09 +02:00
Dirk Brenken 0706b1d2d9
banip: update 0.8.1-2
* add oisdbig as new feed
* LuCI frontend preparation:
  - the json feed file points always to /etc/banip/banip.feeds (and is no longer compressed)
  - supply country list in /etc/banip/banip.countries
* update readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-02-26 08:16:15 +01:00
Dirk Brenken 82a491bac8
banip: release 0.8.0 (nft rewrite)
- complete rewrite of banIP to support nftables
- all sets are handled in a separate nft table/namespace 'banIP'
- for incoming blocking it uses the inet input hook, for outgoing blocking it uses the inet forward hook
- full IPv4 and IPv6 support
- supports nft atomic set loading
- supports blocking by ASN numbers and by iso country codes
- 42 preconfigured external feeds are available, plus local allow- and blocklist
- supports local allow- and blocklist (IPv4, IPv6, CIDR notation or domain names)
- auto-add the uplink subnet to the local allowlist
- provides a small background log monitor to ban unsuccessful login attempts in real-time
- the logterms for the log monitor service can be freely defined via regex
- auto-add unsuccessful LuCI, nginx, Asterisk or ssh login attempts to the local blocklist
- fast feed processing as they are handled in parallel as background jobs
- per feed it can be defined whether the input chain or the forward chain should be blocked (default: both chains)
- automatic blocklist backup & restore, the backups will be used in case of download errors or during startup
- automatically selects one of the following download utilities with ssl support: aria2c, curl, uclient-fetch or wget
- supports a 'allowlist only' mode, this option restricts internet access from/to a small number of secure websites/IPs
- provides comprehensive runtime information
- provides a detailed set report
- provides a set search engine for certain IPs
- feed parsing by fast & flexible regex rulesets
- minimal status & error logging to syslog, enable debug logging to receive more output
- procd based init system support (start/stop/restart/reload/status/report/search)
- procd network interface trigger support
- ability to add new banIP feeds on your own
- add a readme with all available options/feeds to customize your installation to your needs
- a new LuCI frontend will be available in due course

Signed-off-by: Dirk Brenken <dev@brenken.org>
2023-02-18 21:06:26 +01:00