Re: Counting p2p traffic.
From: Manuel Arostegui (manuel_at_todo-linux.com)
Date: 06/28/04
- Previous message: Skander Ben Mansour: "RE: just running tcpdump makes promisc mode?"
- Maybe in reply to: mortar: "Counting p2p traffic."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 28 Jun 2004 20:28:17 +0200 (CEST) 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
>
>
This is an example of loggin icmp pings:
iptables -A INPUT -p icmp --icmp-type echo-request -m
limit -j LOG --log-prefix \"PING: \" --log-level DEBUG
Cheers
Manuel.
- Previous message: Skander Ben Mansour: "RE: just running tcpdump makes promisc mode?"
- Maybe in reply to: mortar: "Counting p2p traffic."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|