kurcze panowie chyba wsio dobrze zrobilem a cos nie teges
u-mazola.pl/stats/stat.php
reguly
#!/bin/bash
iptables -t mangle -D FORWARD -i eth0 -j STAT >/dev/null 2>&1
iptables -t mangle -D FORWARD -o eth0 -j STAT >/dev/null 2>&1
iptables -t mangle -F STAT >/dev/null 2>&1
iptables -t mangle -X STAT >/dev/null 2>&1
iptables -t mangle -N STAT
iptables -t mangle -I FORWARD -o eth0 -j STAT
iptables -t mangle -I FORWARD -i eth0 -j STAT
#dla poszczególnych kompów
iptables -t mangle -A STAT -d 192.168.0.2
iptables -t mangle -A STAT -s 192.168.0.2
iptables -t mangle -A STAT -d 192.168.0.3
iptables -t mangle -A STAT -s 192.168.0.3
iptables -t mangle -A STAT -d 192.168.0.4
iptables -t mangle -A STAT -s 192.168.0.4
iptables -t mangle -A STAT -d 192.168.0.5
iptables -t mangle -A STAT -s 192.168.0.5
iptables -t mangle -A STAT -d 192.168.0.6
iptables -t mangle -A STAT -s 192.168.0.6
iptables -t mangle -A STAT -d 192.168.0.7
iptables -t mangle -A STAT -s 192.168.0.7
iptables -t mangle -A STAT -d 192.168.0.8
iptables -t mangle -A STAT -s 192.168.0.8
iptables -t mangle -A STAT -d 192.168.0.9
iptables -t mangle -A STAT -s 192.168.0.9
iptables -t mangle -A STAT -d 192.168.0.10
iptables -t mangle -A STAT -s 192.168.0.10
iptables -t mangle -A STAT -d 192.168.0.11
iptables -t mangle -A STAT -s 192.168.0.11
iptables -t mangle -A STAT -d 192.168.0.12
iptables -t mangle -A STAT -s 192.168.0.12
stat.php
$path = "/tmp/stats"; //ścieżka do plików ze statystyką
$hosts_names = 1; //używać nazw hostów zamiast IP
$default_sorting = 'download'; //domyślne sortowanie ('download' 'upload', 'host')
$skip_zeroes =1; //pomija komputery z zerowymi danymi
$time_limit = 300; //czas (w sekundach), po którym komputery zostaną
//uznane za nieaktywne
stat.pl
#--------Ustawienie stałych użytkownika-------------------
my $path = '/tmp/stats'; # katalog ze statystyką
my $ipt = '/usr/sbin/iptables'; # lokalizacja iptables
my $hosts_names = 1; # nazwy zamiast IP (domyślnie: wyłączone)
# ----------Tutaj nie należy już nic zmieniać-------------
ifconfig - eth0 - NET eth1 - LAN
eth0 Link encap:Ethernet HWaddr 00:02:96:02:18:E4
inet addr:83.14.124.226 Bcast:83.14.124.231 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5323603 errors:0 dropped:0 overruns:0 frame:0
TX packets:4458957 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3659924295 (3490.3 Mb) TX bytes:844522839 (805.3 Mb)
Interrupt:12 Base address:0x2f00
eth1 Link encap:Ethernet HWaddr 00:40:F4:64:95:C6
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4436511 errors:0 dropped:0 overruns:0 frame:0
TX packets:5004596 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:846467278 (807.2 Mb) TX bytes:3642898747 (3474.1 Mb)
Interrupt:12 Base address:0x4e00
/tmp/stats/ - utworzony ale niestety zadnego pliku tam nie tworzy...
Czy w pliku reguly ma byc eth1 (w moim przypadku lan) czy eth0(w moim przypadku NET)?? Oba przypadki sprawdzalem ale niestety efektu zadnego...
jakies pomysly?[/code]