Results 1 to 10 of 11
Hello,
I'm trying to get rid of kazaa and bittorrent traffic going through my box, and am having a crazy time trying to fix iptables.
I've downloaded and compiled this ...
- 08-10-2004 #1Just Joined!
- Join Date
- Apr 2004
- Posts
- 6
iptables firewall to block p2p traffic using ipp2p help pls
Hello,
I'm trying to get rid of kazaa and bittorrent traffic going through my box, and am having a crazy time trying to fix iptables.
I've downloaded and compiled this : http://rnvs.informatik.uni-leipzig.d.../index_en.html
Which is a p2p matching module for iptables ( ipp2p ).
I'm trying to set some basic rules:
The traffic however, still gets through. Even stranger, if I flush with iptables -F the nat still works?! Shouldn't it stop working?iptables -F
iptables -A FORWARD -p tcp -m ipp2p --bit -j DROP
iptables -A FORWARD -p tcp -m ipp2p --kazaa -j DROP
iptables -A FORWARD -p tcp -m ipp2p --dc -j DROP
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCE
PT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Confused.
Help appreciated.
Alex
- 08-10-2004 #2Just Joined!
- Join Date
- Jul 2004
- Location
- UK
- Posts
- 77
Rather than using FORWARD try INPUT for your DROP rules.
Armage
- 08-10-2004 #3Just Joined!
- Join Date
- Apr 2004
- Posts
- 6
Shouldn't the NAT stop working though if I issue an:
iptables -F
- 08-10-2004 #4Just Joined!
- Join Date
- Jul 2004
- Location
- UK
- Posts
- 77
The NAT is in a different table. Hence iptables -t. This maybe why the flush doesn't clear the NAT.
Hope this helps. Post back how you get on.
Armage
- 08-10-2004 #5Just Joined!
- Join Date
- Apr 2004
- Posts
- 6
Ahh crap I see..thanks.
iptables -t nat -L
shows a separate list.
At which step should I insert the drop rules in this case? In which table also? I've changed the rules above to the INPUT chain as you suggest, and still no avail.
- 08-10-2004 #6Just Joined!
- Join Date
- Jul 2004
- Location
- UK
- Posts
- 77
Theses rules look like they are allowing established connections access through the firewall. I would test turning them off too.iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCE
PT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
The drops are ok where they are.
Armage[/quote]
- 08-10-2004 #7Just Joined!
- Join Date
- Apr 2004
- Posts
- 6
Well after a slew of trial and error I have found where the calls are to be placed. Removing any of these results in p2p traffic going through.
iptables -F
iptables -A INPUT -p tcp -m ipp2p --ipp2p -j DROP
iptables -A FORWARD -p tcp -m ipp2p --ipp2p -j DROP
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -p tcp -m ipp2p --ipp2p -j DROP
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- 06-22-2005 #8Just Joined!
- Join Date
- Jun 2005
- Posts
- 5
An alternative approach would be to use "ROPE" (http://www.lowth.com/rope) and/or Ftwall (http://www.lowth.com/p2pwall/ftwall).
- 04-23-2008 #9Just Joined!
- Join Date
- Apr 2008
- Posts
- 1
- 11-27-2008 #10Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Hello Alex,
I have a question; the link mentioned in your post is unaccessible,
but the question is, how have you installed your ipp2p to work correct? I have followed several tutorials, I can reach the helpfile via 'iptables -m ipp2p -h', but when I try any other iptables-command with ipp2p in, I get the error 'segmentation fault'.. Do you have any idea how that's possible, or where did you get your info on installing it?
Kind Regards




