Skip to content

Instantly share code, notes, and snippets.

@murka
Created August 24, 2022 18:20
Show Gist options
  • Save murka/2ca5fd729ff74642bb4412133f70a707 to your computer and use it in GitHub Desktop.
Save murka/2ca5fd729ff74642bb4412133f70a707 to your computer and use it in GitHub Desktop.
block torrent in server by iptables
iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j DROP
iptables -A FORWARD -m string --algo bm --string "peer_id=" -j DROP
iptables -A FORWARD -m string --algo bm --string ".torrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j DROP
iptables -A FORWARD -m string --algo bm --string "torrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "announce" -j DROP
iptables -A FORWARD -m string --algo bm --string "info_hash" -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment