BackupPC-users

Re: [BackupPC-users] [OT] Using iptables for traffic accounting

2009-05-26 05:07:51
Subject: Re: [BackupPC-users] [OT] Using iptables for traffic accounting
From: "G.W. Haywood" <backup AT jubileegroup.co DOT uk>
To: backuppc-users AT lists.sourceforge DOT net
Date: Tue, 26 May 2009 10:04:10 +0100 (BST)
Hi there,

On Tue, 26 May 2009 Boniforti Flavio wrote:

> Chain INPUT (policy ACCEPT 22M packets, 55G bytes)
>  pkts bytes ... source    destination
> ...
> 44908 2799K ... 0.0.0.0/0 127.0.0.1 tcp dpt:8875
>  139K 7252K ... 0.0.0.0/0 127.0.0.1 tcp dpt:8873
> ...
> Chain OUTPUT (policy ACCEPT 14M packets, 30G bytes)
>  pkts bytes ... source    destination
> ...
>  139K 2290M ... 127.0.0.1 0.0.0.0/0 tcp spt:8873
> 45421  745M ... 127.0.0.1 0.0.0.0/0 tcp spt:8875
> ...
> I'm using (at the moment) 4 tunnels and wanted to sum up the whole data
> amount (thus INPUT and OUTPUT chain rules).
>
> What my only concern is: why is rather my OUTPUT chain growing (2290M)
> instead of my INPUT (I was expecting latter chain to grow, as I'm
> "sucking" from the remote host).

I'm not sure from what you've said (a) where this iptables data comes
from, (b) that you're counting what you think you're counting, and (c)
that you're reading it right.  Did you check the totals for the INPUT
and OUTPUT chains?  The iptables --exact option can be useful when you
want to check the numbers for yourself.  Until you learn to trust it. :)

There are a number of packet flow diagrams like this available:

http://l7-filter.sourceforge.net/PacketFlow.png

Does that help at all?  I'm not sure this is the best one so take a
look around to see what you can find.

There are also some good tutorials on the netfilter site:

http://www.netfilter.org/documentation/index.html

Look especially for the one by Oskar Andreasson.

--

73,
Ged.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/