diff options
author | Renato Botelho <renato@netgate.com> | 2015-07-15 13:42:22 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-07-15 13:42:22 -0300 |
commit | 2a323a0e26f769ad71ca75763fe88812d24c1acf (patch) | |
tree | f1f76faf0d824439bb88642b0d9e81ddbb2460a0 /config/snort/snort_preprocessors.php | |
parent | d80e45e5c937c8b7c2571da35c5beab17b667f6d (diff) | |
parent | 4106c494cdc49668e23a4bae378edc69521468bb (diff) | |
download | pfsense-packages-2a323a0e26f769ad71ca75763fe88812d24c1acf.tar.gz pfsense-packages-2a323a0e26f769ad71ca75763fe88812d24c1acf.tar.bz2 pfsense-packages-2a323a0e26f769ad71ca75763fe88812d24c1acf.zip |
Merge pull request #900 from bmeeks8/snort-3.2.6
Diffstat (limited to 'config/snort/snort_preprocessors.php')
-rwxr-xr-x | config/snort/snort_preprocessors.php | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php index 9f6879ef..dd8ec660 100755 --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -80,6 +80,18 @@ $pconfig = array(); if (isset($id) && isset($a_nat[$id])) { $pconfig = $a_nat[$id]; + // Initialize multiple config engine arrays for supported preprocessors if necessary + if (!is_array($pconfig['frag3_engine']['item'])) + $pconfig['frag3_engine']['item'] = array(); + if (!is_array($pconfig['stream5_tcp_engine']['item'])) + $pconfig['stream5_tcp_engine']['item'] = array(); + if (!is_array($pconfig['http_inspect_engine']['item'])) + $pconfig['http_inspect_engine']['item'] = array(); + if (!is_array($pconfig['ftp_server_engine']['item'])) + $pconfig['ftp_server_engine']['item'] = array(); + if (!is_array($pconfig['ftp_client_engine']['item'])) + $pconfig['ftp_client_engine']['item'] = array(); + /************************************************************/ /* To keep new users from shooting themselves in the foot */ /* enable the most common required preprocessors by default */ @@ -451,6 +463,12 @@ if ($_POST['save']) { $input_errors[] = gettext("The value for Application ID Stats Period must be between 60 and 3600."); } + // Validate Portscan Ignore_Scanners parameter + if ($_POST['sf_portscan'] == 'on' && is_alias($_POST['pscan_ignore_scanners'])) { + if (trim(filter_expand_alias($_POST["def_{$key}"])) == "") + $input_errors[] = gettext("FQDN aliases are not supported in Snort for the PORTSCAN IGNORE_SCANNERS parameter."); + } + /* if no errors write to conf */ if (!$input_errors) { /* post new options */ @@ -569,6 +587,9 @@ if ($_POST['save']) { !empty($natent['host_attribute_data'])) snort_reload_config($natent, "SIGURG"); + /* Sync to configured CARP slaves if any are enabled */ + snort_sync_on_changes(); + /* after click go to this page */ header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); @@ -1500,10 +1521,10 @@ if ($savemsg) { <?php $values = array('Credit Card', 'Email Addresses', 'U.S. Phone Numbers', 'U.S. Social Security Numbers'); foreach ($values as $val): ?> - <option value="<?=$val;?>" - <?php if (preg_match("/$val/",$pconfig['sdf_alert_data_type'])) echo "selected"; ?>> + <option value="<?=$val;?>" + <?php if (strpos($pconfig['sdf_alert_data_type'], $val) !== FALSE) echo "selected"; ?>> <?=gettext($val);?></option> - <?php endforeach; ?> + <?php endforeach; ?> </select><br/><?php echo gettext("Choose which types of sensitive data to detect. Use CTRL + Click for multiple selections."); ?><br/> </td> </tr> |