Di kesempatan kali ini saya coba mencontohkan cara limit video streaming atau youtube, agar penggunaan koneksi internet dapat digunakan sebagaimana mestinya. Disini kita akan memanfaatkan layer-7 filtering untuk trap koneksi video streaming. Oke deh dilanjut ke eksekusinya, anggap saja kita mau membatasi / limit salah satu situs video streaming YouTube dengan Mikrotik.
Cara Membatasi Youtube di MikroTik
Yang pertama kita buat layer-7 filteringnya dahulu
1
2
3
|
/ip firewall layer7-protocol
add name=video_stream regexp=”(get_video\\\?|videoplayback\\\?|videodownload\\\
\?|\\.flv\\\?|\\.fid\\\?)“
|
1
2
3
4
5
6
7
8
9
|
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=ether1-lan new-connection-mark=\
“all_conn[adamonline.web.id]” passthrough=yes
add action=mark-connection chain=prerouting disabled=no in-interface=ether1-lan layer7-protocol=\
video_stream new-connection-mark=”video_conn[adamonline.web.id]” passthrough=yes
add action=mark-packet chain=prerouting connection-mark=”video_conn[adamonline.web.id]” disabled=no \
new-packet-mark=”video_packet[adamonline.web.id]” passthrough=no
add action=mark-packet chain=prerouting connection-mark=”all_conn[adamonline.web.id]” disabled=no \
new-packet-mark=”all_packet[adamonline.web.id]” passthrough=no
|
1
2
3
4
5
6
7
8
9
10
|
/queue simple
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=\
“Membatasi video streaming (ex: youtube) – [adamonline.web.id]” direction=both disabled=no interface=\
all limit-at=0/0 max-limit=1M/1M name=”Browsing, DLL” packet-marks=”all_packet[adamonline.web.id]” \
parent=none priority=8 queue=default-small/default-small target-addresses=192.168.65.0/24 total-queue=\
default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both disabled=no interface=all limit-at=\
0/0 max-limit=128k/128k name=”Video Streaming/Youtube” packet-marks=”video_packet[adamonline.web.id]” \
parent=none priority=8 queue=default-small/default-small target-addresses=192.168.65.0/24 total-queue=\
default-small
|
Di Winbox hasilnya akan seperti ini :