Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Iptables - Allowing BitTorrent & aMule Traffic
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mistersnorfles
n00b
n00b


Joined: 03 Aug 2007
Posts: 32

PostPosted: Wed Aug 15, 2007 8:49 am    Post subject: Iptables - Allowing BitTorrent & aMule Traffic Reply with quote

I am trying to get bittorrent and amule working with iptables.

currently I have the following in my input chain
Code:

iptables -A INPUT -p tcp -m tcp --dport 6881:6889 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 6969 -j ACCEPT


and in the output chain:
Code:

iptables -A OUTPUT -p tcp -m tcp --dport 6881:6889 -j ACCEPT


Both outgoing and incoming related/established are allowed, and everything else gets dropped and logged...

What do I need to add to this to make bittorrent work? I have been getting short-lived, sporadic connections, that only allow downloading (at very low speed) and do not upload at all.

As far as amule what do I need to do?

Thanks,
Mr Snorfles
Back to top
View user's profile Send private message
cetbaalix
n00b
n00b


Joined: 19 Jul 2007
Posts: 48

PostPosted: Wed Aug 15, 2007 1:02 pm    Post subject: Reply with quote

Besides that I've not limited my outgoing traffic (only incoming is filtered) I've opened the following ports which works fine with mldonkey and the emule/bittorrent network:

SERVICES_TCP="4661 4662 6881 6882 6883 6884 6885 6886 6887 6888 6889"
SERVICES_UDP="4672 4665 4666 1194"

My firewall script only iterates over the entries to open the ports:

for x in ${SERVICES_TCP}
do
/sbin/iptables -A INPUT -p tcp --dport ${x} -m state --state NEW -j ACCEPT
done
for x in ${SERVICES_UDP}
do
/sbin/iptables -A INPUT -p udp --dport ${x} -m state --state NEW -j ACCEPT
done

Default policy is of cource DROP for the INPUT chain. Maybe you should try to first allow outgoing traffic and then try to cut access down step by step.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum