This Article Describes How To Inspect NetFlow Data With Nfcapd and Nfdump
This Article Describes How To Inspect NetFlow Data With Nfcapd and Nfdump
Background
In the article Collect and save NetFlow data with FreeBSD I describe what NetFlow is and
how to collect and store NetFlow using FreeBSD. But without an efficient way to inspect
the data it is practically useless.
Using nfdump
nfdump uses a filtering syntax that is similar to bpf-syntax (the one tcpdump uses). This
means that everyone familiar with tcpdump could get started rather quickly. For example:
Often you want to sort on a specific metric, for example “which hosts have the most traffic
on port 53”, this can be done using the statistics option -s
Another really useful feature is aggregation. This can be used to aggregate all flow records
over a specific set of parameters. The below example uses option -A to aggregate all flows
where srcip and dstip are the same and then filters out a specific host of interest. In other
words “Who has been talking to host x”
If you want to see flows for a specific timeframe you can use the -t option like this
You can also change the output format to suit your needs. The formatting syntax are a little
bit unintuitive (at least I haven’t seen it before) so you may have to reference the manual
Flow records by them self have no sense of sessions and are unidirectional. If you want to
see data for bidirectional flows you can tell nfdump to aggregate on bidirectional flows us‐
ing -b or -B
This was a short introduction on how to inspect netflow data with nfdump. Please leave a
comment if you have any questions or suggestions.
Write a Comment
WEBMENTIONS
[…] Reading flow data can be done using the tool nfdump. You can find my article about it here: Inspecting
NetFlow data with nfdump […]