curvetun, astraceroute: don't show header as in netsniff-ng
[netsniff-ng.git] / Documentation / Flowtop
blobc90130a191e796a8e0b30e5d0fbecc89976db18f
1 What is flowtop?
2 ////////////////
4 flowtop is a top-like connection tracking tool that can run on an end host or
5 router. It is able to present TCP or UDP flows that have been collected by the
6 kernel space netfilter framework. Hence, to enable flowtop you must have
7 netfilter/iptables running in some way. For instance, a minimal config to start
8 with could be:
10   iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT
11   iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT
13 Then, flowtop will receive flow information from the kernel. Unlike other tools
14 that use libpcap for sniffing all network traffic and performing connection
15 tracking, we let the kernel do this job in the first place. Hence, only data
16 gets transferred from kernel space to user space that is really relevant. The
17 communication between address spaces is performed by netlink that is
18 incorporated by libnetfilter-conntrack.
20 A typical output of flowtop with TCP flows can be seen here (note: line breaks
21 have been introduced for a better readability; reverse DNS of flow source has
22 been removed and marked with '****'):
24 Kernel netfilter TCP/UDP flow statistics, [+0]
26   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
27      ****:41536 (Norway, Oslo) =>
28         mil01s07-in-f30.1e100.net:80 (United States, N/A)
29   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
30      ****:35029 (Norway, Oslo) =>
31         a195-176-255-146.deploy.akamaitechnologies.com:443 (Switzerland, N/A)
32   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
33      ****:35028 (Norway, Oslo) =>
34         a195-176-255-146.deploy.akamaitechnologies.com:443 (Switzerland, N/A)
35   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
36      ****:35027 (Norway, Oslo) =>
37         a195-176-255-146.deploy.akamaitechnologies.com:443 (Switzerland, N/A)
38   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
39      ****:35026 (Norway, Oslo) =>
40         a195-176-255-146.deploy.akamaitechnologies.com:443 (Switzerland, N/A)
41   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
42      ****:35025 (Norway, Oslo) =>
43         a195-176-255-146.deploy.akamaitechnologies.com:443 (Switzerland, N/A)
44   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
45      ****:35024 (Norway, Oslo) =>
46         a195-176-255-146.deploy.akamaitechnologies.com:443 (Switzerland, N/A)
47   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:https ->
48      ****:34535 (Norway, Oslo) =>
49         github.com:443 (United States, N/A)
50   [11001/chromium-browser]:ipv4:tcp[ESTABLISHED]:http ->
51      ****:40710 (Norway, Oslo) =>
52         mil01s16-in-f31.1e100.net:80 (United States, N/A)
53   [11001/chromium-browser]:ipv4:tcp[TIME_WAIT]:http ->
54      ****:40711 (Norway, Oslo) =>
55         mil01s16-in-f31.1e100.net:80 (United States, N/A)
56   [11001/chromium-browser]:ipv4:tcp[CLOSE]:http ->
57      ****:36152 (Norway, Oslo) =>
58         mil01s16-in-f24.1e100.net:80 (United States, N/A)
60 What you can see in a single line is the following:
61  - PID and process name on your host, if available
62  - If it's not available (i.e. on a router), it will say 'bridged(?)'
63  - Internet protocol (ipv4, ipv6)
64  - Transport protocol (tcp, udp, icmp, ...)
65  - Connection state (of TCP in particular)
66  - Estimated protocol (http, https, ssh, ...)
67  - Reverse DNS and Port of flow source
68  - Country and City if available of flow source
69  - Reverse DNS and Port of flow destination
70  - Country and City if available of flow destination
72 All lines in flowtop are sorted by connection state. If the list of flows exceed
73 the number of visible lines on your terminal, you can scroll up or down with
74 your arrow keys.