curvetun: Fix issues detected by the Coverity scanner
[netsniff-ng.git] / flowtop.8
blob11dd769737311feaab542b555dca44715d20f4a9
1 .\" netsniff-ng - the packet sniffing beast
2 .\" Copyright 2013 Daniel Borkmann.
3 .\" Subject to the GPL, version 2.
4 .TH FLOWTOP 8 "03 March 2013" "Linux" "netsniff-ng toolkit"
5 .SH NAME
6 flowtop \- top-like netfilter TCP/UDP/SCTP/DCCP/ICMP(v6) flow tracking
7 .PP
8 .SH SYNOPSIS
9 .PP
10 \fBflowtop\fR { [\fIoptions\fR] }
11 .PP
12 .SH DESCRIPTION
13 .PP
14 flowtop is a top-like connection tracking tool that can run on an end host or
15 small home router. It is able to present TCP, UDP/UDP-lite, SCTP, DCCP, and
16 ICMP(v6) flows that have been collected by the kernel's netfilter connection
17 tracking framework, thus no packet capturing in user space needs to be done.
18 .PP
19 flowtop is able to give you a quick overview of current connections on your
20 local system, e.g. for debugging purposes or to answer questions like:
21 .PP
22     * If you access website X, what other connections are being opened in
23       the background that I'm not aware of?
24     * What connections are active that pass one's router?
25     * I have this proprietary binary Y, to where does it connect?
26     * To which countries am I sending data?
27     * Are there any suspicious background connections on my machine?
28     * How many active connections does binary Y have?
29     * How long are connections active already?
30 .PP
31 The following information will be presented in flowtop's output:
32 .PP
33     * Application name and PID when run on local machine
34     * Reverse DNS for source and destination
35     * Geo-location information (country, city)
36     * Used protocols (IPv4, IPv6, TCP, UDP, SCTP, ICMP, ...)
37     * Flow port's service name heuristic
38     * Transport protocol state machine information
39     * Byte/packet counters (if they are enabled)
40     * Connection duration (if timestamping is enabled)
41 .PP
42 In order for flowtop to work, netfilter must be active and running
43 on your machine, thus kernel-side connection tracking is active. If netfilter
44 is not running, you can activate it with iptables(8):
45 .in +4
46 .sp
47 iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT
48 .sp
49 iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT
50 .in -4
51 .PP
52 To dump byte/packet counters flowtop enables the sysctl(8) parameter
53 \[lq]net.netfilter.nf_conntrack_acct\[rq] via:
54 .in +4
55 .sp
56 echo 1 > /proc/sys/net/netfilter/nf_conntrack_acct
57 .sp
58 .in -4
59 and resets it to the previously set value on exit. These counters will only be
60 active on connections which were created after accounting was enabled. Thus, to
61 have these counters be active all the time the parameter should be enabled after
62 the system is up. To automatically enable it, sysctl.conf(8) or sysctl.d(8)
63 might be used.
64 .PP
65 To calculate the connection duration flowtop enables the sysctl(8) parameter
66 \[lq]net.netfilter.nf_conntrack_timestamp\[rq] via:
67 .in +4
68 .sp
69 echo 1 > /proc/sys/net/netfilter/nf_conntrack_timestamp
70 .sp
71 .in -4
72 and resets it to the previously set value on exit.
73 .PP
74 flowtop's intention is just to get a quick look over your active connections.
75 If you want logging support, have a look at netfilter's conntrack(8) tools
76 instead.
77 .PP
78 .SH OPTIONS
79 .PP
80 .SS -4, --ipv4
81 Display IPv4 flows. That is the default when flowtop is started without
82 any arguments.
83 .PP
84 .SS -6, --ipv6
85 Display IPv6 flows. That is the default when flowtop is started without
86 any arguments.
87 .PP
88 .SS -T, --tcp
89 Display TCP flows. That is the default when flowtop is started without
90 any arguments.
91 .PP
92 .SS -U, --udp
93 Display UDP and UDP-lite flows.
94 .PP
95 .SS -D, --dccp
96 Display DCCP flows.
97 .PP
98 .SS -I, --icmp
99 Display ICMP version 4 and version 6 flows.
101 .SS -S, --sctp
102 Display SCTP flows.
104 .SS -s, --show-src
105 Also show source information of the flow, not only destination information.
107 .SS -u, --update
108 The built-in database update mechanism will be invoked to get Maxmind's
109 latest database. To configure search locations for databases, the file
110 /etc/netsniff-ng/geoip.conf contains possible addresses. Thus, to save
111 bandwidth or for mirroring Maxmind's databases (to bypass their traffic
112 limit policy), different hosts or IP addresses can be placed into geoip.conf,
113 separated by a newline.
115 .SS -v, --version
116 Show version information and exit.
118 .SS -h, --help
119 Show user help and exit.
121 .SH USAGE EXAMPLE
123 .SS flowtop
124 Default ncurses output for flowtop that tracks IPv4, IPv6 flows for TCP.
126 .SS flowtop -46UTDISs
127 This example enables the maximum display options for flowtop.
129 .SH CONFIG FILES
131 Files under /etc/netsniff-ng/ can be modified to extend flowtop's
132 service resolution and lookup information.
134     * tcp.conf - TCP port/services map
135     * udp.conf - UDP port/services map
136     * geoip.conf - GeoIP database mirrors
138 .SH BUGS
139 With a fairly high rate of connection tracking updates, flowtop can become
140 unresponsive for short periods of time while scrolling. The right fix would
141 be to replace flowtop's connection management backend with a better design
142 with respect to the locking approach. This is still on the "todo" list.
144 .SH LEGAL
145 flowtop is licensed under the GNU GPL version 2.0.
147 .SH HISTORY
148 .B flowtop
149 was originally written for the netsniff-ng toolkit by Daniel Borkmann. It
150 is currently maintained by Tobias Klauser <tklauser@distanz.ch> and Daniel
151 Borkmann <dborkma@tik.ee.ethz.ch>.
153 .SH SEE ALSO
154 .BR netsniff-ng (8),
155 .BR trafgen (8),
156 .BR mausezahn (8),
157 .BR ifpps (8),
158 .BR bpfc (8),
159 .BR astraceroute (8),
160 .BR curvetun (8),
161 .BR iptables (8),
162 .BR sysctl (8),
163 .BR sysctl.conf (8),
164 .BR sysctl.d (8)
166 .SH AUTHOR
167 Manpage was written by Daniel Borkmann.
169 .SH COLOPHON
170 This page is part of the Linux netsniff-ng toolkit project. A description of the project,
171 and information about reporting bugs, can be found at http://netsniff-ng.org/.