Fix: harmonize Firewall and Fail2ban status, decouple strict mode and fix installer jail generation
This commit is contained in:
1 parent
8bbeb9caae
commit
8b57981b1b
6 files changed
+69
-121
No files matched your search
@@ -135,10 +135,10 @@ class SystemMetrics
|
||||
$nginxActive = ($lines[1] ?? '') === 'active';
|
||||
$phpActive = ($lines[2] ?? '') === 'active';
|
||||
$f2bActive = ($lines[3] ?? '') === 'active' || !empty($fwStatus['is_running']);
|
||||
$isF2bRunning = !empty($fwStatus['is_running']) && (($lines[3] ?? '') === 'active');
|
||||
$fwEnabled = !empty($fwStatus['settings']['firewall_enabled']) && $isF2bRunning;
|
||||
$fwEnabled = !empty($fwStatus['settings']['firewall_enabled']) && $nginxActive;
|
||||
|
||||
$adminPort = $fwStatus['settings']['admin_https_port'] ?? 8443;
|
||||
$isStrictPort80 = !empty($fwStatus['settings']['certbot_strict_port80']);
|
||||
|
||||
return [
|
||||
[
|
||||
@@ -180,7 +180,7 @@ class SystemMetrics
|
||||
[
|
||||
'id' => 'firewall',
|
||||
'name' => 'Pare-feu & Filtrage',
|
||||
'desc' => $fwEnabled ? 'Règles actives & Isolation 80' : 'Inactif (Tout autoriser)',
|
||||
'desc' => $fwEnabled ? ($isStrictPort80 ? 'Mode Strict (Port 80 Isolé)' : 'Filtrage Nginx & Ports Actif') : 'Inactif (Tout autoriser)',
|
||||
'port' => 'Filtrage IP & Nginx',
|
||||
'active' => $fwEnabled,
|
||||
'status_text' => $fwEnabled ? 'Filtrage Actif' : 'Inactif',
|
||||
|
||||
Reference in new issue
Block a user