FLOW-FILTER(1)
π FLOW-FILTER, bestie π
okay so real talk: this is the manpage for flow-filter(1), and it is exactly the little gremlin you want when you've got a big pile of flows and you're like "no, not those ones, only the cute ones." Filtering flows, that's the whole gig. Let's get into it π¦
β¨ SYNOPSIS β¨
flow-filter [ -hko ] [ -a src_as_filter ] [ -A dst_as_filter ] [ -b big|little ] [ -C comment ] [ -D dstaddr_filter_name ] [ -d debug_level ] [ -e exaddr_filter ] [ -f acl_fname ] [ -i input_filter ] [ -I output_filter ] [ -p srcport_filter ] [ -P dstport_filter ] [ -r ipprot_filter ] [ -S srcaddr_filter_name ] [ -t tos_filter ] [ -T tcp_flags_filter ] [ -x nexthop_filter_name ] [ -z z_level ]
πΈ DESCRIPTION πΈ
so flow-filter is the utility that filters flows based on criteria you pick. main character energy, you choose. π
the IP address filters live in flow.acl, or in whatever filename you point at with -f.
other filters, like input interface and ports, you just define right there on the command line. and here's the fun part: those filters accept range and negation operators. like:
-i1-15β input interfaces 1 through 15-i1,15β input interfaces 1 and 15!1,15β NOT input interfaces 1 and 15
ngl the syntax is kludgy and honestly needs reworked, but it works for most applications. it's giving "we'll fix it later" and later never came π periodt.
π OPTIONS π
-asrc_as_filter β source AS filter. like-a159to permit Autonomous System 159.-Adst_as_filter β destination AS filter. like-A159,3112to permit Autonomous Systems 159 and 3112.-bbig|little β byte order of the output.-CComment β add a comment. lil note for the girlies π-ddebug_level β turn on debugging.-Ddstaddr_filter_name β destination IP address filter. this is the name or number of a standard access list defined inflow.aclor in the file you gave to-f.-eexaddr_filter β exporter IP address filter. one exporter address can be filtered. just the one, bestie.-facl_fname β access list filename. defaults toflow.acl.-hβ display help. your little rescue button π«Ά-iinput_filter β input interface filter. like-i0to permit traffic from interface 0.-kβ keep time from input.-Ioutput_filter β output interface filter. like-I0to permit traffic to interface 0.-oβ logical OR instead of AND filters. switch the vibe from "all of these" to "any of these."-psrcport_filter β source port filter. like-p80to only permit source port 80.-Pdstport_filter β destination port filter. like-P80,8080to permit destination ports 80 and 8080.-ripprot_filter β IP Protocol filter. like-r6to only permit TCP traffic.-Ssrcaddr_filter_name β source IP address filter. this is the name or number of a standard access list defined inflow.aclor in the file you gave to-f.-ttos_filter β ToS bits filter. there's an optional mask you can use, and it gets applied to the tos field before comparing to the filter list. example: to match a tos bit pattern of101xxxxx, use0xA0/0xE0.-Ttcp_flags_filter β TCP bits filter. again, optional mask, applied to the TCP flags field before comparing to the filter list. example: to match flows with the SYN bit set, use0x2/0x2.-xnexthop_filter_name β NextHop IP address filter. this is the name or number of a standard access list defined inflow.aclor in the file you gave to-f.-zz_level β configure compression level to z_level.0is disabled (no compression),9is highest compression. glow-up for your file sizes π₯
π EXAMPLES π
print all traffic with a destination port of 80.
flow-cat /flows/krc4 | flow-filter -P80 | flow-print
print all traffic with with source IP 10.0.0.1. (yes the original says "with with", we're keeping the lore, no cap π) populate flow.acl with:
ip access-list standard badguy permit host 10.0.0.1
then:
flow-cat /flows/krc4 | flow-filter -Sbadguy | flow-print
report all destinations that IP 10.0.0.1 has sent traffic to. sort by octets. populate flow.acl with:
ip access-list standard badguy permit host 10.0.0.1
then:
flow-cat /flows/krc4 | flow-filter -Sbadguy | flow-stat -f8 -S2
π BUGS π
- extended access lists are not fully implemented. not me finding the unfinished part π
- the command line filter syntax is a kludge. (we said it, they said it, everybody knows π)
π NOTES π
use flow-nfilter. that's it, that's the note. the older sibling said what it said π
π«Ά AUTHOR π«Ά
Mark Fullmer <maf@splintered.net>
π₯ SEE ALSO π₯
and that's the whole page, bestie β¨ this lil icon was dated 26 ΠΠ²Π³ΡΡΡ 2010 (that's August 26, 2010, and yes it's serving multilingual queen energy π) β it shipped as part of the flow-tools collection, and honestly? still iconic. go filter something. slay πππ¦
π¦ where this page comes from
- fedora 43: flow-tools 0.68.5.1-45.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: flow-tools 0.68.5.1-45.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: flow-tools 0.68.5.1-46.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: flow-tools 0.68.5.1-46.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms