I just fucked up the post-firewall from the beginning and only now I realized my mistake.
This costed me a lot of ratio.
The situation is that you need to open up both TCP and IP so that you became an active torrenter and not a passive one.
I used to have:
Code:
# Allow access to various router services from WAN
for P in 22 65534; do
iptables -I INPUT 1 -p tcp --syn -i "$1" --dport $P -j ACCEPT
done
This opened up only TCP and I was not an active torrenter so only actives were able to download from me...
No passive guys.
To become an active I opened up the IP too.
Like this:
Code:
## also open the old stuff
iptables -I INPUT 1 -p tcp --syn -i "$1" --dport 65534 -j ACCEPT
iptables -I INPUT 1 -p udp --syn -i "$1" --dport 65534 -j ACCEPT
Now my post firewall looks like this:
Code:
#!/bin/sh
## FIREWALL
## set default policy
iptables -P INPUT DROP
## deny ftp access from WAN
iptables -I INPUT 1 -p tcp -i "$1" --syn --dport 21 -j DROP
#Old stuff.
## Allow access to various router services from WAN
#for P in 22 65534; do
# iptables -I INPUT 1 -p tcp --syn -i "$1" --dport $P -j ACCEPT
#done
#New stuff
## open 51413 for torrent
iptables -I INPUT 1 -p tcp --syn -i "$1" --dport 51413 -j ACCEPT
iptables -I INPUT 1 -p udp --syn -i "$1" --dport 51413 -j ACCEPT
## also open the old stuff
iptables -I INPUT 1 -p tcp --syn -i "$1" --dport 65534 -j ACCEPT
iptables -I INPUT 1 -p udp --syn -i "$1" --dport 65534 -j ACCEPT
You can check if you are an active at torrent sites if it list you connectible.