0% found this document useful (0 votes)
101 views

Script 1isp Ega Chanel

This document configures traffic marking and queueing on a MikroTik router. It performs the following: 1. Defines protocols for speedtests and streaming. 2. Marks traffic based on source, destination, interface, protocol and other criteria. This includes marking speedtests, streaming, ICMP, ports, traffic rates and volumes. 3. Adds routes to prefer certain gateways for marked traffic like games and heavy ports. 4. Configures queue trees to prioritize different marked traffic for downloading and uploading. 5. Defines simple queues to apply target queues for broad traffic markings.

Uploaded by

yama yama
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Script 1isp Ega Chanel

This document configures traffic marking and queueing on a MikroTik router. It performs the following: 1. Defines protocols for speedtests and streaming. 2. Marks traffic based on source, destination, interface, protocol and other criteria. This includes marking speedtests, streaming, ICMP, ports, traffic rates and volumes. 3. Adds routes to prefer certain gateways for marked traffic like games and heavy ports. 4. Configures queue trees to prioritize different marked traffic for downloading and uploading. 5. Defines simple queues to apply target queues for broad traffic markings.

Uploaded by

yama yama
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

/ip firewall layer7-protocol

add name=speedtest regexp="^.+(speedtest).*\\\$"


add name=streaming regexp="^.+(.youtube.|ytimg|googlevideo.com|youtu.be).*\$"

/ip firewall mangle


add action=mark-connection chain=prerouting comment="TOTAL ALL" \
dst-address-list="!IP MENGGUNAKAN PORT RANDOM" new-connection-mark=\
"TOTAL ALL" passthrough=yes protocol=!icmp src-address-list=lokal
add action=mark-packet chain=forward connection-mark="TOTAL ALL" \
dst-address-list=lokal in-interface="ether1-INTERNET" new-packet-mark=\
"DOWNLOAD ALL ISP1" passthrough=yes protocol=!icmp src-address-list=\
"!IP MENGGUNAKAN PORT RANDOM"
add action=mark-packet chain=forward connection-mark="TOTAL ALL" \
dst-address-list="!IP MENGGUNAKAN PORT RANDOM" new-packet-mark=\
"UPLOAD ALL ISP1" out-interface="ether1-INTERNET" passthrough=yes protocol=\
!icmp src-address-list=lokal
add action=add-dst-to-address-list address-list="IP MENGGUNAKAN PORT RANDOM" \
address-list-timeout=1m chain=prerouting comment=GAME dst-address-list=\
!kecuali dst-port=\
!21,22,23,81,88,5060,843,182,8777,1935,53,8000-8081,443,80 protocol=tcp \
src-address-list=lokal
add action=add-dst-to-address-list address-list="IP MENGGUNAKAN PORT RANDOM" \
address-list-timeout=1m chain=prerouting dst-address-list=!kecuali \
dst-port=!21,22,23,81,88,5060,843,182,8777,1935,53,8000-8081,443,80 \
protocol=udp src-address-list=lokal
add action=mark-packet chain=forward dst-address-list=lokal in-interface=\
"ether1-INTERNET" new-packet-mark="PORT SELAIN PORT UMUM(GAME) DOWN ISP1" \
passthrough=yes src-address-list="IP MENGGUNAKAN PORT RANDOM"
add action=mark-packet chain=forward dst-address-list=\
"IP MENGGUNAKAN PORT RANDOM" new-packet-mark=\
"PORT SELAIN PORT UMUM(GAME) UP ISP1" out-interface="ether1-INTERNET" \
passthrough=yes src-address-list=lokal
add action=add-dst-to-address-list address-list="PORT BERAT" \
address-list-timeout=59m chain=prerouting comment="PORT RANDOM BERAT" \
connection-rate=1M-999M dst-address-list="IP MENGGUNAKAN PORT RANDOM" \
src-address-list=lokal
add action=add-dst-to-address-list address-list="PORT BERAT" \
address-list-timeout=59m chain=prerouting connection-bytes=\
10000000-999000000 dst-address-list="IP MENGGUNAKAN PORT RANDOM" \
src-address-list=lokal
add action=mark-packet chain=forward dst-address-list=lokal in-interface=\
"ether1-INTERNET" new-packet-mark="PORT BERAT DOWN ISP1" passthrough=no \
src-address-list="PORT BERAT"
add action=mark-packet chain=forward dst-address-list="PORT BERAT" \
new-packet-mark="PORT BERAT UP ISP1" out-interface="ether1-INTERNET" \
passthrough=no src-address-list=lokal
add action=mark-connection chain=prerouting comment=ICMP new-connection-mark=\
ICMP passthrough=yes protocol=icmp
add action=mark-packet chain=forward connection-mark=ICMP in-interface=\
"ether1-INTERNET" new-packet-mark="ICMP DOWN ISP1" passthrough=no
add action=mark-packet chain=forward connection-mark=ICMP new-packet-mark=\
"ICMP UP ISP1" out-interface="ether1-INTERNET" passthrough=no
add action=mark-connection chain=prerouting comment=SPEEDTEST \
layer7-protocol=speedtest new-connection-mark=speedtest passthrough=yes
add action=mark-packet chain=forward connection-mark=speedtest in-interface=\
"ether1-INTERNET" new-packet-mark="SPEEDTEST DOWN ISP1" passthrough=no
add action=mark-packet chain=forward connection-mark=speedtest \
new-packet-mark="SPEEDTEST UP ISP1" out-interface="ether1-INTERNET" \
passthrough=no
add action=add-dst-to-address-list address-list="UMUM BERAT" \
address-list-timeout=25s chain=prerouting comment="TRAFICK UMUM BERAT" \
connection-bytes=5000000-999000000 connection-mark="TOTAL ALL" \
connection-rate=512k-999M dst-address-list="!IP MENGGUNAKAN PORT RANDOM" \
layer7-protocol=!streaming src-address-list=lokal
add action=mark-packet chain=forward dst-address-list=lokal in-interface=\
"ether1-INTERNET" layer7-protocol=!streaming new-packet-mark=\
"UMUM BERAT DOWN ISP1" passthrough=yes src-address-list="UMUM BERAT"
add action=mark-packet chain=forward dst-address-list="UMUM BERAT" \
layer7-protocol=!streaming new-packet-mark="UMUM BERAT UP ISP1" \
out-interface="ether1-INTERNET" passthrough=yes src-address-list=lokal
add action=mark-packet chain=forward comment="STREAMING VIDEO" \
dst-address-list=lokal in-interface="ether1-INTERNET" layer7-protocol=\
streaming new-packet-mark="STREAMING VIDEO DOWN ISP1" passthrough=no
add action=mark-packet chain=forward layer7-protocol=streaming \
new-packet-mark="STREAMING VIDEO UP ISP1" out-interface="ether1-INTERNET" \
passthrough=no src-address-list=lokal
add action=mark-routing chain=prerouting comment=GAME dst-address-list=\
"IP MENGGUNAKAN PORT RANDOM" new-routing-mark=GAME passthrough=yes \
src-address-list=lokal
add action=mark-routing chain=prerouting comment="PORT RANDOM BERAT" \
dst-address-list="PORT BERAT" new-routing-mark=BERAT passthrough=yes \
src-address-list=lokal
add action=mark-routing chain=prerouting comment=ICMP dst-address-list=\
!kecuali new-routing-mark=ICMP passthrough=yes protocol=icmp \
src-address-list=lokal

/ip route
add check-gateway=ping distance=2 gateway=192.168.1.1 routing-mark=GAME
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=BERAT
add check-gateway=ping distance=2 gateway=192.168.1.1 routing-mark=ICMP
add check-gateway=ping distance=1 gateway=192.168.1.1

//////////////////////////////////////

/ip firewall address-list


add address=192.168.100.0/24 list=lokal

///////////////////////////////////

/ip firewall address-list


add address=192.168.1.2/24 list=kecuali
add address=192.168.1.1 list=kecuali
add address=192.168.100.0/24 list=kecuali

//////////////////////////////////////////

/queue tree
add name="GLOBAL ALL" parent=global
add name=A.ISP1 parent="GLOBAL ALL"
add name=1.UKKNOWN packet-mark=no-mark parent="GLOBAL ALL"
add name=ISP1-DOWNLOAD parent=A.ISP1 queue=pcq-download-default
add name=ISP1-UPLOAD parent=A.ISP1 queue=pcq-upload-default
add name="2.ISP1-ICMP DOWN" packet-mark="ICMP DOWN ISP1" parent=ISP1-DOWNLOAD \
priority=2 queue=pcq-download-default
add name="1.ISP1-GAME DOWN" packet-mark=\
"PORT SELAIN PORT UMUM(GAME) DOWN ISP1" parent=ISP1-DOWNLOAD priority=1 \
queue=pcq-download-default
add max-limit=30M name="4.ISP1-ALL TRAFIC DOWN" parent=ISP1-DOWNLOAD \
priority=2 queue=pcq-download-default
add name="a.isp1-umum ringan all down" packet-mark="DOWNLOAD ALL ISP1" \
parent="4.ISP1-ALL TRAFIC DOWN" priority=2 queue=pcq-download-default
add name="d.isp1-port random berat down" packet-mark="PORT BERAT DOWN ISP1" \
parent="4.ISP1-ALL TRAFIC DOWN" priority=2 queue=pcq-download-default
add name="e.isp1-speedtest web down" packet-mark="SPEEDTEST DOWN ISP1" parent=\
"4.ISP1-ALL TRAFIC DOWN" priority=2 queue=default
add name="1.ISP1-GAME UP" packet-mark="PORT SELAIN PORT UMUM(GAME) UP ISP1" \
parent=ISP1-UPLOAD priority=1 queue=pcq-upload-default
add name="2.ISP1-ICMP UP" packet-mark="ICMP UP ISP1" parent=ISP1-UPLOAD \
priority=2 queue=pcq-upload-default
add max-limit=5M name="4.ISP1-ALL TRAFIC UP" parent=ISP1-UPLOAD priority=2 \
queue=pcq-upload-default
add name="a.isp1-umum ringan all up" packet-mark="UPLOAD ALL ISP1" parent=\
"4.ISP1-ALL TRAFIC UP" priority=2 queue=pcq-upload-default
add name="d.isp1-port random berat up" packet-mark="PORT BERAT UP ISP1" \
parent="4.ISP1-ALL TRAFIC UP" priority=2 queue=pcq-upload-default
add name="e.isp1-speedtest web up" packet-mark="SPEEDTEST UP ISP1" parent=\
"4.ISP1-ALL TRAFIC UP" priority=2 queue=default
add name="b.isp1-Streaming video down" packet-mark=\
"STREAMING VIDEO DOWN ISP1" parent="4.ISP1-ALL TRAFIC DOWN" priority=2 \
queue=pcq-download-default
add name="b.isp1-Streaming video up" packet-mark="STREAMING VIDEO UP ISP1" \
parent="4.ISP1-ALL TRAFIC UP" priority=2 queue=pcq-upload-default
add name="c.isp1-umum berat all down" packet-mark="UMUM BERAT DOWN ISP1" \
parent="4.ISP1-ALL TRAFIC DOWN" priority=2 queue=pcq-download-default
add name="c.isp1-umum berat all up" packet-mark="UMUM BERAT UP ISP1" parent=\
"4.ISP1-ALL TRAFIC UP" priority=2 queue=pcq-upload-default

/queue simple
add name="ALL TRAFICK" packet-marks="DOWNLOAD ALL ISP1,UPLOAD ALL ISP1,PORT BERAT
DOWN ISP1,
PORT BERAT UP ISP1,SPEEDTEST DOWN ISP1,
SPEEDTEST UP ISP1,STREAMING VIDEO DOWN ISP1,
STREAMING VIDEO UP ISP1,
UMUM BERAT DOWN ISP1,UMUM BERAT UP ISP1"
priority=3/3 queue=default/default target="192.168.100.0/24,"

add name="2.CLIEN HOTSPOT" parent="ALL TRAFICK" priority=3/3 \


queue=default/default

You might also like