How To Enable BitTorrent Ports In Linux Firewall?


BitTorrent is a distributed file-sharing protocol. There is a lot of different type of applications using the BitTorrent protocol. There is a lot of advantages to using BitTorrent from different points. It saves and balances 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 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 a 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
List BitTorrent Related Firewall Rules
List BitTorrent Related Firewall Rules

LEARN MORE  How To Fix Dns Lookup Failed

Leave a Comment