Files
ansible/group_vars/all/infrastructure.yml
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

60 lines
2.2 KiB
YAML

# Infrastructure Configuration
# Docker configuration
docker:
network_name: "lava"
stacks_path: "/opt/stacks"
hairpin_ip: "172.20.0.5" # Caddy's fixed IP
# Shared network layout. Docker only hands out addresses from ip_range,
# so 172.20.0.x is kept free for fixed IPs and can't be taken by others.
subnet: "172.20.0.0/16"
gateway: "172.20.0.1"
ip_range: "172.20.128.0/17"
gitea_ip: "172.20.0.6" # fixed so the ufw-docker SSH rule stays valid
# SMTP configuration
smtp:
host: "smtp.resend.com"
username: "resend"
from_domain: "{{ email_domains.updates }}"
# Network configuration
network:
netcup_ip: "152.53.36.98"
docker_host_ip: "100.70.169.99"
tailscale_hostname: "netcup.porgy-porgy.ts.net"
# Paths
paths:
stacks: "{{ docker.stacks_path }}"
# Notification services
notifications:
appriseapi_endpoint: "http://apprise:8000/notify/apprise"
# Pocket ID group allowed through Tinyauth to admin pages.
tinyauth_admin_group: admins
# Custom Caddy (repo phil/caddy-custom: CrowdSec bouncer + AppSec + rate
# limiting, rebuilt daily, rolled out by dockcheck).
# caddy_custom: false = stock caddy:2-alpine and no plugin directives in the
# Caddyfile; set it back to false to roll everything back in one deploy.
# The other flags stage the rollout and only matter when caddy_custom is on.
caddy_custom: false
caddy_custom_image: "{{ subdomains.git }}/phil/caddy"
caddy_custom_tag: "2" # pin to "<ver>-<fingerprint>" to hold a build
caddy_image: "{{ (caddy_custom_image ~ ':' ~ caddy_custom_tag) if caddy_custom else 'caddy:2-alpine' }}"
caddy_crowdsec_enforce: false # block IPs CrowdSec has banned
caddy_appsec: false # AppSec virtual patching on each request
caddy_ratelimit: false # per-IP limits on login POSTs
# Never banned by CrowdSec, never rate limited.
crowdsec_allowlist:
- "{{ docker.subnet }}" # containers hairpinning through Caddy
- "100.64.0.0/10" # Tailscale IPv4
- "fd7a:115c:a1e0::/48" # Tailscale IPv6
- "{{ network.netcup_ip }}" # the server itself
# Firewall bouncer: false = only SSH bans (local detections + manual) are
# enforced at the firewall; true = every CrowdSec decision, on all ports.
crowdsec_firewall_all_decisions: false