aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort_dynamic_ip_reload.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/snort/snort_dynamic_ip_reload.php b/packages/snort/snort_dynamic_ip_reload.php
index 91498112..49f509b4 100644
--- a/packages/snort/snort_dynamic_ip_reload.php
+++ b/packages/snort/snort_dynamic_ip_reload.php
@@ -34,11 +34,15 @@ log_error("[SNORT] Snort_dynamic_ip_reload.php is starting.");
require_once("/usr/local/pkg/snort.inc");
require_once("service-utils.inc");
+require_once("config.inc");
if($config['interfaces']['wan']['ipaddr'] == "pppoe" or
$config['interfaces']['wan']['ipaddr'] == "dhcp") {
+ log_error("Dynamic WAN interface present. Restarting snort due to filter changes.");
create_snort_conf();
+ stop_service("snort");
+ mwexec("/sbin/pfctl -t snort2c -T flush");
+ start_service("snort");
}
-
?> \ No newline at end of file