From 04ecb6af86597cd7963f139367421e01a6fe5388 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 19 Nov 2006 20:26:55 +0000 Subject: * Restart snort after filter changes * Flush snort2c table after filter changes --- packages/snort/snort_dynamic_ip_reload.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3