Counting p2p traffic.
From: mortar (slacklist_at_op.pl)
Date: 06/27/04
- Previous message: Craig Van Tassle: "Re: just running tcpdump makes promisc mode?"
- Next in thread: Manuel Arostegui: "Re: Counting p2p traffic."
- Maybe reply: Manuel Arostegui: "Re: Counting p2p traffic."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 27 Jun 2004 00:31:19 +0200 To: focus-linux@securityfocus.com
Hello
I need to count p2p downloads and uploads to/from my
small NATed network. I have all i need - ipp2p module for
iptables, CONNMARK etc. (2.4.26)
Here is an example (little modified) from ipp2p site:
iptables -t mangle -A PREROUTING -p tcp -j CONNMARK --restore-mark
iptables -t mangle -A PREROUTING -p tcp -m mark ! --mark 0 -j ACCEPT
iptables -t mangle -A PREROUTING -p tcp -m ipp2p --ipp2p -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -p tcp -j CONNMARK --save-mark
iptables -t mangle -A POSTROUTING -m mark --mark 1 -j ACCEPT
With this i can count all p2p traffic passing my linux box, but i
need to separate downloads and uploads. Any suggestions how i can
do that? My natwork - 10.0.0.8/8
-- Pozdrawiam Marcin mailto:slacklist@op.pl
- Previous message: Craig Van Tassle: "Re: just running tcpdump makes promisc mode?"
- Next in thread: Manuel Arostegui: "Re: Counting p2p traffic."
- Maybe reply: Manuel Arostegui: "Re: Counting p2p traffic."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]