Re: Counting p2p traffic.

From: Manuel Arostegui (manuel_at_todo-linux.com)
Date: 06/28/04

  • Next message: Paul Martin: "RE: Error installing Clamav?"
    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.


  • Next message: Paul Martin: "RE: Error installing Clamav?"