miércoles, 23 de mayo de 2012

Iptables - bloquear Torrent

http://www.adminsehow.com/2011/04/block-bittorrent-traffic-on-your-linux-firewall-using-iptables/

Bloquear torrents con iptables

iptables -N DROPTORRENT > /dev/null 2> /dev/null
iptables -F DROPTORRENT
iptables -A DROPTORRENT -j LOG --log-prefix "DROPTORRENT "
iptables -A DROPTORRENT -j DROP

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

# DHT keyword
iptables -A FORWARD -m string --string "get_peers" --algo bm -j DROPTORRENT
iptables -A FORWARD -m string --string "announce_peer" --algo bm -j DROPTORRENT
iptables -A FORWARD -m string --string "find_node" --algo bm -j DROPTORRENT

No hay comentarios: