error_log

This commit is contained in:
devdatt 2025-12-27 16:16:15 +05:30
parent 8179790744
commit f93490e959
1 changed files with 2 additions and 0 deletions

View File

@ -44,9 +44,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$tmp = explode(",", trim($value)); $tmp = explode(",", trim($value));
if (count($tmp) > 0) { if (count($tmp) > 0) {
foreach ($tmp as $ip) { foreach ($tmp as $ip) {
error_log("limit port " . $port);
exec("sudo ufw allow from " . $ip . "to any port " . $port . " proto tcp"); exec("sudo ufw allow from " . $ip . "to any port " . $port . " proto tcp");
} }
} else { } else {
error_log("allow all port " . $port);
exec("sudo ufw allow " . $port); exec("sudo ufw allow " . $port);
} }
} }