aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/snort_interfaces_global.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/snort-dev/snort_interfaces_global.php')
-rw-r--r--config/snort-dev/snort_interfaces_global.php33
1 files changed, 30 insertions, 3 deletions
diff --git a/config/snort-dev/snort_interfaces_global.php b/config/snort-dev/snort_interfaces_global.php
index 9ee1a204..d6e8679d 100644
--- a/config/snort-dev/snort_interfaces_global.php
+++ b/config/snort-dev/snort_interfaces_global.php
@@ -31,6 +31,7 @@
$pgtitle = "Services:[Snort][Global Settings]";
require("guiconfig.inc");
+require("/usr/local/pkg/snort/snort.inc");
/* make things short */
$pconfig['snortdownload'] = $config['installedpackages']['snortglobal']['snortdownload'];
@@ -42,6 +43,7 @@ $pconfig['whitelistvpns'] = $config['installedpackages']['snortglobal']['whiteli
$pconfig['clickablalerteurls'] = $config['installedpackages']['snortglobal']['clickablalerteurls'];
$pconfig['associatealertip'] = $config['installedpackages']['snortglobal']['associatealertip'];
+
if ($_POST) {
unset($input_errors);
@@ -111,13 +113,38 @@ if ($_POST) {
$config['installedpackages']['snortglobal']['associatealertip'] = $_POST['associatealertip'] ? on : off;
write_config();
+ sleep(2);
$retval = 0;
- config_lock();
- $retval = captiveportal_configure();
- config_unlock();
+ /* set the snort block hosts time IMPORTANT */
+ $snort_rm_blocked_info_ck = $config['installedpackages']['snortglobal']['rm_blocked'];
+ if ($snort_rm_blocked_info_ck == "never_b")
+ $snort_rm_blocked_false = "";
+ else
+ $snort_rm_blocked_false = "true";
+
+ if ($snort_rm_blocked_info_ck != "")
+ {
+ snort_rm_blocked_install_cron("");
+ snort_rm_blocked_install_cron($snort_rm_blocked_false);
+ }
+
+ /* set the snort rules update time */
+ $snort_rules_up_info_ck = $config['installedpackages']['snortglobal']['autorulesupdate7'];
+ if ($snort_rules_up_info_ck == "never_up")
+ $snort_rules_up_false = "";
+ else
+ $snort_rules_up_false = "true";
+ if ($snort_rules_up_info_ck != "")
+ {
+ snort_rules_up_install_cron("");
+ snort_rules_up_install_cron($snort_rules_up_false);
+ }
+
+
+
$savemsg = get_std_save_message($retval);
}
}