Created
November 5, 2019 18:47
-
-
Save rampageX/5cbe95be43ca3165f4d963629e3bb946 to your computer and use it in GitHub Desktop.
iptables block bittorrent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Block Torrent algo string using Boyer-Moore (bm) | |
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 | |
iptables -A FORWARD -m string --algo bm --string "/default.ida?" -j DROP | |
iptables -A FORWARD -m string --algo bm --string ".exe?/c+dir" -j DROP | |
iptables -A FORWARD -m string --algo bm --string ".exe?/c_tftp" -j DROP | |
# Block Torrent keys | |
iptables -A FORWARD -m string --algo kmp --string "peer_id" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "BitTorrent" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "BitTorrent protocol" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "bittorrent-announce" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "announce.php?passkey=" -j DROP | |
# Block Distributed Hash Table (DHT) keywords | |
iptables -A FORWARD -m string --algo kmp --string "find_node" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "info_hash" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "get_peers" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "announce" -j DROP | |
iptables -A FORWARD -m string --algo kmp --string "announce_peers" -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment