100% found this document useful (1 vote)
2K views2 pages

Torrent Block

This document provides instructions for configuring a MikroTik router to block torrent traffic for devices on a local subnet. It involves 7 steps: 1) login to the router, 2) test before configuration, 3) create a layer 7 protocol to detect torrent traffic, 4) create firewall filter rules to log torrent sources, 5) create rules to block common torrent ports, 6) test after configuration, and 7) watch a tutorial video for additional help.

Uploaded by

arulmozs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views2 pages

Torrent Block

This document provides instructions for configuring a MikroTik router to block torrent traffic for devices on a local subnet. It involves 7 steps: 1) login to the router, 2) test before configuration, 3) create a layer 7 protocol to detect torrent traffic, 4) create firewall filter rules to log torrent sources, 5) create rules to block common torrent ports, 6) test after configuration, and 7) watch a tutorial video for additional help.

Uploaded by

arulmozs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

/ip firewall layer7-protocol

add name=torrentsites regexp="^.*(get|GET).+(torrent|thepiratebay|isohunt|


entertane|demonoid|btjunkie|mininova|flixflux|torrentz|vertor|h33t|btscene|
bitunity|bittoxic|thunderbytes|entertane|zoozle|vcdq|bitnova|bitsoup|meganova|
fulldls|btbot|flixflux|seedpeer|fenopy|gpirate|commonbits).*\$"

/ip firewall filter

add chain=forward src-address=192.168.15.0/24 layer7-protocol=torrentsites


action=drop comment=torrentsites
add chain=forward src-address=192.168.15.0/24 protocol=17 dst-port=53 layer7-
protocol=torrentsites action=drop comment=dropDNS
add chain=forward src-address=192.168.15.0/24 content=torrent action=drop
comment=keyword_drop
add chain=forward src-address=192.168.15.0/24 content=tracker action=drop
comment=trackers_drop
add chain=forward src-address=192.168.15.0/24 content=getpeers action=drop
comment=get_peers_drop
add chain=forward src-address=192.168.15.0/24 content=info_hash action=drop
comment=info_hash_drop
add chain=forward src-address=192.168.15.0/24 content=announce_peers action=drop
comment=announce_peers_drop

add chain=forward src-address=192.168.15.0/24 p2p=all-p2p action=drop


comment=p2p_drop

1. Login to your mikrotik device.(basic connectivity already been configured for


internet access)

2. Test before configuration

3. Click on new terminal


& copy-paste below script to create regexp in IP/Firewall/Layer 7 protocol
/ip firewall layer7-protocol
add comment=Block Torrents name=block-torrents regexp=^(\\x13bitt\
orrent protocol|azver\\x01\$|get /scrape\\\?info_hash=get /announce\\\?inf\
o_hash=|get /client/bitcomet/|GET /data\\\?fid=)|d1:ad2:id20:|\\x087P\\)[\
RP]

4. Copy & paste below script to create filter rule in IP/Firewall/Filter Rules
(change src-address=YOUR LOCAL SUBNET)
/ip firewall filter
add action=add-src-to-address-list address-list=Torrent-Conn \
address-list-timeout=2m chain=forward layer7-protocol=\
block-torrents src-address=192.168.1.0/24 src-address-list=\
!allow-bit
add action=add-src-to-address-list address-list=Torrent-Conn \
address-list-timeout=2m chain=forward p2p=all-p2p src-address=\
192.168.1.0/24 src-address-list=!allow-bit

5. Copy & paste below script to create filter rule in IP/Firewall/Filter Rules
(Most common ports use by torrent)
/ip firewall filter
add action=drop chain=forward dst-port=!0-1024,8291,5900,5800,3389,14147,5222,59905
protocol=tcp \
src-address-list=Torrent-Conn
add action=drop chain=forward dst-port=!0-1024,8291,5900,5800,3389,14147,5222,59905
protocol=udp \
src-address-list=Torrent-Conn

6. Test after configuration

7. Watch video tutorial below & dont forget to SUBSCRIBE for new updates.

You might also like