View previous topic :: View next topic |
Author |
Message |
mistersnorfles n00b

Joined: 03 Aug 2007 Posts: 32
|
Posted: Wed Aug 15, 2007 8:49 am Post subject: Iptables - Allowing BitTorrent & aMule Traffic |
|
|
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 |
|
 |
cetbaalix n00b

Joined: 19 Jul 2007 Posts: 48
|
Posted: Wed Aug 15, 2007 1:02 pm Post subject: |
|
|
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 |
|
 |
|