<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archiwa iftop - soban</title>
	<atom:link href="https://soban.pl/category/iftop/feed/" rel="self" type="application/rss+xml" />
	<link>https://soban.pl/category/iftop/</link>
	<description>IT, Linux, Servers, Security</description>
	<lastBuildDate>Thu, 26 Feb 2026 13:49:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>iftop as a good network traffic monitoring tool</title>
		<link>https://soban.pl/iftop-as-a-good-network-traffic-monitoring-tool/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Thu, 04 Nov 2021 15:47:42 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[iftop]]></category>
		<category><![CDATA[Kali]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=285</guid>

					<description><![CDATA[<p>iftop is a command-line tool for real-time network bandwidth monitoring. It displays a continuously updated list of network connections along with the amount of data transferred between them. Connections are shown in a table format and can be sorted by bandwidth usage. iftop provides various filtering options, allowing you to limit the output to specific [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/iftop-as-a-good-network-traffic-monitoring-tool/">iftop as a good network traffic monitoring tool</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>iftop</strong> is a command-line tool for real-time network bandwidth monitoring. It displays a continuously updated list of network connections along with the amount of data transferred between them. Connections are shown in a table format and can be sorted by bandwidth usage.</p>



<p>iftop provides various filtering options, allowing you to limit the output to specific hosts, networks, or ports. It supports IPv6 and can display source and destination IP addresses, port numbers, and protocols.</p>



<p>It is particularly useful for monitoring traffic in real time and identifying which services or hosts consume the most bandwidth. It can also help detect network performance issues and assist in troubleshooting.</p>



<p>Overall, iftop is a lightweight yet powerful tool and a valuable addition to any network administrator’s toolkit.</p>



<p>One of the most useful network monitoring tools I use is <strong>iftop</strong>. It becomes especially helpful when the network link is saturated. In practice, it can also help detect abnormal traffic patterns, including DoS attacks. In the example below, I will transfer a large file to a remote machine with a bandwidth limit and observe the traffic using iftop.</p>



<p>First, install iftop on the local machine (in this case, Kali Linux):</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># apt install iftop</pre>
</div>



<figure class="wp-block-image size-full">
<img fetchpriority="high" decoding="async" width="904" height="422" src="https://soban.pl/wp-content/uploads/2021/11/image-4.png" alt="iftop installation on kali linux" class="wp-image-286" srcset="https://soban.pl/wp-content/uploads/2021/11/image-4.png 904w, https://soban.pl/wp-content/uploads/2021/11/image-4-300x140.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-4-768x359.png 768w" sizes="(max-width: 904px) 100vw, 904px" />
</figure>



<p>The distribution does not matter — iftop is available in most Linux repositories, including Debian.</p>



<p>Now install iftop on the remote machine (Debian Linux):</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># apt install iftop</pre>
</div>



<figure class="wp-block-image size-full">
<img decoding="async" width="928" height="396" src="https://soban.pl/wp-content/uploads/2021/11/image-6.png" alt="iftop installation on debian linux" class="wp-image-288" srcset="https://soban.pl/wp-content/uploads/2021/11/image-6.png 928w, https://soban.pl/wp-content/uploads/2021/11/image-6-300x128.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-6-768x328.png 768w" sizes="(max-width: 928px) 100vw, 928px" />
</figure>



<p>To start monitoring network traffic, run iftop with the parameters <code>-PpNn</code>:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># iftop -PpNn</pre>
</div>



<figure class="wp-block-image size-full">
<img decoding="async" width="963" height="509" src="https://soban.pl/wp-content/uploads/2021/11/image-9.png" alt="iftop running example" class="wp-image-292" srcset="https://soban.pl/wp-content/uploads/2021/11/image-9.png 963w, https://soban.pl/wp-content/uploads/2021/11/image-9-300x159.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-9-768x406.png 768w" sizes="(max-width: 963px) 100vw, 963px" />
</figure>



<p>Since I am connected to the remote machine via SSH, I can see my active SSH session in the traffic list.</p>



<p>Now let’s go back to the local machine and create a large file:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># truncate -s 1G 1G-file.txt</pre>
</div>



<p>After creating the 1GB file, let’s transfer it to the remote machine with a bandwidth limit:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># scp -l 800 -P2222 1G-file.txt soban@soban.pl:~</pre>
</div>



<figure class="wp-block-image size-full">
<img loading="lazy" decoding="async" width="960" height="128" src="https://soban.pl/wp-content/uploads/2021/11/image-10.png" alt="scp transfer with bandwidth limit" class="wp-image-293" srcset="https://soban.pl/wp-content/uploads/2021/11/image-10.png 960w, https://soban.pl/wp-content/uploads/2021/11/image-10-300x40.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-10-768x102.png 768w" sizes="auto, (max-width: 960px) 100vw, 960px" />
</figure>



<p>In this example, the <code>-l 800</code> option limits the transfer rate to 800 Kbit/s. To convert this to KB/s, divide by 8. That gives approximately 100 KB/s (800 / 8 = 100).</p>



<p>To learn more about <code>scp</code> and secure file transfers over SSH, see: <a href="https://soban.pl/securely-copy-files-scp-tool-to-copying-files-by-ssh/" target="_blank" rel="noreferrer noopener"><strong>Securely Copy Files (scp) tool for copying files via SSH</strong></a>.</p>



<p>When sending the file, the traffic on the local machine (outgoing traffic) looks like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># iftop -PpNn</pre>
</div>



<figure class="wp-block-image size-full">
<img loading="lazy" decoding="async" width="957" height="354" src="https://soban.pl/wp-content/uploads/2021/11/image-11.png" alt="iftop outgoing traffic" class="wp-image-294" srcset="https://soban.pl/wp-content/uploads/2021/11/image-11.png 957w, https://soban.pl/wp-content/uploads/2021/11/image-11-300x111.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-11-768x284.png 768w" sizes="auto, (max-width: 957px) 100vw, 957px" />
</figure>



<p>At the same time, on the remote machine (incoming traffic) it looks like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block">
<pre class="urvanov-syntax-highlighter-plain-tag"># iftop -PpNn</pre>
</div>



<figure class="wp-block-image size-full">
<img loading="lazy" decoding="async" width="964" height="501" src="https://soban.pl/wp-content/uploads/2021/11/image-12.png" alt="iftop incoming traffic" class="wp-image-295" srcset="https://soban.pl/wp-content/uploads/2021/11/image-12.png 964w, https://soban.pl/wp-content/uploads/2021/11/image-12-300x156.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-12-768x399.png 768w" sizes="auto, (max-width: 964px) 100vw, 964px" />
</figure>



<p>As you can see, this approach allows you to observe both outgoing and incoming traffic in real time. Although iftop is simple, it provides powerful visibility into live network activity.</p>



<p>During brute-force attempts, you will usually observe many short-lived connections. In contrast, a DoS attack aims to saturate the bandwidth, which results in high incoming traffic. However, there are situations where traffic spikes are legitimate. In such cases, you may consider limiting connection speed — tools like iptables can help manage that effectively.</p>
<p>Artykuł <a href="https://soban.pl/iftop-as-a-good-network-traffic-monitoring-tool/">iftop as a good network traffic monitoring tool</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
