- 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>
24 lines
788 B
Django/Jinja
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 %}
|