BackupPC-users

[BackupPC-users] [OT] Accounting (iptables): some results

2009-05-28 02:58:30
Subject: [BackupPC-users] [OT] Accounting (iptables): some results
From: "Boniforti Flavio" <flavio AT piramide DOT ch>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 28 May 2009 08:50:52 +0200
Hello list,

I now have some results about accounting on my machine, I'd like to
share them here on the list and maybe discuss some items.

Here we go!

I've finally set up iptables to count this way:

iptables -A INPUT -d localhost -p tcp --sport 8873
iptables -A OUTPUT -s localhost -p tcp --dport 8873

(for the SSH tunnel)

iptables -A INPUT -d localhost -s remotehost -p tcp --sport 22
iptables -A OUTPUT -s localhost -d remotehost -p tcp --dport 22

(for the SSH session)

This seems to be counting correctly the data travelling through the
tunnel, but as Les Mikesell pointed out, I'm not sure if I'm counting
the effective traffic between my BackupPC and the remote host
(comments/suggestions are welcome).
Here the counters (I know wrapping is a matter, sorry):

storebox:~# iptables -L -nv --exact
Chain INPUT (policy ACCEPT 33601114 packets, 77325739551 bytes)
    pkts      bytes target     prot opt in     out     source
destination
  366395 6011945400            tcp  --  *      *       0.0.0.0/0
127.0.0.1           tcp spt:8873
       0        0            tcp  --  *      *       84.55.237.6
127.0.0.1           tcp spt:22

Chain OUTPUT (policy ACCEPT 20626421 packets, 41543858875 bytes)
    pkts      bytes target     prot opt in     out     source
destination
  365560 19459102            tcp  --  *      *       127.0.0.1
0.0.0.0/0           tcp dpt:8873
       0        0            tcp  --  *      *       127.0.0.1
84.55.237.6         tcp dpt:22

The above scenario has counted 1 incr backup, which from
/var/lib/backuppc/pc/remotehost/backups shows:

26      incr    1243364401      1243484914      1519    6068956644
(first few parameters)

As you can see, the last one (size) seems to be similar to the INPUT
chain transferred bytes count... Do you think I *really* have counted
what's been transferred? The reference for the "backups" file is shown
in the docs, under "Storage Layout".

Any comments will be appreciated, thanks.

Flavio Boniforti

PIRAMIDE INFORMATICA SAGL
Via Ballerini 21
6600 Locarno
Switzerland
Phone: +41 91 751 68 81
Fax: +41 91 751 69 14
URL: http://www.piramide.ch
E-mail: flavio AT piramide DOT ch 

------------------------------------------------------------------------------
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 as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/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/

<Prev in Thread] Current Thread [Next in Thread>