Fix: permissions and ACLs for www-data on /etc/asterisk, fail2ban filters and logs, and AMI diagnostics loading

This commit is contained in:
sorcier committed 2026-11-02 04:12:29 +01:00
1 parent 563a01e3c3
commit cbc9fe7f29
4 files changed
+95 -22

No files matched your search

+5 -3
View File
@@ -291,8 +291,6 @@ ignoreip = {$whitelist}
findtime = {$sipFindTime}
bantime = {$sipBanTime}
maxretry = {$sipMaxRetry}
banaction = nftables-multiport
banaction_allports = nftables-allports
[sshd]
enabled = true
@@ -306,7 +304,7 @@ bantime = 3600
[asterisk]
enabled = true
filter = asterisk
logpath = /var/log/asterisk/security.log
logpath = /var/log/asterisk/messages
maxretry = {$sipMaxRetry}
findtime = {$sipFindTime}
bantime = {$sipBanTime}
@@ -326,6 +324,8 @@ protocol = tcp
EOF;
file_put_contents(self::JAIL_LOCAL_PATH, $conf);
@chgrp(self::JAIL_LOCAL_PATH, 'asterisk');
@chmod(self::JAIL_LOCAL_PATH, 0664);
}
/**
@@ -477,6 +477,8 @@ EOF;
$fullNginxConfig = $port80Block . "\n\n" . $phonebookBlock . "\n\n" . $httpsBlock . "\n";
file_put_contents(self::NGINX_CONF_PATH, $fullNginxConfig);
@chgrp(self::NGINX_CONF_PATH, 'asterisk');
@chmod(self::NGINX_CONF_PATH, 0664);
// Test de syntaxe
exec('sudo /usr/sbin/nginx -t 2>&1', $tOut, $tCode);