All checks were successful
deploy / ansible (push) Successful in 8m12s
Monitoring covered availability only: a new WireGuard peer, a machine on the private network, an extra account or key, or a login from outside the VPN would have gone unnoticed. security-metrics runs every minute on both hosts and exports what it finds for node_exporter: WireGuard peers and where they connect from, addresses answering a ping sweep of the VPC, login accounts, sudo and docker members, listening ports, containers with host-level access, and fingerprints of the account, sudoers, sshd, WireGuard and authorized_keys files. Each item is compared with a baseline in the role defaults and host_vars and exported with known="true|false", so a deliberate change has to update the baseline with it. On ops it also counts Forgejo users, keys and runners. Grafana gets a Security dashboard and an alert group for anything unknown, a changed access file, an SSH login from outside WireGuard, failed-login bursts on SSH, Forgejo, Grafana and the asxp.io admin, a new container, and for logs or the collector itself going quiet, which would otherwise blind the rest. It never reads `wg show dump`, which prints preshared keys. Assisted-by: Claude:fable-5-2
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
---
|
|
public_ip: 135.181.27.77
|
|
vpc_ip: "{{ asxpio_ops_vpc_ip }}"
|
|
wireguard_ip: "{{ asxpio_ops_wireguard_ip }}"
|
|
|
|
# SSH: the git user may connect from anywhere (Forgejo passthrough)
|
|
ssh_allow_public_git: true
|
|
ssh_git_user: git
|
|
|
|
# s3fs is off here: its ensure_diskfree reserve never fit the 38 GB disk
|
|
s3fs_enabled: false
|
|
s3fs_ensure_diskfree: 20000
|
|
|
|
# restic: Postgres as a dump, Garage with a fresh metadata snapshot,
|
|
# Forgejo's SQLite through the online backup API
|
|
restic_paths:
|
|
- /etc
|
|
- /opt
|
|
- /root/backups/rclone-hetzner.sh
|
|
- /var/lib/docker/volumes/storage_garage_meta
|
|
- /var/lib/docker/volumes/storage_garage_data
|
|
restic_excludes:
|
|
- /opt/backups
|
|
- /opt/containerd
|
|
restic_pre_hooks:
|
|
- docker exec storage-postgres pg_dumpall -U postgres > "$STAGE/pg_dumpall.sql"
|
|
- docker exec storage-postgres pg_dump -U postgres -Fc asxpio > "$STAGE/asxpio.dump"
|
|
- docker exec storage-garage /garage meta snapshot --all
|
|
- sqlite3 /opt/forgejo/data/gitea/gitea.db ".backup '$STAGE/forgejo-gitea.db'"
|
|
restic_schedule: "*-*-* 03:30:00"
|
|
|
|
# Security baseline (role monitoring_agent)
|
|
security_login_users_extra: [git]
|
|
security_docker_users_extra: [git]
|
|
security_wg_peer_names: "{{ wireguard_clients | map(attribute='name') | list }}"
|
|
security_forgejo_db: "{{ services_base_path }}/forgejo/data/gitea/gitea.db"
|
|
security_ports_extra:
|
|
- tcp/80/docker-proxy
|
|
- tcp/443/docker-proxy
|
|
- tcp/3000/docker-proxy # Forgejo, for the runners over the VPC
|
|
- "tcp/{{ monitoring_loki_port }}/docker-proxy"
|
|
- tcp/8080/docker-proxy # Traefik dashboard, WireGuard address
|
|
- "udp/{{ wireguard_port }}/"
|
|
security_containers_extra:
|
|
traefik: [docker-sock]
|