Guide to monitor outgoing and incoming internet traffic on Linux OS

For troubleshooting a server, the following tools are needed which are very helpful in monitoring traffic.

  1. iptraf
    sudo yum install iptraf 
    sudo apt-get install iptraf

  2. iftop
    sudo yum install iftop
    sudo apt-get install iftop

  3. lsof
    lsof -i 4 --> monitor trafik dengan ip v4
    lsof -i 80 --> monitor trafik dengan port 80


of the two tools above have their own advantages and disadvantages, but for more detail you can see traffic using iftop, because there it is clearly written outgoing and incoming traffic and with port details.


untuk cara lain bisa menggunakan lsof, lsof sebenarnya digunakan untuk cek file mana saja yang sedang di open, tetapi bisa juga difungsikan untuk pengecekan trafik.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.