chore: build
This commit is contained in:
@@ -59,6 +59,52 @@ http {
|
||||
}
|
||||
}
|
||||
|
||||
# ── Beszel agents k3s (10002, public) ────────────────────
|
||||
# Port DÉDIÉ aux agents Beszel du cluster k3s (hors VPN, pas d'autre
|
||||
# moyen de les joindre) — distinct du 8090 (dashboard, VPN uniquement).
|
||||
# Même backend (beszel:8090), mais restreint :
|
||||
# - IP source : uniquement les 4 nœuds k3s (pas 0.0.0.0/0)
|
||||
# - Chemin : uniquement /api/ (enregistrement + heartbeat des agents),
|
||||
# tout le reste (dashboard, admin PocketBase sous /_/) renvoie 403 —
|
||||
# à VÉRIFIER après coup (voir access_log) que les agents n'appellent
|
||||
# pas un chemin hors /api/ non couvert ici.
|
||||
server {
|
||||
listen 10002 ssl;
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
access_log /var/log/nginx/beszel_agents_access.log;
|
||||
error_log /var/log/nginx/beszel_agents_error.log;
|
||||
|
||||
# Nœuds k3s-prod (voir omnex/ansible/inventory/host.ini) — aucun
|
||||
# autre client de ce port.
|
||||
allow 176.116.0.189; # master-k3s
|
||||
allow 93.185.167.134; # slave-1-k3s
|
||||
allow 185.139.215.125; # slave-2-k3s
|
||||
allow 5.252.20.74; # slave-3-k3s
|
||||
deny all;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://beszel:8090;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 3600s;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
# ── Wazuh (443) ──────────────────────────────────────────
|
||||
server {
|
||||
listen 443 ssl default_server;
|
||||
|
||||
Reference in New Issue
Block a user