Skip to contentSkip to conversation

enable p2p to some host (ipp2p)

LARTC Roberto Pereyra 3 participants 3 messages Aug 14, 2006 – Aug 18, 2006

lore
Share & tools
lore
#0 lore raw

Hi

I using ipp2p to block p2p traffic.

How to enable to use p2p to me host in my net ?

I using this setup:

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -j DROP

This setup:

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -d ! mynet -j DROP

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -s ! mynet -j DROP

not works ....

roberto

Signature · 8 lines
Ing. Roberto Pereyra
ContenidosOnline
Looking for Linux Virtual Private Servers ? Click here:
http://www.spry.com/hosting-affiliate/scripts/t.php?a_aidB6&a_bidV
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw
Quoted 14 lines · Roberto Pereyra

Hi

I using ipp2p to block p2p traffic.

How to enable to use p2p to me host in my net ?

I using this setup:

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -j DROP

This setup:

Quoted 8 lines

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -d ! mynet -j DROP

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -s ! mynet -j DROP

not works ....

Don't know really as I don't use ipp2p - but you could just match and return/accept mynet traffic before the ipp2p rules are hit.

Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Roberto Pereyra

In theory, for all p2p traffic matched by ipp2p you only need "--ipp2p" parameter, not the rest you put.

You could use this:

#FIRST allow your net p2p traffic:
iptables -A FORWARD -d mynet -m ipp2p --ipp2p -j ACCEPT iptables -A FORWARD -s mynet -m ipp2p --ipp2p -j ACCEPT

#Next, drop not your net p2p traffic:
iptables -A FORWARD -m ipp2p --ipp2p -j DROP

If these don't works (I remember some months ago I test it and don't works fine), you'll need many rules, one per p2p type of traffic, as this:

iptables -A FORWARD -d mynet -m ipp2p --bit -j ACCEPT iptables -A FORWARD -s mynet -m ipp2p --bit -j ACCEPT iptables -A FORWARD -m ipp2p --bit -j DROP

iptables -A FORWARD -d mynet -m ipp2p --apple -j ACCEPT iptables -A FORWARD -s mynet -m ipp2p --apple -j ACCEPT iptables -A FORWARD -m ipp2p --apple -j DROP

...

iptables -A FORWARD -d mynet -m ipp2p --soul -j ACCEPT iptables -A FORWARD -s mynet -m ipp2p --soul -j ACCEPT iptables -A FORWARD -m ipp2p --soul -j DROP

Or if you don't want to write much, you can use:

export p2p_list="bit apple ... soul"
for i in ${p2p_list}; do
iptables -A FORWARD -d mynet -m ipp2p --$i -j ACCEPT iptables -A FORWARD -s mynet -m ipp2p --$i -j ACCEPT iptables -A FORWARD -m ipp2p --$i -j DROP
done;

Quoted 24 lines
Quoted 14 lines · Roberto Pereyra

Hi

I using ipp2p to block p2p traffic.

How to enable to use p2p to me host in my net ?

I using this setup:

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -j DROP

This setup:

Quoted 8 lines

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -d ! mynet -j DROP

iptables -A FORWARD -m ipp2p --ipp2p --bit --apple --winmx --soul --ares -s ! mynet -j DROP

not works ....

Quoted 9 lines

Don't know really as I don't use ipp2p - but you could just match and return/accept mynet traffic before the ipp2p rules are hit.

Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc