$i) { if ($i['name'] == $autolist) { unset($config['installedpackages']['snortglobal']['suppress']['item'][$k]); break; } } } // Finally delete the interface's config entry entirely unset($a_nat[$rulei]); } conf_mount_ro(); /* If all the Snort interfaces are removed, then unset the config array. */ if (empty($a_nat)) unset($a_nat); write_config(); sleep(2); /* if there are no ifaces remaining do not create snort.sh */ if (!empty($config['installedpackages']['snortglobal']['rule'])) snort_create_rc(); else { conf_mount_rw(); @unlink("{$rcdir}/snort.sh"); conf_mount_ro(); } sync_snort_package_config(); header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); header("Location: /snort/snort_interfaces.php"); exit; } } /* start/stop snort */ if ($_GET['act'] == 'bartoggle' && is_numeric($id)) { $snortcfg = $config['installedpackages']['snortglobal']['rule'][$id]; $if_real = snort_get_real_interface($snortcfg['interface']); $if_friendly = snort_get_friendly_interface($snortcfg['interface']); if (snort_is_running($snortcfg['uuid'], $if_real, 'barnyard2') == 'no') { log_error("Toggle (barnyard starting) for {$if_friendly}({$snortcfg['descr']})..."); sync_snort_package_config(); snort_barnyard_start($snortcfg, $if_real); } else { log_error("Toggle (barnyard stopping) for {$if_friendly}({$snortcfg['descr']})..."); snort_barnyard_stop($snortcfg, $if_real); } sleep(3); // So the GUI reports correctly header("Location: /snort/snort_interfaces.php"); exit; } /* start/stop snort */ if ($_GET['act'] == 'toggle' && is_numeric($id)) { $snortcfg = $config['installedpackages']['snortglobal']['rule'][$id]; $if_real = snort_get_real_interface($snortcfg['interface']); $if_friendly = snort_get_friendly_interface($snortcfg['interface']); if (snort_is_running($snortcfg['uuid'], $if_real) == 'yes') { log_error("Toggle (snort stopping) for {$if_friendly}({$snortcfg['descr']})..."); snort_stop($snortcfg, $if_real); header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); } else { log_error("Toggle (snort starting) for {$if_friendly}({$snortcfg['descr']})..."); /* set flag to rebuild interface rules before starting Snort */ $rebuild_rules = true; sync_snort_package_config(); $rebuild_rules = false; snort_start($snortcfg, $if_real); header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); } sleep(3); // So the GUI reports correctly header("Location: /snort/snort_interfaces.php"); exit; } $pgtitle = "Services: $snort_package_version"; include_once("head.inc"); ?> ' . $pgtitle . '

'; ?>
'; if($savemsg) print_info_box_np("{$savemsg}"); else { print_info_box_np(gettext( 'The Snort configuration has changed for one or more interfaces.
' . 'You must apply the changes in order for them to take effect.
' )); } } ?>
 
"; echo ($no_rules) ? " " : ""; } else echo strtoupper("disabled"); ?> "; } else echo strtoupper("disabled"); ?>  

    
" onclick="return intf_del()">
 
 

" . gettext("Snort Menu ") . "" . gettext("where you can see an overview of all your interface settings."); if (empty($a_nat)) { echo gettext("Please visit the ") . "" . gettext("Global Settings") . "" . gettext(" tab before adding an interface."); }?>



Click on the "> icon to add an interface.   "> "> icons will show current snort and barnyard2 status.
Click on the "> icon to edit an interface and settings.   Click on the status icons to toggle snort and barnyard2 status.
Click on the "> icon to delete an interface and settings.