Monday 26 August 2013

MikroTik RB750, RB751U, RB951-2n, RB450G Block Bit Torrent ให้อยู่หมัด รับรองนิ่งสนิท

วันนี้เราจะมา Block Bit Torrent กันครับเอาแบบนิ่งสนิทเลยนะครับแบบ 0 Kb กันไปเลยครับ เริ่มกันเลยครับ

เปิด MikroTik Terminal ครับ



ก็อบปี้โค็ดด้านล่างไปใส่ใน Terminal ครับ



#| MikroTik Script Block BitTorrent V1.0
#| Web  : http://mikrotikshop.blogspot.com/
#| Email: pstudiodev@gmail.com
#| Phone: +66896494533

#|
#| Create L7 Protocols, we will filter all bit torrent expression.
#|
/ip firewall layer7-protocol add name=layer7-bittorrent-exp \
regexp="^(\\x13bittorrent protocol|azver\\x01\$|get /scrape\\\?info_hash=get /announce\\\?info_hash=|get /client/bitcomet/|GET /data\\\?fid=)|d1:ad2:id20:|\\x08'7P\\)[RP]" comment="Block Bit Torrent"


#|
#| Add firewall filter.
#| P2P packages (p2p bit-torrent and exp matched) 
#|              ==> bit-list ==> if port = 80 or 443 then allow
#| else deny
#|

#| Block all P2P packages.
/ip firewall filter add action=add-src-to-address-list \
address-list=bit-list \
address-list-timeout=1m \
chain=forward \
disabled=no \
dst-address-list=!bit-unblock-list \
p2p=bit-torrent \
src-address-list=!bit-unblock-list

#| Block all package that matched bit torrent expression.
/ip firewall filter add action=add-src-to-address-list \
address-list=bit-list \
    address-list-timeout=1m \
    chain=forward \
    disabled=no \
    dst-address-list=!bit-unblock-list \
    layer7-protocol=layer7-bittorrent-exp \
    src-address-list=!bit-unblock-list \
    src-address-type=local

#| Drop all TCP package that is in bit-list.
/ip firewall filter add action=drop \
chain=forward \
disabled=no \
dst-port=!80,443 \
protocol=tcp \
    src-address-list=bit-list

#| Drop all UDP package that is in bit-list. (Some torrent program can download via UDP protocol)
/ip firewall filter add action=drop \
chain=forward \
disabled=no \
protocol=udp \
src-address-list=bit-list

เมื่อว่างเสร็จก็จะประมาณนี้นะครับ


ถ้าดูใน IP >> Firewall >> Filter จะได้ประมาณนี้ครับ


ถ้าดูใน IP >> Firewall >> Layer 7 Protocols ก็จะได้ประมาณนี้ครับ


ที่นี้เรามาโหลด Bit Torrent กันครับเอาที่มีคนปล่อยเยอะๆ


มาลองดูที่โปรแกรม Bit Torrent กันครับ


เห็นมั้ยครับ 0 Kb ต่อไปนี้ไม่ว่าจะโคตรพ่อโคตรแม่ Bit มาก็โหลดไม่ขึ้นแล้วครับ

8 comments:

  1. ให้โหลดได้แต่บังคับความเร็วแบบจับเข้าคิวได้หรือเปล่าครับ

    ReplyDelete
    Replies
    1. ทำได้เหมือนกันครับแต่ต้องใช้พวก Simple Queue หรือ Queue Tree ครับ

      Delete
  2. ถ้ามันเข้ารหัสจะรอดไหม ผม กับตัวเซิฟเวอร์ อยู่คนละที่ด้วย จะลองก็ลองไม่ได้

    ReplyDelete
    Replies
    1. ถ้ามีการเข้ารหัสก็ block ไม่ได้ครับ

      Delete
  3. เข้ารหัสยังไงครับ

    ReplyDelete
  4. ทำ บายพาสสักเครื่องได้มั๊ยครับ ใส่ MAC Address

    ReplyDelete
    Replies
    1. ได้คัรบสามารถทำ white list ได้ใน address list เลยครบ

      Delete
  5. ทำในเครื่องเรา แล้วมันจะไปบ๊อคเครื่องคนอื่นในวงหรอครับ

    ReplyDelete