Trafic monitoring, graphs, linux, iptables, statistics, stats en-us Copyrighted information (c) 2018-08-14T20:16:09+01:00 About TrafIP Trafic monitor small solution for Linux The software is really small and fast to install. Was designed to work mostly with iptables and on Linux platform. Installation is easy. Just add those lines to your firewall or put somewhere to start allways. After this modify the script with the result from your iptables -L -n. And of course put the .php files somewhere to access via www :) and make the directory writeable. The output file must be in the directory where are the php files. By default without selecting anything will show last hour traffic. It's pretty live(update at 6 seconds, not like other programs). Quick example: [root@lair trafip]# iptables -A OUTPUT -s -d [root@lair trafip]# iptables -A INPUT -d -s [root@lair trafip]# iptables -L -n|grep 127|grep -v ACCEPT|grep -v LOG|grep -v DROP all -- all -- Get the strings "" and "" and put in Must be exact like iptables shows(better you copy paste that part). The script must be allways running to count. In img.php modify: $target variable with the name where you redirect the output from $target="local";) $ip variable with the IP(ex: $ip="";) $maxspeed variable with the maximum maxim traffic can be done in 6 seconds(ex: $ip="115200";). If you have black lines on your graph without stopping the inte rface/traffic the increase the value. $upload variable with red or green(ex: $upload="red";) $download variable with red or green(ex: $download="green";) $imagetype variable with png, gif or jpg, if for output format of graph(ex: $imagetype="gif") The output file must be something like: 11/12/02 05:57:26 10782702 149477806 11/12/02 05:57:32 10783170 149489806 11/12/02 05:57:38 10783810 149509426 (format: month/day/year[space]hour:minutte:second[space]INPUT_counter[space]OUTPUT_counter Download TrafIP Package: File name: Size: Description: TrafIP 3.3 trafip-3.3.tgz 5kb TrafIP v3.3 PHP code, collect data script, example, and install notes This program is distributed under GPL, so... have fun. Licence GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. Bandwidth monitoring Bandwidth monitoring with iptables By Gerard Beekmans Linux has a number of useful bandwidth monitoring and management programs. A quick search on for bandwidth returns a number of applications. However, if all you need is a basic overview of your total bandwidth usage, iptables is all you really need -- and it's already installed if you're using a Linux distribution based on the 2.4.x or 2.6.x kernels. Most of the time we use iptables to set up a firewall on a machine, but iptables also provides packet and byte counters. Every time an iptables rule is matched by incoming or outgoing data streams, the software tracks the number of packets and the amount of data that passes through the rules. It is easy to make use of this feature and create a number of "pass-through rules" in the firewall. These rules do not block or reroute any data, but rather keep track of the amount of data passing through the machine. By using this feature, we can build a simple, effective bandwidth monitoring system that does not require additional software. Depending on how the firewall rules are set up, the setup for bandwidth monitoring may be very simple or very complex. For a desktop computer, you may need to create only two rules to log the total input and output. A system acting as a router could be set up with additional rules to show the totals for one or more subnets, right down to the individual IP address within each subnet. In addition to knowing exactly how much bandwidth each host and subnet on the network is using, this system could be used for billing or chargeback purposes as well.