Add security-dashboard: Asterisk failed-connections + CrowdSec bans, one page
New service, native on the host (not Docker) so it can call cscli and read Asterisk's security log directly without bridging the container/host boundary or exposing CrowdSec LAPI credentials to a containerized frontend. - Security Log tab: parses ~/docker/asterisk-digital-ocean/logs/full for SIP auth failures (wrong password, unknown extension, etc.) with timestamp/account/remote IP, classified by severity. - CrowdSec tab: current bans via cscli, a delete/unban button per entry, and ASN-exempt management for the Asterisk brute-force scenarios (services/crowdsec.sh) without SSHing in. - Link out to the existing Asterisk web admin (reads its domain from asterisk-digital-ocean's own .env, doesn't hardcode or embed it). Runs as a dedicated unprivileged system user (secdash), with sudo scoped to exactly three commands via /etc/sudoers.d/security-dashboard (cscli decisions delete --id <digits>, cscli decisions list -o json, systemctl restart crowdsec) — validated with visudo -c. Listens on 127.0.0.1 only, reachable through Caddy, and refuses to proceed without explicit confirmation if no Authelia (local or remote) is configured, since this page can delete active security bans. Stdlib-only Python (no framework), matching the RAM-conscious pattern already used for Easy Asterisk's own web admin. All embedded code (bash, Python, JS) syntax-checked; the generated sudoers rule validated with visudo -c -f.
This commit is contained in:
@@ -67,7 +67,7 @@ a ready-to-copy Caddy config snippet to `~/docker/caddy-snippets/`.
|
||||
| Group | Services |
|
||||
|-------|---------|
|
||||
| `base` | `net-tools`, `ncdu`, `git`, `curl`, `wget`, `htop`, `tree`, `zip`/`unzip`, `ca-certificates`, `gnupg`, `jq`, `rsync`; `glow` (terminal markdown reader, Charm apt repo); Docker CE + Compose plugin; `openssh-server` with GitHub/Launchpad SSH key import, optional password-auth lockdown, and SSH Host aliases; optional NetBird overlay network |
|
||||
| `homelab` | `caddy`, `crowdsec`, `authelia`, `homeassistant`, `asterisk`, `asterisk-digital-ocean`, `sunshine` |
|
||||
| `homelab` | `caddy`, `crowdsec`, `authelia`, `homeassistant`, `asterisk`, `asterisk-digital-ocean`, `security-dashboard`, `sunshine` |
|
||||
| `utilities` | `actualbudget`, `ai-gpu`, `ai-stack`, `archivebox`, `changedetection`, `ddclient`, `filebrowser`, `fmd`, `gatus`, `homebox`, `iopaint`, `joplin`, `koha`, `magicmirror`, `mail-archiver`, `mattermost`, `mealie`, `meshcentral`, `n8n`, `nextcloud`, `ntfy`, `onlyoffice`, `paintplus`, `portainer`, `rustdesk`, `stirling-pdf`, `syncthing`, `traccar`, `unifi`, `uptimekuma`, `vaultwarden`, `watchyourlan`, `watchtower`, `wg-easy` |
|
||||
| `media` | `arm`, `audiobookshelf`, `calibre-web`, `emby`, `immich`, `jellyfin`, `lyrion` |
|
||||
| `cameras` | `frigate`, `frigate-audio`, `frigate-notify`, `sky-cam` |
|
||||
@@ -92,6 +92,7 @@ homelab
|
||||
homeassistant
|
||||
asterisk
|
||||
asterisk-digital-ocean
|
||||
security-dashboard
|
||||
sunshine
|
||||
|
||||
utilities
|
||||
|
||||
Reference in New Issue
Block a user