Changes

Jump to: navigation, search

Traffic accounting with iptables

1 byte added, 13:58, 19 December 2006
Generate a traffic.log: bugfix for exact values
echo -n `date "+%Y-%m-%d %H:%M:%S"` >> $trafficlog
echo -n " $i " >> $trafficlog
echo `iptables -nv nvx -L FORWARD | grep " $i " | tr -s [:blank:] |cut -d' ' -f3| awk '{sum+=$1} END {print sum;}'` >> $trafficlog
done
# reset the counter
22
edits

Navigation menu