Remediation Component inclusion: cs-unifi-bouncer-pro (UniFi Network 11, multi-site)

Open
#1,986 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, github-actions, go, kubernetes, prometheus
Domain
backend, release

Research direction

Start by reviewing the CrowdSec Hub contribution requirements and how existing bouncers are represented in the repository. Then assess the linked project’s documentation and verification claims against those requirements; done means the Hub maintainers can decide whether and how to include it. No repository files or tests are named in the issue.

Written by the indexing model from the issue text.

Description

Hello CrowdSec team,

I'd like to request the inclusion of cs-unifi-bouncer-pro as a community-maintained remediation component in the CrowdSec Hub.

Project and submission details

What it does

A standalone bouncer that consumes CrowdSec Local API decisions and enforces bans through UniFi Network firewall rules and zone policies. It handles IPv4/IPv6, decision expiry, controller synchronization, and persistent ban state. It supports UniFi OS consoles, UniFi OS Server, and supported self-hosted Network controllers.

Why include another UniFi bouncer?

The Hub already lists Teifun2's cs-unifi-bouncer, which remains a useful option. This is an independent, complementary implementation intended for different deployment and operational needs, not a claim that the existing bouncer is obsolete. Both projects support UniFi API enforcement, zone-based rules and IPv6.

Features that make this an additional choice, based on the projects' published documentation:

Area cs-unifi-bouncer-pro approach
Multi-site One process manages multiple configured UniFi sites rather than a single UNIFI_SITE selection.
UniFi Network 11 migration v2.4.0 explicitly handles Network 11's zone-only firewall, rejects unsupported legacy mode, detects a legacy-to-zone transition, and cleans up converted policies.
Inbound and outbound enforcement Configurable zone pairs, destination host/subnet and port scoping, plus optional EGRESS_ZONE_PAIRS to block connections to banned addresses from internal zones.
Multiple ban sources CrowdSec decisions plus external text feeds, AbuseIPDB-derived lists with country filters, and manual bans; source claims prevent one source's expiry from incorrectly unbanning another's address.
State and recovery bbolt persistence, TTL expiry, startup/periodic reconciliation, automatic shard creation/compaction (up to 10,000 entries per shard), rate-limit backoff, and a circuit breaker.
Operations Dry-run mode without controller writes, validation and diagnostics, ban history, webhook alerts, 28 Prometheus metrics, health endpoints, and CrowdSec LAPI usage telemetry.

These are documented design differences, not performance benchmarks or assertions that the existing project cannot implement similar features. Listing both would let users choose according to their controller version, number of sites, desired traffic direction, recovery model and deployment preferences.

Maintenance, security and verification

Documentation for Hub review

Suggested Hub description: "CrowdSec bouncer for UniFi Network 11 and earlier: multi-site zone-based/legacy firewall enforcement, optional egress blocking, persistent bans, reconciliation and Prometheus metrics."

Please let me know if any adjustments or additional verification are needed for inclusion. Thank you for reviewing it.

Dominant language
Python
Stars
257
Forks
235
Avg merge
2d 10h
Merged PRs (30d)
26

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crowdsecurity/hub

All issues in crowdsecurity/hub

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.