mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Firewall with Fail2ban support
This commit is contained in:
parent
f6926670fe
commit
357eb42647
27 changed files with 936 additions and 50 deletions
31
web/delete/firewall/banlist/index.php
Normal file
31
web/delete/firewall/banlist/index.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Check user
|
||||
if ($_SESSION['user'] != 'admin') {
|
||||
header("Location: /list/user");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ((!empty($_GET['ip'])) && (!empty($_GET['chain']))) {
|
||||
$v_ip = escapeshellarg($_GET['ip']);
|
||||
$v_chain = escapeshellarg($_GET['chain']);
|
||||
exec (VESTA_CMD."v-delete-firewall-ban ".$v_ip." ".$v_chain, $output, $return_var);
|
||||
}
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
|
||||
$back = $_SESSION['back'];
|
||||
if (!empty($back)) {
|
||||
header("Location: ".$back);
|
||||
exit;
|
||||
}
|
||||
|
||||
header("Location: /list/firewall/banlist/");
|
||||
exit;
|
Loading…
Add table
Add a link
Reference in a new issue