How to block or lessen torrent download

I want to block torrent download for my Starlink for peace of mind. Please help , Thank you.

There is no easy way to do this. You can try blocking the old traditional bittorrent ports (6881 - 6889), but virtually every modern bittorrent client now uses random ports. They also all use protocol encryption. There is really no easy way to detect what connections are for torrents. You need sophisticated traffic behaviour analysis to do this, and that is beyond what OpenWrt can do.

The best you can do is try traffic shaping to throttle connections to a certain speed or try to implement some sort of quota on a per client basis.

You can do traffic shaping with the nft-qos and luci-app-nft-qos packages. You used to be able to do quota, but I don't think the new nft firewall has caught up with that yet.

Install the adblock package, and add the block list files from https://github.com/SM443/Pi-hole-Torrent-Blocklist to it.

Might need to implement https://openwrt.org/docs/guide-user/firewall/fw3_configurations/intercept_dns too, if your family members are creative.

There are two blocklists - trackers and torrent web sites. Unfortunately DHT circumvents the tracker block quite handily. I just tried it and for the torrents I tried it took no more than 30 seconds to get a good connection going.

The website blocking for all the known common torrent sites is a really good idea though. However all anyone has to do is go their on their phone, and then move the .torrent or magnet link to a PC. Or just get LibreTorrent running on their phone, grab the .torrent when the phone is on data, then download the file when it's on the wifi.

You can put obstacles in the way, but no way I know of can block it.

I agree, if you have a 2nd way of accessing internet, pretty much all of this is pointless.

As @VA1DER says there is no easy way to do this and as @frollic says the pihole blocklist can help but it only blocks known torrent directory websites and trackers and this is only an inconvenience to the seasoned torrenter.

On numerous occasions I have used openNDS to mitigate the clogging effect of torrents. Yes it is a captive portal, but you can configure individual rate limits with unrestricted bursting intervals, along with individual data quotas.

You can set a bursting interval of say 30 seconds and a quite low download speed limit. This has very little effect on normal browsing/emailing use, is friendly to streaming sites that buffer eg Youtube, Prime, Netflix etc but a torrent will very rapidly grind to a snail's pace. On top of this you can add a download data quota which if exceeded, bumps the user, stopping all traffic.

This all makes using your network for torrenting a very unpleasant experience but if you tune the config to match "normal" usage can go largely unnoticed (apart from having to log in)

For your own use you can configure your own devices as "trusted" so they will have no restrictions, if you want to do your own torrenting....

3 Likes