BitTorrent is distributed file sharing protocol. There are a lot of different type of applications using BitTorrent protocol. There is a lot of advantages using BitTorrent from different points. It saves and balance global download traffic. Accelerates client side download speed. But some times there are port related problems that blocks or slow down the BitTorrent client.
BitTorrent uses TCP ports 6881 to 6999. In this situation we will define some port range for our Linux firewall
Enable Input Ports For Firewall
We will enable coming connection to the our ports
iptables -A INPUT -p tcp --destination-port 6881:6999 -j ACCEPT
Enable Output Communication For Firewall
As we use same ports to connect other BitTorrent clients we will provide rule for the remote going connections.
iptables -A OUTPUT -p tcp --source-port 6881:6999 -j ACCEPT
List BitTorrent Related Firewall Rules
We will check if our rules are put into iptables rules pack.
iptables -L | grep 68