Am primit si eu astazi mesajul forwardat. Am pus patchul si mi se pare foa=
rte=20
interesant
        regards

Begin forwarded message:
Date: Wed, 25 Jun 2003 10:26:36 +0200
=46rom: "Piotr Gasid=B3o" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: New match ipt_account


Hello.

This is my first post to this list.

I've created match ipt_account, which can be used to create traffic
statistics for all hosts in specifed network.

=46or example, to create statistics for 157.158.182.0/23 you only have to
add these rules:

iptables -A FORWARD -s 157.158.182.0/23 -m account=20
        --asource 157.158.182.0/23 --aname outgoing
iptables -A FORWARD -d 157.158.182.0/23 -m account
        --adest 157.158.182.0/23 --aname incomming

These rules will create entries in /proc/net/ipt_account/ containing:

$ cat /proc/net/ipt_account/incomming_32
ip =3D 157.158.182.0, bytes =3D 0 0 0 0 0, packets =3D 0 0 0 0 0
ip =3D 157.158.182.1, bytes =3D 0 0 0 0 0, packets =3D 0 0 0 0 0
ip =3D 157.158.182.2, bytes =3D 1524 160 1364 0 0, packets =3D 14 4 10 0 0
ip =3D 157.158.182.3, bytes =3D 0 0 0 0 0, packets =3D 0 0 0 0 0
ip =3D 157.158.182.4, bytes =3D 1769 160 1609 0 0, packets =3D 19 4 15 0 0
ip =3D 157.158.182.5, bytes =3D 1086 160 926 0 0, packets =3D 12 4 8 0 0
ip =3D 157.158.182.6, bytes =3D 0 0 0 0 0, packets =3D 0 0 0 0 0
ip =3D 157.158.182.7, bytes =3D 847 160 687 0 0, packets =3D 7 4 3 0 0
ip =3D 157.158.182.8, bytes =3D 1320 160 1160 0 0, packets =3D 15 4 11 0 0
ip =3D 157.158.182.9, bytes =3D 0 0 0 0 0, packets =3D 0 0 0 0 0
=2E..

Description:
[ ip, bytes =3D all tcp udp icmp other, packets =3D all tcp udp icmp other ]

=46or each rule are created two entries in proc : one with 32-bit counters
and one with 64-bit ones. This is for compatibility with programs which
doesn't support 64-bit number parsing.

Source code can be downloaded from:
http://www.barbara.eu.org/~quaker/ipt_account/
http://www.barbara.eu.org/~quaker/ipt_account/ipt_account_newest.tar.gz=20

=2D-=20
Piotr 'QuakeR' Gasid=B3o ### B.O.F.H. @ pandora.barbara.eu.org ###
## [EMAIL PROTECTED] ### ICQ 52605026 ### PGP 0xF3400EAA ###=20
## BOFH excuse #269:
Melting hard drives
=2D-=20
Sebastian Petrescu
Network and System Engineer
http://www.serghei.net

Raspunde prin e-mail lui