error_log

This commit is contained in:
devdatt 2025-12-27 16:25:14 +05:30
parent b4925e7659
commit e2be65baaf
1 changed files with 1 additions and 2 deletions

View File

@ -44,10 +44,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
foreach ($data as $port => $value) { foreach ($data as $port => $value) {
$tmp = explode(",", trim($value)); $tmp = explode(",", trim($value));
if (count($tmp) >= 1) { if (count($tmp) >= 1) {
print_r(count($tmp));
print_r($tmp);
foreach ($tmp as $ip) { foreach ($tmp as $ip) {
error_log("limit port " . $port); error_log("limit port " . $port);
error_log("tmp count is " . count($tmp));
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 {