IPP2P 0.7 update (POM-ng patch included)
Hi,
IPP2P 0.7 has been released. It offers a couple of new features including:
-UDP filtering support for some P2P networks
-improved SoulSeek filter
-Ares/AresLite matching support
-debug option to print matchinfo into kernel log
A patch against POM-ng is attached to this e-mail - please apply! Thanks.
Kind regards,
Eicke
ipp2p/help +1 -1
@@ -5,4 +5,4 @@ accounting or shaping of P2P traffic. Examples: -iptables -A FORWARD -p tcp -m ipp2p --edk --kazaa --dc --gnu --bit --apple -j DROP +iptables -A FORWARD -m ipp2p --edk --kazaa --tcp --udp -j DROP
ipp2p/info +2 -2
@@ -1,5 +1,5 @@ -Title: Detects some p2p packets -Author: Eicke Friedrich <[email protected]> +Title: Detects some P2P packets +Author: Eicke Friedrich <[email protected]> Status: Stable Repository: extra Recompile: netfilter, iptables
ipp2p/iptables/extensions/libipt_ipp2p.c +84 -60
335 lines not on this page · raw message
ipp2p/iptables/extensions/libipt_ipp2p.man +18 -18
@@ -1,9 +1,9 @@ -This module matches certain TCP packets in P2P flows. It is not +This module matches certain packets in P2P flows. It is not designed to match all packets belonging to a P2P connection - -use IPP2P together with CONNMARK for this purpose. As it works -on TCP packets only it can only be used in conjunction with -.B -p tcp -. It provides the following options: +use IPP2P together with CONNMARK for this purpose. Also visit +http://www.ipp2p.org for detailed information. + +IPP2P provides the following options: .TP .B "--edk " Matches as many eDonkey/eMule packets as possible.
@@ -29,20 +29,20 @@ .B "--winmx " Matches some WinMX packets. Considered as beta, use careful! .TP -.B "--edk-data " -Matches eDonkey control packets initiating a download. -.TP -.B "--kazaa-data " -Matches KaZaA control packets initiating a download. -.TP -.B "--gnu-data " -Matches Gnutella control packets initiating a download. -.TP -.B "--dc-data " -Matches Direct Connect control packets initiating a download. +.B "--ares " +Matches Ares and AresLite packets. Use together with -j DROP only. .TP .B "--ipp2p " Short hand for: --edk --kazaa --gnu --dc .TP -.B "--ipp2p-data " -Short hand for: --edk-data --kazaa-data --gnu-data --dc-data +.B "--tcp " +Makes IPP2P analyze TCP packets only. Can be also be used together +with --udp +.TP +.B "--udp " +Makes IPP2P analyze UDP packets only. Can be also be used together +with --tcp +.TP +.B "--debug " +Prints some information about each hit into kernel logfile. May +produce huge logfiles so beware!
ipp2p/linux/include/linux/netfilter_ipv4/ipt_ipp2p.h +10 -3
@@ -1,11 +1,14 @@#ifndef __IPT_IPP2P_H#define __IPT_IPP2P_H -#define IPP2P_VERSION "0.6.1" +#define IPP2P_VERSION "0.7"struct ipt_p2p_info { -int cmd; +int cmd; +int debug; +int proto; }; +#endif //__IPT_IPP2P_H #define SHORT_HAND_IPP2P 1/* --ipp2p switch*/ #define SHORT_HAND_DATA 4/* --ipp2p-data switch*/
@@ -23,5 +26,9 @@#define IPP2P_APPLE 2048#define IPP2P_SOUL 4096#define IPP2P_WINMX 8192 +#define IPP2P_ARES 16384 + +#define IPP2P_PROTO_DEFAULT 1 +#define IPP2P_PROTO_UDP 2 +#define IPP2P_PROTO_TCP 4 -#endif /*__IPT_IPP2P_H*/
ipp2p/linux/net/ipv4/netfilter/ipt_ipp2p.c +296 -115
571 lines not on this page · raw message
ipp2p/linux-2.6/include/linux/netfilter_ipv4/ipt_ipp2p.h +10 -3
@@ -1,11 +1,14 @@#ifndef __IPT_IPP2P_H#define __IPT_IPP2P_H -#define IPP2P_VERSION "0.6.1" +#define IPP2P_VERSION "0.7"struct ipt_p2p_info { -int cmd; +int cmd; +int debug; +int proto; }; +#endif //__IPT_IPP2P_H #define SHORT_HAND_IPP2P 1/* --ipp2p switch*/ #define SHORT_HAND_DATA 4/* --ipp2p-data switch*/
@@ -23,5 +26,9 @@#define IPP2P_APPLE 2048#define IPP2P_SOUL 4096#define IPP2P_WINMX 8192 +#define IPP2P_ARES 16384 + +#define IPP2P_PROTO_DEFAULT 1 +#define IPP2P_PROTO_UDP 2 +#define IPP2P_PROTO_TCP 4 -#endif /*__IPT_IPP2P_H*/
ipp2p/linux-2.6/net/ipv4/netfilter/ipt_ipp2p.c +296 -111
565 lines not on this page · raw message
Review
Quoted 7 lines · Eicke Friedrich
Hi,
IPP2P 0.7 has been released. It offers a couple of new features including:
(quoted diff) +0
-4-UDP filtering support for some P2P networks -improved SoulSeek filter -Ares/AresLite matching support -debug option to print matchinfo into kernel log
you forgot to mention that you reimplemented udp and tcp protocol matching. I disagree. Why was this required?
Quoted 2 lines
ipp2p/help +1
-1-iptables -A FORWARD -p tcp -m ipp2p --edk --kazaa --dc --gnu --bit --apple -j DROP +iptables -A FORWARD -m ipp2p --edk --kazaa --tcp --udp -j DROP
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
Quoted 1 line · Harald Welte
you forgot to mention that you reimplemented udp and tcp protocol matching. I disagree. Why was this required?
Well, it was intended to give the user a way to match udp and tcp in one rule. The protocol match does not support multiple arguments (tcp and udp in this case) and for IPP2P we have to detect the packets's protocol anyway. But thinking about it your're absolutely right so I've removed both switches from IPP2P.
Users can use -p tcp or -p udp for a single protocol only or omit -p at all to search both protocols. Sorry 'bout this and thanks for the hint Harald. IPP2P 0.7.2 as patch against pom-ng is attached.
Regards,
Eicke
ipp2p/help +3 -1
@@ -5,4 +5,6 @@ accounting or shaping of P2P traffic. Examples: -iptables -A FORWARD -p tcp -m ipp2p --edk --kazaa --dc --gnu --bit --apple -j DROP +iptables -A FORWARD -m ipp2p --edk --kazaa --bit -j DROP +iptables -A FORWARD -p tcp -m ipp2p --ares -j DROP +iptables -A FORWARD -p udp -m ipp2p --kazaa -j DROP
ipp2p/info +2 -2
@@ -1,5 +1,5 @@ -Title: Detects some p2p packets -Author: Eicke Friedrich <[email protected]> +Title: Detects some P2P packets +Author: Eicke Friedrich <[email protected]> Status: Stable Repository: extra Recompile: netfilter, iptables
ipp2p/iptables/extensions/libipt_ipp2p.c +56 -60
307 lines not on this page · raw message
ipp2p/iptables/extensions/libipt_ipp2p.man +13 -18
@@ -1,9 +1,12 @@ -This module matches certain TCP packets in P2P flows. It is not +This module matches certain packets in P2P flows. It is not designed to match all packets belonging to a P2P connection - -use IPP2P together with CONNMARK for this purpose. As it works -on TCP packets only it can only be used in conjunction with -.B -p tcp -. It provides the following options: +use IPP2P together with CONNMARK for this purpose. Also visit +http://www.ipp2p.org for detailed information. + +Use it together with -p tcp or -p udp to search these protocols +only or without -p switch to search packets of both protocols. + +IPP2P provides the following options: .TP .B "--edk " Matches as many eDonkey/eMule packets as possible.
@@ -29,20 +32,12 @@ .B "--winmx " Matches some WinMX packets. Considered as beta, use careful! .TP -.B "--edk-data " -Matches eDonkey control packets initiating a download. -.TP -.B "--kazaa-data " -Matches KaZaA control packets initiating a download. -.TP -.B "--gnu-data " -Matches Gnutella control packets initiating a download. -.TP -.B "--dc-data " -Matches Direct Connect control packets initiating a download. +.B "--ares " +Matches Ares and AresLite packets. Use together with -j DROP only. .TP .B "--ipp2p " Short hand for: --edk --kazaa --gnu --dc .TP -.B "--ipp2p-data " -Short hand for: --edk-data --kazaa-data --gnu-data --dc-data +.B "--debug " +Prints some information about each hit into kernel logfile. May +produce huge logfiles so beware!
ipp2p/linux/include/linux/netfilter_ipv4/ipt_ipp2p.h +5 -3
@@ -1,11 +1,13 @@#ifndef __IPT_IPP2P_H#define __IPT_IPP2P_H -#define IPP2P_VERSION "0.6.1" +#define IPP2P_VERSION "0.7.2"struct ipt_p2p_info { -int cmd; +int cmd; +int debug; }; +#endif //__IPT_IPP2P_H #define SHORT_HAND_IPP2P 1/* --ipp2p switch*/ #define SHORT_HAND_DATA 4/* --ipp2p-data switch*/
@@ -23,5 +25,5 @@#define IPP2P_APPLE 2048#define IPP2P_SOUL 4096#define IPP2P_WINMX 8192 +#define IPP2P_ARES 16384 -#endif /*__IPT_IPP2P_H*/
ipp2p/linux/net/ipv4/netfilter/ipt_ipp2p.c +303 -116
578 lines not on this page · raw message
ipp2p/linux-2.6/include/linux/netfilter_ipv4/ipt_ipp2p.h +5 -3
@@ -1,11 +1,13 @@#ifndef __IPT_IPP2P_H#define __IPT_IPP2P_H -#define IPP2P_VERSION "0.6.1" +#define IPP2P_VERSION "0.7.2"struct ipt_p2p_info { -int cmd; +int cmd; +int debug; }; +#endif //__IPT_IPP2P_H #define SHORT_HAND_IPP2P 1/* --ipp2p switch*/ #define SHORT_HAND_DATA 4/* --ipp2p-data switch*/
@@ -23,5 +25,5 @@#define IPP2P_APPLE 2048#define IPP2P_SOUL 4096#define IPP2P_WINMX 8192 +#define IPP2P_ARES 16384 -#endif /*__IPT_IPP2P_H*/
ipp2p/linux-2.6/net/ipv4/netfilter/ipt_ipp2p.c +302 -112
571 lines not on this page · raw message
Quoted 2 lines · Eicke Friedrich
But thinking about it your're absolutely right so
I've removed both switches from IPP2P.
Thanks for taking this into consideration.
Quoted 3 lines
Users can use -p tcp or -p udp for a single protocol only or omit -p at all to search both protocols. Sorry 'bout this and thanks for the hint Harald. IPP2P 0.7.2 as patch against pom-ng is attached.
sorry for the long delay, now committed to svn (Revision 3623)
Quoted 2 lines
Regards,
Eicke
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie