mrtg dla wybranego IP - przekłamuje - bad configuration
: 24 kwietnia 2008, 19:35
witam mam te mrtg ustrojstwo jakiego mało
nastepny:
nastepny:
i bardzo zaniża transfer, jestem przekonany ze te regulki w iptablesa sa zle, dziekuje z za pomoc.

Kod: Zaznacz cały
#grubas
Target[grubas]: `/etc/mrtg/ruch.sh 192.168.0.2`
MaxBytes[grubas]: 125000
Options[grubas]: growright, nopercent, integer, nobanner, noinfo
Title[grubas]: grubas
kilo[grubas]: 1024
ShortLegend[grubas]: B/s
YLegend[grubas]: B/s
PageTop[grubas]:[align=center] <H1>grubas</H1>
Kod: Zaznacz cały
iptables -N traffic
iptables -A traffic -d 192.168.0.2 -j RETURN
iptables -A traffic -s 192.168.0.2 -j RETURN
iptables -I FORWARD -j traffic
iptables -I INPUT -j traffic
iptables -I OUTPUT -j traffic
Kod: Zaznacz cały
#!/bin/sh
iptables -v -n -x -L traffic | grep $1 | head -1 | awk '{print $2}'
iptables -v -n -x -L traffic | grep $1 | tail -1 | awk '{print $2}'
echo `uptime`
echo `hostname -f`