$i) { if ($i['name'] == $autolist) { unset($config['installedpackages']['suricata']['suppress']['item'][$k]); break; } } } // Finally delete the interface's config entry entirely unset($a_nat[$rulei]); } conf_mount_ro(); /* If all the Suricata 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 suricata.sh */ if (!empty($config['installedpackages']['suricata']['rule'])) suricata_create_rc(); else { conf_mount_rw(); @unlink("{$rcdir}/suricata.sh"); conf_mount_ro(); } sync_suricata_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: /suricata/suricata_interfaces.php"); exit; } } /* start/stop Barnyard2 */ if ($_GET['act'] == 'bartoggle' && is_numeric($id)) { $suricatacfg = $config['installedpackages']['suricata']['rule'][$id]; $if_real = get_real_interface($suricatacfg['interface']); $if_friendly = convert_friendly_interface_to_friendly_descr($suricatacfg['interface']); if (suricata_is_running($suricatacfg['uuid'], $if_real, 'barnyard2') == 'no') { log_error("Toggle (barnyard starting) for {$if_friendly}({$suricatacfg['descr']})..."); sync_suricata_package_config(); suricata_barnyard_start($suricatacfg, $if_real); } else { log_error("Toggle (barnyard stopping) for {$if_friendly}({$suricatacfg['descr']})..."); suricata_barnyard_stop($suricatacfg, $if_real); } sleep(3); // So the GUI reports correctly header("Location: /suricata/suricata_interfaces.php"); exit; } /* start/stop Suricata */ if ($_GET['act'] == 'toggle' && is_numeric($id)) { $suricatacfg = $config['installedpackages']['suricata']['rule'][$id]; $if_real = get_real_interface($suricatacfg['interface']); $if_friendly = convert_friendly_interface_to_friendly_descr($suricatacfg['interface']); if (suricata_is_running($suricatacfg['uuid'], $if_real) == 'yes') { log_error("Toggle (suricata stopping) for {$if_friendly}({$suricatacfg['descr']})..."); suricata_stop($suricatacfg, $if_real); } else { log_error("Toggle (suricata starting) for {$if_friendly}({$suricatacfg['descr']})..."); // set flag to rebuild interface rules before starting Snort $rebuild_rules = true; sync_suricata_package_config(); $rebuild_rules = false; suricata_start($suricatacfg, $if_real); } sleep(3); // So the GUI reports correctly 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: /suricata/suricata_interfaces.php"); exit; } $pgtitle = "Services: Suricata Intrusion Detection System"; include_once("head.inc"); ?> ' . $pgtitle . '

'; ?>
 
"; echo ($no_rules) ? " " : ""; } else echo gettext("DISABLED"); ?> "; } else echo gettext("DISABLED"); ?>  

    
" onclick="return intf_del()">
 
 

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



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