softflowd1.2softflowd: Settingspkg_edit.php?xml=softflowd.xml&id=0softflowdsoftflowd.shsoftflowdNetflow export daemoninstalledpackages->package->$packagename->configuration->settingsGeneral SettingslisttopicInterfaceinterfaceinterfaces_selectionPick an interface from which to collect netflow data. A separate instance of softflowd will be launched for each interface.HosthostSpecify the host to which datagrams will be sent.inputPortportEnter the port to which datagrams will be sent.inputMax FlowsmaxflowsSpecify the maximum number of flows to concurrently track before older flows are expired. Default: 8192.inputHop LimithoplimitSet the IPv4 TTL or the IPv6 hop limit to hoplimit. softflowd will use the default system TTL when exporting flows to a unicast host. When exporting to a multicast group, the default TTL will be 1 (i.e. link-local).inputNetflow versionversionSelect the desired version of the NetFlow protocol.selectFlow Tracking LevelflowtrackingSpecify which flow elements softflowd should be used to define a flow. track_level may be one of: "full" (track everything in the flow, the default), "proto" (track source and destination addresses and protocol), or "ip" (only track source and destination addresses). Selecting either of the latter options will produce flows with less information in them (e.g. TCP/UDP ports will not be recorded). This will cause flows to be consolidated, reducing the quantity of output and CPU load that softflowd will place on the system at the cost of some detail being lost.selectTimeout ValueslisttopicGeneraltimeout-general(Seconds) This is the general timeout applied to all traffic unless overridden by one of the other timeouts.inputMaximum Lifetimetimeout-maxlife(Seconds) This is the maximum lifetime that a flow may exist for. All flows are forcibly expired when they pass maxlife seconds. To disable this feature, specify a maxlife of 0.inputExpire Intervaltimeout-expint(Seconds) Specify the interval between expiry checks. Increase this to group more flows into a NetFlow packet. To disable this feature, specify a expint of 0.inputTCPtimeout-tcp(Seconds) This is the general TCP timeout, applied to open TCP connections.inputTCP RSTtimeout-tcp-rst(Seconds) This timeout is applied to a TCP connection when a RST packet has been sent by one or both endpoints.inputTCP FINtimeout-tcp-fin(Seconds) This timeout is applied to a TCP connection when a FIN packet has been sent by both endpoints.inputUDPtimeout-udp(Seconds) This is the general UDP timeout, applied to all UDP connections.input
"softflowd.sh",
"start" => $start,
"stop" => "/usr/bin/killall -9 softflowd"
)
);
/* Only try to restart if not booting */
if (!platform_booting()) {
restart_service("softflowd");
}
}
conf_mount_ro();
}
function validate_form_softflowd($post, &$input_errors) {
if (($post['host'] == "") || !is_ipaddr($post['host'])) {
$input_errors[] = 'You must specify a valid ip address in the \'Host\' field';
}
if (($post['port'] == "") || !is_port($post['port'])) {
$input_errors[] = 'You must specify a valid port number in the \'Port\' field';
}
if (($post['version'] == "" || !in_array($post['version'], array(1, 5, 9)))) {
$input_errors[] = 'You must specify a netflow version';
}
if (($post['flowtracking'] == "" || !in_array($post['flowtracking'], array("full", "proto", "ip")))) {
$input_errors[] = 'You must specify a valid flow tracking selection';
}
if (!empty($post['hoplimit']) && (!is_numeric($post['hoplimit']) || ($post['hoplimit'] < 1) || ($post['hoplimit'] > 255))) {
$input_errors[] = 'You must specify a valid hop limit';
}
if (!empty($post['timeout-general']) && (!is_numeric($post['timeout-general']) || ($post['timeout-general'] < 0))) {
$input_errors[] = 'You must specify a valid General Timeout';
}
if (!empty($post['timeout-maxlife']) && (!is_numeric($post['timeout-maxlife']) || ($post['timeout-maxlife'] < 0))) {
$input_errors[] = 'You must specify a valid Maximum Lifetime Timeout';
}
if (!empty($post['timeout-expint']) && (!is_numeric($post['timeout-expint']) || ($post['timeout-expint'] < 0))) {
$input_errors[] = 'You must specify a valid Expire Interval';
}
if (!empty($post['timeout-tcp']) && (!is_numeric($post['timeout-tcp']) || ($post['timeout-tcp'] < 0))) {
$input_errors[] = 'You must specify a valid TCP Timeout';
}
if (!empty($post['timeout-tcp-rst']) && (!is_numeric($post['timeout-tcp-rst']) || ($post['timeout-tcp-rst'] < 0))) {
$input_errors[] = 'You must specify a valid TCP RST Timeout';
}
if (!empty($post['timeout-tcp-fin']) && (!is_numeric($post['timeout-tcp-fin']) || ($post['timeout-tcp-fin'] < 0))) {
$input_errors[] = 'You must specify a valid TCP FIN Timeout';
}
if (!empty($post['timeout-udp']) && (!is_numeric($post['timeout-udp']) || ($post['timeout-udp'] < 0))) {
$input_errors[] = 'You must specify a valid UDP Timeout';
}
}
function cleanup_config_softflowd() {
global $a_pkg;
$pffconf = array();
if (is_array($a_pkg)) {
foreach($a_pkg as $cf) {
if ($cf['host'] != "") {
$pffconf = $cf;
}
}
}
$a_pkg = array();
$a_pkg[0] = $pffconf;
}
]]>
sync_package_softflowd();
validate_form_softflowd($_POST, $input_errors);
cleanup_config_softflowd();