Skip to content

Instantly share code, notes, and snippets.

@ioxorg
ioxorg / block_bittorrent.sh
Created March 6, 2025 20:01
Block BitTorrent via iptabls.
#!/usr/bin/env bash
echo "Applying Torrent blocking rules..."
# Block Torrent algo string using Boyer-Moore (bm)
BLOCK_STRINGS_BM=(
"BitTorrent"
"BitTorrent protocol"
"peer_id="
".torrent"
"announce.php?passkey="
"torrent"