100% found this document useful (2 votes)
1K views

Backup-Script RAW-Mangle-Queue Tree-Simple Queue

The document contains Mikrotik router scripts for configuring firewall rules, packet marking, and queue management for traffic related to games, general internet access, and YouTube. The scripts add firewall rules to allow game traffic, mark game and other traffic with different connection and packet marks, and configure queue trees and simple queues to prioritize and shape traffic accordingly.

Uploaded by

ismanto hamani
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views

Backup-Script RAW-Mangle-Queue Tree-Simple Queue

The document contains Mikrotik router scripts for configuring firewall rules, packet marking, and queue management for traffic related to games, general internet access, and YouTube. The scripts add firewall rules to allow game traffic, mark game and other traffic with different connection and packet marks, and configure queue trees and simple queues to prioritize and shape traffic accordingly.

Uploaded by

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

Script RAW Mikrotik (GAME, KONEKSI UMUM, YOUTUBE)

===================================================================================
====
/ip firewall raw
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting comment=PUBG dst-address-list=!IP-Lokal dst-port=\
7889,10012,17500,18081 protocol=tcp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=\
8011,9030,10010-10650,11000-14000,17000,20000,20001,20002 protocol=udp \
src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting comment="FREE FIRE" dst-address-list=!IP-Lokal \
dst-port=7006,14000,20561,39698,39779,39003 protocol=tcp \
src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=\
7008,10000-10009,17000 protocol=udp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting comment="MOBILE LEGENDS" dst-address-list=!IP-Lokal \
dst-port=5000-5508,5551-5558,5601-5608,5651-5658,30097-30147,9000-9010 \
protocol=tcp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=\
5000-5200,5500-5700,8001,30000-30300,9000-9010 protocol=udp \
src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting comment="POINT BLANK" dst-address-list=!IP-Lokal \
dst-port=39190-39200,49001-49190 protocol=tcp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=40000-40010 \
protocol=udp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting comment=AOV dst-address-list=!IP-Lokal dst-port=\
10001-10094 protocol=tcp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=\
10101-10201,10080-10110,17000-18000 protocol=udp src-address-list=\
IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting comment="CALL OF DUTY" dst-address-list=!IP-Lokal \
dst-port=3013,18082,65010,65050 protocol=tcp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Game address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=\
7500-7700,17000-20100 protocol=tcp src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Umum address-list-timeout=\
12h chain=prerouting comment="PORT UMUM" dst-address-list=!IP-Lokal \
dst-port=80,81,443,8000-8081,21,22,23,81,88,5050,843,182,53 protocol=tcp \
src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Umum address-list-timeout=\
12h chain=prerouting dst-address-list=!IP-Lokal dst-port=\
80,81,443,8000-8081,21,22,23,81,88,5050,843,182,53 protocol=udp \
src-address-list=IP-Lokal
add action=add-dst-to-address-list address-list=IP-Youtube \
address-list-timeout=30m chain=prerouting comment=YOUTUBE content=\
googlevideo.com dst-address-list=!IP-Lokal src-address-list=IP-Lokal

Script Mangle Mikrotik (GAME, KONEKSI UMUM, YOUTUBE)


===================================================================================
====
/ip firewall mangle
add action=mark-connection chain=prerouting comment=ICMP-DNS \
dst-address-list=!IP-Lokal new-connection-mark=ICMP-DNS passthrough=yes \
protocol=icmp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-address-list=!IP-Lokal \
dst-port=53 new-connection-mark=ICMP-DNS passthrough=yes protocol=udp \
src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=ICMP-DNS in-interface=\
ether1-Internet new-packet-mark=ICMP-DNS-Download passthrough=no
add action=mark-packet chain=forward connection-mark=ICMP-DNS \
new-packet-mark=ICMP-DNS-Upload out-interface=ether1-Internet \
passthrough=no
add action=mark-connection chain=postrouting comment="GAME ONLINE" \
dst-address-list=IP-Game new-connection-mark=Game-Online passthrough=yes \
src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Game-Online \
in-interface=ether1-Internet new-packet-mark=Game-Download passthrough=no
add action=mark-packet chain=forward connection-mark=Game-Online \
new-packet-mark=Game-Upload out-interface=ether1-Internet passthrough=no
add action=mark-connection chain=postrouting comment=\
"Alihkan Game Online ke Koneksi Umum" connection-rate=200k-100M \
dst-address-list=IP-Game new-connection-mark=Koneksi-Umum passthrough=yes \
src-address-list=IP-Lokal
add action=mark-connection chain=postrouting comment="KONEKSI UMUM" \
dst-address-list=IP-Umum new-connection-mark=Koneksi-Umum passthrough=yes \
src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Koneksi-Umum \
in-interface=ether1-Internet new-packet-mark=Umum-Download passthrough=no
add action=mark-packet chain=forward connection-mark=Koneksi-Umum \
new-packet-mark=Umum-Upload out-interface=ether1-Internet passthrough=no
add action=mark-connection chain=postrouting comment=YOUTUBE \
dst-address-list=IP-Youtube new-connection-mark=Koneksi-Youtube \
passthrough=yes src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Koneksi-Youtube \
in-interface=ether1-Internet new-packet-mark=Youtube-Download \
passthrough=no
add action=mark-packet chain=forward connection-mark=Koneksi-Youtube \
new-packet-mark=Youtube-Upload out-interface=ether1-Internet passthrough=\
no

Script Queue Tree Mikrotik


===================================================================================
====
/queue tree
add name="GLOBAL TRAFFIC" parent=global queue=default
add max-limit=20M name="TOTAL DOWNLOAD" parent="GLOBAL TRAFFIC" queue=\
pcq-download-default
add max-limit=4M name="TOTAL UPLOAD" parent="GLOBAL TRAFFIC" queue=\
pcq-upload-default
add name="1.GAME DOWNLOAD" packet-mark=Game-Download parent="TOTAL DOWNLOAD" \
priority=1 queue=pcq-download-default
add name="1.GAME UPLOAD" packet-mark=Game-Upload parent="TOTAL UPLOAD" \
priority=1 queue=pcq-upload-default
add name="2.ICMP-DNS DOWNLOAD" packet-mark=ICMP-DNS-Download parent=\
"TOTAL DOWNLOAD" queue=pcq-download-default
add name="2.ICMP-DNS UPLOAD" packet-mark=ICMP-DNS-Upload parent=\
"TOTAL UPLOAD" queue=pcq-upload-default
add max-limit=14M name="3.ALL-TRAFFIC DOWNLOAD" parent="TOTAL DOWNLOAD" \
queue=pcq-download-default
add max-limit=2M name="3.ALL-TRAFFIC UPLOAD" parent="TOTAL UPLOAD" queue=\
pcq-upload-default
add limit-at=7M max-limit=14M name=1.UMUM-Download packet-mark=Umum-Download \
parent="3.ALL-TRAFFIC DOWNLOAD" queue=pcq-download-default
add limit-at=1M max-limit=2M name=1.UMUM-Upload packet-mark=Umum-Upload \
parent="3.ALL-TRAFFIC UPLOAD" queue=pcq-upload-default
add limit-at=7M max-limit=14M name=2.YOUTUBE-Download packet-mark=\
Youtube-Download parent="3.ALL-TRAFFIC DOWNLOAD" priority=3 queue=\
pcq-download-default
add limit-at=1M max-limit=2M name=2.YOUTUBE-Upload packet-mark=Youtube-Upload \
parent="3.ALL-TRAFFIC UPLOAD" priority=3 queue=pcq-upload-default

Script Simple Queue Mikrotik


===================================================================================
====
/queue simple
add max-limit=4M/20M name=TOTAL-BANDWIDTH queue=default/default target=\
192.168.5.0/24,192.168.50.0/24,192.168.90.0/24
add name=1.GAME-ONLINE packet-marks=Game-Upload,Game-Download parent=\
TOTAL-BANDWIDTH priority=1/1 queue=\
pcq-upload-default/pcq-download-default target=\
192.168.5.0/24,192.168.50.0/24,192.168.90.0/24
add name=2.ICMP-DNS packet-marks=ICMP-DNS-Upload,ICMP-DNS-Download parent=\
TOTAL-BANDWIDTH queue=pcq-upload-default/pcq-download-default target=\
192.168.5.0/24,192.168.50.0/24,192.168.90.0/24
add max-limit=2M/14M name="3.ALL-TRAFFIC UMUM YOUTUBE" packet-marks=\
Umum-Upload,Umum-Download,Youtube-Upload,Youtube-Download parent=\
TOTAL-BANDWIDTH queue=default/default target=\
192.168.5.0/24,192.168.50.0/24,192.168.90.0/24
add max-limit=1M/5M name=1.Client-Lokal parent="3.ALL-TRAFFIC UMUM YOUTUBE" \
queue=pcq-upload-default/pcq-download-default target=192.168.5.0/24
add name=2.Client-Hotspot parent="3.ALL-TRAFFIC UMUM YOUTUBE" queue=\
default/default target=192.168.50.0/24
add name=3.Client-PPPoE parent="3.ALL-TRAFFIC UMUM YOUTUBE" queue=\
default/default target=192.168.90.0/24

You might also like