aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/snort_interfaces_global.php
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2009-12-08 17:28:18 -0800
committerrobiscool <robrob2626@yahoo.com>2009-12-08 17:28:18 -0800
commit593b06c24de03f6a6d44e13e2849451cd088062b (patch)
treee301f60dc0eb6c1a5eead9a93433eebf58f6490c /config/snort-dev/snort_interfaces_global.php
parentda1daf005f921ef728759f618101967e4cc038d8 (diff)
downloadpfsense-packages-593b06c24de03f6a6d44e13e2849451cd088062b.tar.gz
pfsense-packages-593b06c24de03f6a6d44e13e2849451cd088062b.tar.bz2
pfsense-packages-593b06c24de03f6a6d44e13e2849451cd088062b.zip
snort-dev, add code to enable updates and remove block times, add repost rulesets.
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);
}
}