aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_rules.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/snort/snort_rules.php')
-rwxr-xr-xconfig/snort/snort_rules.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index e69152c3..df17efc0 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -330,7 +330,9 @@ elseif ($_POST['clear']) {
unset($a_rule[$id]['customrules']);
write_config("Snort pkg: clear all custom rules for {$a_rule[$id]['interface']}.");
$rebuild_rules = true;
+ conf_mount_rw();
snort_generate_conf($a_rule[$id]);
+ conf_mount_ro();
$rebuild_rules = false;
$pconfig['customrules'] = '';
}
@@ -342,7 +344,9 @@ elseif ($_POST['save']) {
unset($a_rule[$id]['customrules']);
write_config("Snort pkg: save modified custom rules for {$a_rule[$id]['interface']}.");
$rebuild_rules = true;
+ conf_mount_rw();
snort_generate_conf($a_rule[$id]);
+ conf_mount_ro();
$rebuild_rules = false;
$output = "";
$retcode = "";
@@ -371,7 +375,9 @@ else if ($_POST['apply']) {
/* rules for this interface. */
/*************************************************/
$rebuild_rules = true;
+ conf_mount_rw();
snort_generate_conf($a_rule[$id]);
+ conf_mount_ro();
$rebuild_rules = false;
/* Soft-restart Snort to live-load new rules */