How to Block BitTorrent traffic on your Linux firewall

by
Share this Article: Facebook5Google+3Twitter6LinkedIn0Reddit0StumbleUpon0

Questions : 

How   to   block  torrents   from Iptables  ?

 Answer:

#Block Torrent
iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string "peer_id=" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string ".torrent" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string "torrent" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string "announce" -j LOGDROP
iptables -A FORWARD -m string --algo bm --string "info_hash" -j LOGDROP

This  method  was  tested  under  Ubuntu/Debian  and it works

For questions please refer to our Q/A forum at : http://ask.unixmen.com/


Share this Article: Facebook5Google+3Twitter6LinkedIn0Reddit0StumbleUpon0