Block BitTorrent traffic on your Linux firewall using iptables
The following script will block and log un-encrypted BitTorrent & DHT traffic on your Linux firewall.I have personally tested it on debian 5 lenny , but I am almost sure it should work pretty well on any new Linux distros.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| iptables -N LOGDROP > /dev/null 2> /dev/nulliptables -F LOGDROP iptables -A LOGDROP -j LOG --log-prefix "LOGDROP "iptables -A LOGDROP -j DROP#Torrentiptables -A FORWARD -m string --algo bm --string "BitTorrent" -j LOGDROP iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j LOGDROPiptables -A FORWARD -m string --algo bm --string "peer_id=" -j LOGDROPiptables -A FORWARD -m string --algo bm --string ".torrent" -j LOGDROPiptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j LOGDROP iptables -A FORWARD -m string --algo bm --string "torrent" -j LOGDROPiptables -A FORWARD -m string --algo bm --string "announce" -j LOGDROPiptables -A FORWARD -m string --algo bm --string "info_hash" -j LOGDROP # DHT keywordiptables -A FORWARD -m string --string "get_peers" --algo bm -j LOGDROPiptables -A FORWARD -m string --string "announce_peer" --algo bm -j LOGDROPiptables -A FORWARD -m string --string "find_node" --algo bm -j LOGDROP |
Không có nhận xét nào:
Đăng nhận xét