Sun Sep 25, 2011 9:58 pm
this will block p2p
just change src-address & time if needed
/ip firewall layer7-protocol
add comment="" name=BITTORRENT_ANNOUNCE regexp=^get.+announce.
add comment="" name=BITTORENT 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]\\r\\n"
/ip firewall filter
add action=add-src-to-address-list address-list=Torrent address-list-timeout=\
1h30m chain=forward comment=" ______Bittorent_____" disabled=no \
layer7-protocol=BITTORENT src-address=192.168.0.10-192.168.0.254 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no layer7-protocol=\
BITTORENT reject-with=icmp-network-unreachable time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=yes layer7-protocol=\
BITTORENT reject-with=icmp-network-unreachable time=\
0s-1h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=add-src-to-address-list address-list="Torrent Announce" \
address-list-timeout=1h30m chain=forward comment=______Announce____ \
disabled=no layer7-protocol=BITTORRENT_ANNOUNCE src-address=\
192.168.0.10-192.168.0.254 time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no layer7-protocol=\
BITTORRENT_ANNOUNCE reject-with=icmp-network-unreachable time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=yes layer7-protocol=\
BITTORRENT_ANNOUNCE reject-with=icmp-network-unreachable time=\
0s-1h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=add-src-to-address-list address-list="Torrent udp" \
address-list-timeout=1h30m chain=forward comment="____6881-6999 udp___" \
disabled=no dst-port=6881-6968,6970-6999 protocol=udp src-address=\
192.168.0.10-192.168.0.254 time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=\
6881-6968,6970-6999 protocol=udp reject-with=icmp-network-unreachable \
time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=add-src-to-address-list address-list="Torrent tcp" \
address-list-timeout=1h30m chain=forward comment="____6881-6999 tcp___" \
disabled=no dst-port=6881-6968,6970-6999 protocol=tcp src-address=\
192.168.0.10-192.168.0.254 time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=\
6881-6968,6970-6999 protocol=tcp reject-with=icmp-network-unreachable \
time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=add-src-to-address-list address-list="Torrent all-p2p" \
address-list-timeout=1h30m chain=forward comment=\
__________All-p2p__________ disabled=no p2p=all-p2p src-address=\
192.168.0.10-192.168.0.254 time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no p2p=all-p2p \
reject-with=icmp-network-unreachable time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="Torrent cleaning" disabled=no \
dst-port=10000-65500 protocol=tcp reject-with=icmp-network-unreachable \
src-address-list=Torrent src-port=10000-65500 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=udp reject-with=icmp-network-unreachable src-address-list=\
Torrent src-port=10000-65500 time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent Announce" src-port=10000-65500 time=\
9h-23h59m,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=udp reject-with=icmp-network-unreachable src-address-list=\
"Torrent Announce" src-port=10000-65500 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent udp" src-port=10000-65500 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=udp reject-with=icmp-network-unreachable src-address-list=\
"Torrent udp" src-port=10000-65500 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent tcp" src-port=10000-65500 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=udp reject-with=icmp-network-unreachable src-address-list=\
"Torrent tcp" src-port=10000-65500 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
Torrent src-port=1000-5000 time=0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent Announce" src-port=1000-5000 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent udp" src-port=1000-5000 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent tcp" src-port=1000-5000 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat
add action=reject chain=forward comment="" disabled=no dst-port=10000-65500 \
protocol=tcp reject-with=icmp-network-unreachable src-address-list=\
"Torrent all-p2p" src-port=1000-5000 time=\
0s-23h59m59s,sun,mon,tue,wed,thu,fri,sat