From 23a13ccf066795894ce5724927c95bdecb7ebf48 Mon Sep 17 00:00:00 2001 From: Devdatt Bhatt Date: Sun, 17 May 2026 16:27:08 +0000 Subject: [PATCH] firewall gui change --- encoder/firewall.php | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/encoder/firewall.php b/encoder/firewall.php index 2afb3a4..f10326d 100755 --- a/encoder/firewall.php +++ b/encoder/firewall.php @@ -23,7 +23,7 @@ $data = $defaults; if (is_file($jsonFile)) { $stored = json_decode(file_get_contents($jsonFile), true); - if (is_array($stored)) { + if (is_array($stored)) { $data = $stored; } } @@ -38,7 +38,8 @@ if (is_file($jsonFile)) { } // Function to get UFW status -function getUfwStatus() { +function getUfwStatus() +{ $status = shell_exec("sudo ufw status"); if ($status === null) return 'disabled'; return (strpos($status, 'Status: active') !== false) ? 'enabled' : 'disabled'; @@ -86,7 +87,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ); if (count($tmp_ips) > 0) { foreach ($tmp_ips as $ip) { - exec("sudo ufw allow from " . escapeshellarg($ip)." to any port " . escapeshellarg($port) . " proto tcp"); + exec("sudo ufw allow from " . escapeshellarg($ip) . " to any port " . escapeshellarg($port) . " proto tcp"); } } else { exec("sudo ufw allow " . escapeshellarg($port)); @@ -132,23 +133,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { window.onload = attachValidation;
- -
-
- - ● - -
-
- -
-
-
+ +
+
+ + ● + +
+
+ +
+
+

Limit Access