Freesco, NND, CDN, EOS
http://forum.freesco.pl/

Problem z statystykami Alec
http://forum.freesco.pl/viewtopic.php?f=22&t=12396
Strona 1 z 1

Autor:  Szurik [ sobota, 13 maja 2006, 11:17 ]
Tytuł:  Problem z statystykami Alec

Witam mam problem z statystykami alec mam ustawione squid (port 3128) mrtg niceshape i staty nie zapisuja przeplywu przez squida
mam tak ustawione

#!/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
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j REDIRECT --to-port 3128
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

Autor:  -MW- [ niedziela, 14 maja 2006, 10:29 ]
Tytuł: 

#!/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 -D INPUT -i eth0 -j STAT >/dev/null 2>&1
iptables -t mangle -D INPUT -o eth0 -j STAT >/dev/null 2>&1

iptables -t mangle -D OUTPUT -i eth0 -j STAT >/dev/null 2>&1
iptables -t mangle -D OUTPUT -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

iptables -t mangle -I INPUT -o eth0 -j STAT
iptables -t mangle -I INPUT -i eth0 -j STAT

iptables -t mangle -I OUTPUT -o eth0 -j STAT
iptables -t mangle -I OUTPUT -i eth0 -j STAT


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


tak powinno to wygladac aby wspolpracowalo ze squidem.
jednak owe bałwan jestem sa zle ulozone !!! autor stats nie bardzo wiedzial co robi.
na forum jest skrypt zamieszczony przeze mnie, wyciagajacy wszystkie ip z pliku hosts i dla tych ip zliczane sa statsy - jest to lepsze rozwiazanie, uwzgledniajace rowniez squida.

http://forum.freesco.pl/viewtopic.php?p=75703#75703

a to wsadz sobie gdzie indziej:)
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j REDIRECT --to-port 3128

Autor:  Szurik [ niedziela, 14 maja 2006, 11:18 ]
Tytuł: 

a czy w pliku /etc/host ma byc tak ?

# /etc/hosts

# Nie usuwaj następnej linii. Wiele programów
# wymaga takiego wpisu do poprawnej pracy.

#ipv6-localhost ipv6-loopback
#::1 Serwer Serwer
127.0.0.1 Serwer
192.168.0.1 Serwer
192.168.0.2 Szurik
192.168.0.3 Bartek
192.168.0.4 Kasia
192.168.0.5 Tomasz
192.168.0.6 Wlodyka
192.168.0.7 Tomekp
192.168.0.8 Mariusz
192.168.0.9 Patryk
192.168.0.10 Kosik
192.168.0.11 Mariusz1
192.168.0.12 Rezerwa0
192.168.0.13 Rezerwa1
192.168.0.14 Rezerwa2

bo patrz co sie dzieje http://bla.dyn.pl/stats/stat.php

Strona 1 z 1 Strefa czasowa UTC+2godz.
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/