IPTraf is a network monitoring utility in linux that we can use to monitor IP traffic passing over the network. By using this tool, we can we can monitor various connections like TCP, UDP, ICMP, non-IP counts and also Ethernet load information etc.
you can install IPtraf using the following command:
#apt install iptraf
Once it is installed, you can run the following command to launch a menu driven interface that allows to view and modify network monitoring options
It will come up in interactive mode, with the various facilities that can be accessed through the main menu as shown below:
To monitor the ip traffic, you can select the “ip traffic monitor” option or run the following commands in the terminal
To view the ip traffic for a single interface:
#iptraf-ng -I <interface_name>
To view the ip traffic for all interfaces:
#iptraf-ng -I all
To see general statistics for interfaces:
You can run the following command to see the detailed statistics for a single interface:
#iptraf-ng -d <interface_name>
You can also monitor TCP/UDP traffic on a specific interface, using the following command.
#iptraf -s <interface_name>
IPtraf gives you an option to display the size of the packets and the count on an interface.
#iptraf-ng -z <interface_name>
Run the following command to start the Lan station monitor:
#iptraf -I <interface_name>
You can specify an alternate log file for any direct invocation of a facility from the terminal. The log will be placed in /var/log/iptraf if the path is not specified.
#iptraf -L <path>
If you only need to run Iptraf for a specific number of minutes, you can set the timeout using the following command:
#iptraf -t <Number_of_minutes>
You can run this tool in the background to continuously monitor the network traffic by executing the following command:
#iptraf -I <interface_to Monitor> -B
Latest posts by Ruwantha Nissanka (see all)
- 4 ways to hide your identity using linux - January 18, 2021
- How To Install Kali Linux in Virtualbox - December 31, 2020
- Kali Linux : The OS That Hackers Use - December 31, 2020
- How to monitor user activity in Linux with Acct - December 30, 2020
- Debsecan : You will not miss another security update - December 28, 2020