Restrict anonymous Matomo reports to LAN

This commit is contained in:
funman300
2026-11-07 17:46:37 -07:00
parent 0132bea847
commit 88b268fc52
4 changed files with 26 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
# LAN-only anonymous Matomo reports
The analytics ingress is restricted to `10.10.40.0/24`. Matomo still requires
authentication unless its anonymous user is explicitly granted access.
To enable passwordless, read-only reports for the tracked site:
1. Sign in to Matomo as a superuser.
2. Open **Administration → System → Users → Manage access**.
3. For the intended site, grant the `anonymous` user **View** access only.
Do not grant `Write`, `Admin`, or `Superuser` access to the anonymous user. The
Traefik allowlist keeps the reports reachable only from the trusted LAN; it does
not replace Matomo's own account authentication for administration.
+2
View File
@@ -6,6 +6,8 @@ metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.entrypoints: websecure
# Anonymous Matomo report access is view-only and restricted to the trusted LAN.
traefik.ingress.kubernetes.io/router.middlewares: solitaire-matomo-lan-only@kubernetescrd
spec:
ingressClassName: traefik
rules:
+1
View File
@@ -14,6 +14,7 @@ resources:
- matomo-deployment.yaml
- matomo-service.yaml
- ingress-analytics.yaml
- matomo-lan-only.yaml
# CI updates this block automatically via `kustomize edit set image`.
# The image name here matches the `image: solitaire-server` stub in deployment.yaml.
+9
View File
@@ -0,0 +1,9 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: matomo-lan-only
namespace: solitaire
spec:
ipAllowList:
sourceRange:
- 10.10.40.0/24