What is TrafIP FOR LINUX?


TrafIP


TrafIP is a handy little tool for monitoring your traffic and bandwidth. It's super lightweight, just three files, and works great with PHP and Linux (or any Unix/BSD system). You’ll love how it keeps you updated every 6 seconds, showing you real-time data right when you need it. Plus, did I mention it's FREE?



Features of TrafIP


With TrafIP, you get some cool options:



  • The name of the file that holds your collected data.

  • Filtering by IP address or interface.

  • The max speed your line can download in 6 seconds. If you see black lines without an interface being down, you might want to increase this value to better detect when the line goes up or down.

  • Choose the color for upload traffic.

  • Choose the color for download traffic.

  • For image types, PNG is recommended because it looks good and stays small (but you can also use GIF or JPG).



Easy Installation Steps


Getting started with TrafIP is a breeze! Just add a few lines to your firewall or set it up to run automatically. After that, modify the collect.sh script using results from iptables -L -n. And don’t forget to place those .php files where you can access them through the web!



Your Output File Setup


The output file needs to be in the same directory as your PHP files. By default, if nothing is selected, it shows traffic from the last hour. It’s pretty much live—updating every 6 seconds!



A Quick Example


[root@lair trafip]# iptables -A OUTPUT -s 0.0.0.0/0 -d 127.0.0.1
[root@lair trafip]# iptables -A INPUT -d 0.0.0.0/0 -s 127.0.0.1
[root@lair trafip]# iptables -L -n|grep 127|grep -v ACCEPT|grep -v LOG|grep -v DROP
all -- 127.0.0.1 0.0.0.0/0
all -- 0.0.0.0/0 127.0.0.1

You’ll want to grab those strings "127.0.0.1 0.0.0.0/0" and "0.0..." from above and plug them into collect.sh. Make sure everything matches perfectly!



Tweaking Your Settings


Edit img.php, setting up variables like:



  • $target for output location.

  • $ip for your IP (like $ip="127...";).

  • $maxspeed for maximum traffic in six seconds (like $maxspeed="115200";).

  • $upload and $download colors (like red or green).

  • $imagetype format (PNG, GIF, JPG).


Your output file will look something like: 11/12/02... OUTPUT_counter



What’s New in This Release:



  • New output formats!

  • An improved user interface.


How Download Works

Go to the Softpas website, press the 'Downloads' button, and pick the app you want to download and install—easy and fast!

SoftPas Safety Info
SoftPas

SoftPas is your platform for the latest software and technology news, reviews, and guides. Stay up to date with cutting-edge trends in tech and software development.

Recent

Help

Subscribe to newsletter


© Copyright 2024, SoftPas, All Rights Reserved.