mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
Firewall with Fail2ban support
This commit is contained in:
parent
f6926670fe
commit
357eb42647
27 changed files with 936 additions and 50 deletions
|
@ -22,7 +22,7 @@ if (empty($_GET['rule'])) {
|
|||
|
||||
// List rule
|
||||
$v_rule = escapeshellarg($_GET['rule']);
|
||||
exec (VESTA_CMD."v-list-sys-firewall-rule ".$v_rule." 'json'", $output, $return_var);
|
||||
exec (VESTA_CMD."v-list-firewall-rule ".$v_rule." 'json'", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
|
@ -56,7 +56,7 @@ if (!empty($_POST['save'])) {
|
|||
$v_comment = escapeshellarg($_POST['v_comment']);
|
||||
|
||||
// Change Status
|
||||
exec (VESTA_CMD."v-change-sys-firewall-rule ".$v_rule." ".$v_action." ".$v_protocol." ".$v_port." ".$v_ip." ".$v_comment, $output, $return_var);
|
||||
exec (VESTA_CMD."v-change-firewall-rule ".$v_rule." ".$v_action." ".$v_ip." ".$v_port." ".$v_protocol."".$v_comment, $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue