Created
April 20, 2015 16:11
-
-
Save P3lUZa/a8a4dfeb67745a3aa9fa to your computer and use it in GitHub Desktop.
Block BitTorrent Tor relay
This file contains 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
echo This is to block known signatures of BitTorrent activity. | |
echo Written by\: Mr\-Protocol | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --string "GET /announce?info_hash=" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --string "GET /announce?info_hash=" -j DROP | |
echo Blocking\: \"GET \/announce?info_hash=\" | |
sleep 1 | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --string "GET /scrape?info_hash=" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --string "GET /scrape?info_hash=" -j DROP | |
echo Blocking\: \"GET \/scrape?info_hash=\" | |
sleep 1 | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --string "GET /announce.php?info_hash=" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --string "GET /announce.php?info_hash=" -j DROP | |
echo Blocking\: \"GET \/announce.php?info_hash=\" | |
sleep 1 | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --string "GET /scrape.php?info_hash=" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --string "GET /scrape.php?info_hash=" -j DROP | |
echo Blocking\: \"GET \/scrape.php?info_hash=\" | |
sleep 1 | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --string "GET /announce.php?passkey=" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --string "GET /announce.php?passkey=" -j DROP | |
echo Blocking\: \"GET \/announce.php?passkey=\" | |
sleep 1 | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --string "GET /scrape.php?passkey=" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --string "GET /scrape.php?passkey=" -j DROP | |
echo Blocking\: \"GET \/scrape.php?passkey=\" | |
sleep 1 | |
sudo iptables -t raw -A OUTPUT -m string --algo bm --hex-string "|13426974546f7272656e742070726f746f636f6c|" -j DROP | |
sudo iptables -t raw -A PREROUTING -m string --algo bm --hex-string "|13426974546f7272656e742070726f746f636f6c|" -j DROP | |
echo Blocking\: \"\(0x13\) \+ \"BitTorrent protocol\" | |
sleep 1 | |
echo Running Tor with config \file\: \/home\/protocol\/torrc | |
sleep 3 | |
sudo tor -f /home/protocol/torrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment