Merge pull request 'feat(crowdsec): arm the bouncer everywhere, drop the per-host override' (#769) from arm-crowdsec-proxy-1 into master
Reviewed-on: k.renner/homelab#769
This commit was merged in pull request #769.
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
---
|
||||
# Arms the CrowdSec firewall bouncer on THIS host only.
|
||||
#
|
||||
# The role defaults to dry-run for the whole netbird_proxy group, so the two
|
||||
# members can be armed one at a time. proxy-2 goes first deliberately: it is
|
||||
# the dual-stack member, while proxy-1 is IPv6-only and the one where every
|
||||
# network-shaped problem has surfaced first — the dhcpcd/resolv.conf breakage,
|
||||
# and the GitHub download that could not work at all.
|
||||
#
|
||||
# What flipping this does: the bouncer stops logging what it would block and
|
||||
# creates two nftables tables (ip crowdsec, ip6 crowdsec6) with the decisions
|
||||
# it holds. It touches no existing chain and sets no chain policy.
|
||||
#
|
||||
# Rollback is `systemctl stop crowdsec-firewall-bouncer` — a clean stop deletes
|
||||
# both tables itself. Setting this back to dry-run and re-running the play does
|
||||
# the same through the handler.
|
||||
#
|
||||
# Remove this file once proxy-1 follows and the role default moves to nftables.
|
||||
crowdsec_bouncer_mode: nftables
|
||||
@@ -28,14 +28,23 @@ crowdsec_bouncer_sha256: f86e4b72693549d99f40a9402abefb894108f047a3fbe6e72fada25
|
||||
crowdsec_bouncer_api_url: https://crowdsec.renner.uno/
|
||||
crowdsec_bouncer_api_key: "{{ vault_crowdsec_edge_bouncer_key }}"
|
||||
|
||||
# STARTS INERT, and that is the point.
|
||||
# Enforcing. The bouncer creates two nftables tables (ip crowdsec, ip6
|
||||
# crowdsec6) holding the decisions it pulled, touches no existing chain and
|
||||
# sets no chain policy — SSH and :443 stay open unless the source is banned.
|
||||
#
|
||||
# dry-run pulls decisions and logs what it would block without creating a
|
||||
# single nftables rule. The first bouncer to arm anywhere enforces ~24k CAPI
|
||||
# decisions at once on the only external entry path, so the false-positive
|
||||
# window has to come before the enforcement, not after it. Flip to `nftables`
|
||||
# one host at a time once the log looks right.
|
||||
crowdsec_bouncer_mode: dry-run
|
||||
# `dry-run` is the other value: it pulls and logs what it would block without
|
||||
# creating a single rule. That is what a new host should be given before it
|
||||
# enforces, and what an existing one can be dropped back to, per host through
|
||||
# inventory/host_vars, without disarming the rest.
|
||||
#
|
||||
# Worth knowing before arming anything new: the first bouncer on a path
|
||||
# enforces the whole CAPI set at once — around 15k addresses today — so the
|
||||
# false-positive window belongs before the switch, not after it. And because
|
||||
# this chain sits on the INPUT hook while these hosts run no other firewall,
|
||||
# there is no conntrack rule accepting established flows ahead of it: a banned
|
||||
# address is dropped even when it is answering our own outbound connection.
|
||||
# That is why capi_whitelists.yaml carries the proxies and netbird.renner.uno.
|
||||
crowdsec_bouncer_mode: nftables
|
||||
|
||||
crowdsec_bouncer_update_frequency: 10s
|
||||
crowdsec_bouncer_log_level: info
|
||||
|
||||
Reference in New Issue
Block a user