Scrypt Untuk Blocking BitTorrent Traffic (CentOS)



Scrypt ini berguna untuk nge-blok semua aktivitas torrent yang melewati trafik dari Bittorent akan di drop dari server. 
Oke deh langsung saja ya gan, seperti biasa anda harus login terlebih dahulu ke server menggunakan akun user full root selanjutnya silahkan jalankan script berikut pada command console server vps anda.
iptables -A INPUT -m string --string "BitTorrent" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "BitTorrent protocol" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "peer_id=" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string ".torrent" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "announce.php?passkey=" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "torrent" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "announce" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "info_hash" --algo bm --to 65535 -j DROP

iptables -A INPUT -m string --string "peer_id" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "BitTorrent" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "BitTorrent protocol" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "bittorrent-announce" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "announce.php?passkey=" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "find_node" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "info_hash" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "get_peers" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "announce" --algo kmp --to 65535 -j DROP

iptables -A INPUT -m string --string "announce_peers" --algo kmp --to 65535 -j DROP

Simpan rules iptables
# service iptables save
Kemudian restart iptables
# service iptables restart
done.

Keterangan: Kelemahannya dari scrypt diatas torrent masih bisa lewat melalui port selain dari script ini. Tetapi menurut saya cukup lumayan bisa menjadi sedikit perisai bagi server VPS yang kita miliki.



Post a Comment

0 Comments

Random Posts