IPTABLES specific host bandwidth accounting
Hi There,
Failing to make bandwidth-pgsql to work, I decided just to log individual host' bandwidth consumption within the IPTABLES
I got Shorewall up and running with simple configuration allowing everything to come-and-go
I put my own script on /etc/shorewall/start
iptables -N localnet
iptables -A FORWARD -d 10.1.1.0/8 -j localnet
iptables -A FORWARD -s 10.1.1.0/8 -j localnet
iptables -A localnet -d 10.1.1.5
iptables -A localnet -s 10.1.1.5
iptables -A localnet -d 10.1.1.10
iptables -A localnet -s 10.1.1.10
As I am hopping with running command :
iptables -L -v -n
will gives me the list of readable traffic for host 10.1.1.5 and 10.1.1.10
but after waiting for few minutes/hours, this is what I got:
Chain localnet (2 references)
pkts bytes target prot opt in out source destination
0 0 0 -- * * 0.0.0.0/0 10.1.1.5
0 0 0 -- * * 10.1.1.5 0.0.0.0/0
0 0 0 -- * * 0.0.0.0/0 10.1.1.10
0 0 0 -- * * 10.1.1.10 0.0.0.0/0
Chain FORWARD (policy DROP 2 packets, 96 bytes)
pkts bytes target prot opt in out source destination
3096 148K TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
34658 14M ppp0_fwd 0 -- ppp0 * 0.0.0.0/0 0.0.0.0/0
34032 5258K eth1_fwd 0 -- eth1 * 0.0.0.0/0 0.0.0.0/0
Is there any specific value(s) I need to set on shorewall.conf to make my script work?
Or am I putting the wrong script?
Any help please?
Cheers
Start your day with Yahoo!7 and win a Sony Bravia TV. Enter now http://au.docs.yahoo.com/homepageset/?p1=other&p2=au&p3=tagline
Reply to: