Files
ansible/roles/docker/templates/crowdsec-firewall-bouncer.yaml.local.j2
T
PhilandClaude Opus 5.5 41e9428412 crowdsec: host sshd + Gitea logs, nftables firewall bouncer (SSH bans only for now), weekly hub update
- crowdsec image -> latest-debian (journalctl); reads host journal (sshd)
  and Gitea's log file (LePresidente/gitea); LAPI on 127.0.0.1:8080
- gitea also logs to /data/gitea/log/gitea.log (router lines console only)
- host: crowdsec-firewall-bouncer-nftables from packagecloud any/any, own
  nft tables on input+forward hooks; limited to local ssh detections and
  manual bans until crowdsec_firewall_all_decisions
- weekly cscli hub update/upgrade + SIGHUP

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:26:00 -07:00

24 lines
788 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 local SSH detections and manual
# bans. Afterwards every decision (HTTP, Gitea, community blocklist) is
# enforced on all ports.
scenarios_containing:
- ssh
origins:
- crowdsec
- cscli
{% endif %}