25 lines
854 B
Django/Jinja
25 lines
854 B
Django/Jinja
# Overrides for /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml (ansible)
|
|
# nftables: own tables, input hook (host, e.g. ssh) and forward hook (traffic
|
|
# DNATed to containers: 80/443/222), before Docker's and ufw's chains.
|
|
mode: nftables
|
|
api_url: http://127.0.0.1:8080/
|
|
api_key: {{ vault_crowdsec.firewall_bouncer_key }}
|
|
# Keep retrying if crowdsec isn't up yet instead of exiting.
|
|
retry_initial_connect: true
|
|
update_frequency: 10s
|
|
deny_action: DROP
|
|
nftables_hooks:
|
|
- input
|
|
- forward
|
|
{% if not crowdsec_firewall_all_decisions %}
|
|
# Until crowdsec_firewall_all_decisions: only decisions whose scenario
|
|
# mentions ssh (local ssh detections; manual bans only with --reason ssh-...).
|
|
# Afterwards every decision (HTTP, Gitea, community blocklist) is enforced
|
|
# on all ports.
|
|
scenarios_containing:
|
|
- ssh
|
|
origins:
|
|
- crowdsec
|
|
- cscli
|
|
{% endif %}
|