From 95b583ca4bc7f23ae5cdb1e8891aff982db0cf4a Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 28 Jan 2013 15:56:39 +0100 Subject: Run update if settings are saved during reinstall --- config/snort/snort.inc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 9f122d7d..ace1c89c 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -446,17 +446,11 @@ function snort_postinstall() { if (file_exists('/usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example.so')) exec('/bin/rm /usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example*'); - /* - mwexec("/usr/sbin/chown -R snort:snort /var/log/snort", true); - mwexec("/usr/sbin/chown -R snort:snort {$snortdir}", true); - mwexec('/usr/sbin/chown -R snort:snort /usr/local/lib/snort', true); - mwexec('/usr/sbin/chown snort:snort /tmp/snort*', true); - */ - /* remake saved settings */ if ($config['installedpackages']['snortglobal']['forcekeepsettings'] == 'on') { update_status(gettext("Saved settings detected...")); update_output_window(gettext("Please wait... rebuilding files...")); + @include_once("/usr/local/pkg/snort/snort_check_for_rule_updates.php"); sync_snort_package_config(); update_output_window(gettext("Finnished Rebuilding files...")); } -- cgit v1.2.3 From 6eb7ddf66bf8f40a8981a25353bc8a99558eefcd Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 29 Jan 2013 17:19:26 +0100 Subject: Use subnet of interface here to have HOME_NET set properly --- config/snort/snort.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index ace1c89c..dede1f1d 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -147,8 +147,13 @@ function snort_build_list($snortcfg, $listname = "", $whitelist = false) { $home_net .= "{$snortip} "; if (function_exists('get_interface_ipv6')) { $snortip = get_interface_ipv6($snortcfg['interface']); - if (is_ipaddrv6($snortip)) - $home_net .= "{$snortip} "; + if (is_ipaddrv6($snortip)) { + if ($whitelist === false) { + $sn = get_interface_subnet($int); + $home_net .= "{$subnet}/{$sn} "; + } else + $home_net .= "{$subnet} "; + } } /* iterate through interface list and write out whitelist items -- cgit v1.2.3 From 7f9b922b709063e69dfa117883169c4b04a2b5a8 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 29 Jan 2013 22:00:21 +0100 Subject: Make sure to record the schedule changes --- config/snort/snort_interfaces_global.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort_interfaces_global.php b/config/snort/snort_interfaces_global.php index eb371119..9dde8aaf 100644 --- a/config/snort/snort_interfaces_global.php +++ b/config/snort/snort_interfaces_global.php @@ -75,11 +75,11 @@ if (!$input_errors) { $retval = 0; - write_config(); - /* create whitelist and homenet file then sync files */ sync_snort_package_config(); + write_config(); + /* forces page to reload new settings */ header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); -- cgit v1.2.3