-->

SCRIPT PISAH GAMR MIKROTIK

 /ip firewall mangle

add action=mark-connection chain=prerouting comment=ICMP new-connection-mark=\
    Koneksi-ICMP passthrough=yes protocol=icmp src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Koneksi-ICMP \
    in-interface=ether1-Internet new-packet-mark=Paket-ICMP-Download \
    passthrough=yes
add action=mark-packet chain=forward connection-mark=Koneksi-ICMP \
    new-packet-mark=Paket-ICMP-Upload out-interface=ether1-Internet \
    passthrough=yes
add action=mark-connection chain=prerouting comment=DNS dst-port=53 \
    new-connection-mark=Koneksi-DNS passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Koneksi-DNS \
    in-interface=ether1-Internet new-packet-mark=Paket-DNS-Download \
    passthrough=yes
add action=mark-packet chain=forward connection-mark=Koneksi-DNS \
    new-packet-mark=Paket-DNS-Upload out-interface=ether1-Internet \
    passthrough=yes
add action=mark-connection chain=prerouting comment=PUBG dst-port=\
    7889,10012,17500,18081 new-connection-mark=Koneksi-Game passthrough=yes \
    protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    8011,9030,10010-10650,11000-14000,20000,20001,20002,17000 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="FREE FIRE" dst-port=\
    7006,14000,20561,39698,39779,39003 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=7008,10000-10009,17000 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="MOBILE LEGENDS" \
    dst-port=5500-5700,8001,30000-30300,9000-9010 new-connection-mark=\
    Koneksi-Game passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    5000-5200,5500-5700,8001,30000-30300,9000-9010 new-connection-mark=\
    Koneksi-Game passthrough=yes protocol=udp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="POINT BLANK" dst-port=\
    39190-39200,49001-49190 new-connection-mark=Koneksi-Game passthrough=yes \
    protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=40000-40010 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment=AOV dst-port=10001-10094 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=tcp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    10101-10201,10080-10110,17000-18000 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=udp src-address-list=IP-Lokal
add action=mark-packet chain=forward comment="GAME DOWNLOAD" connection-mark=\
    Koneksi-Game in-interface=ether1-Internet new-packet-mark=\
    Paket-Game-Download passthrough=yes
add action=mark-packet chain=forward comment="GAME UPLOAD" connection-mark=\
    Koneksi-Game new-packet-mark=Paket-Game-Upload out-interface=\
    ether1-Internet passthrough=yes
add action=mark-connection chain=prerouting comment="KONEKSI UMUM" \
    connection-mark=!Koneksi-Game dst-port=\
    80,81,443,8000-8081,21,22,23,81,88,5050,843,182,53 new-connection-mark=\
    Koneksi-Umum passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting connection-mark=!Koneksi-Game \
    dst-port=80,81,443,8000-8081,21,22,23,81,88,5050,843,182,53 \
    new-connection-mark=Koneksi-Umum passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-packet chain=forward comment="UMUM DOWNLOAD" connection-mark=\
    Koneksi-Umum in-interface=ether1-Internet new-packet-mark=\
    Paket-Umum-Download passthrough=yes
add action=mark-packet chain=forward comment="UMUM UPLOAD" connection-mark=\
    Koneksi-Umum new-packet-mark=Paket-Umum-Upload out-interface=\
    ether1-Internet passthrough=yes
add action=add-dst-to-address-list address-list=IP-Youtube \
    address-list-timeout=20m chain=prerouting comment="IP YOUTUBE" content=\
    googlevideo.com
add action=mark-connection chain=prerouting comment="KONEKSI YOUTUBE" \
    dst-address-list=IP-Youtube new-connection-mark=Koneksi-Youtube \
    passthrough=yes src-address-list=IP-Lokal
add action=mark-packet chain=forward comment="YOUTUBE DOWNLOAD" \
    connection-mark=Koneksi-Youtube in-interface=ether1-Internet \
    new-packet-mark=Paket-Youtube-Download passthrough=yes
add action=mark-packet chain=forward comment="YOUTUBE UPLOAD" \
    connection-mark=Koneksi-Youtube new-packet-mark=Paket-Youtube-Upload \
    out-interface=ether1-Internet passthrough=yes

/queue tree
add name="GLOBAL TRAFFIC" parent=global

/queue tree
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=Paket-Game-Download parent=\
    "TOTAL DOWNLOAD" priority=1 queue=pcq-download-default
add name="1.GAME Upload" packet-mark=Paket-Game-Upload parent="TOTAL UPLOAD" \
    priority=1 queue=pcq-upload-default
add name="2.ICMP Download" packet-mark=Paket-ICMP-Download parent=\
    "TOTAL DOWNLOAD" queue=pcq-download-default
add name="2.ICMP Upload" packet-mark=Paket-ICMP-Upload parent="TOTAL UPLOAD" \
    queue=pcq-upload-default
add name="3.DNS Download" packet-mark=Paket-DNS-Download parent=\
    "TOTAL DOWNLOAD" queue=pcq-download-default
add name="3.DNS Upload" packet-mark=Paket-DNS-Upload parent="TOTAL UPLOAD" \
    queue=pcq-upload-default
add max-limit=14M name="4.ALL-TRAFFIC DOWNLOAD" parent="TOTAL DOWNLOAD" \
    queue=pcq-download-default
add max-limit=2M name="4.ALL-TRAFFIC UPLOAD" parent="TOTAL UPLOAD" queue=\
    pcq-upload-default
add limit-at=7M max-limit=14M name=1.Umum-Download packet-mark=\
    Paket-Umum-Download parent="4.ALL-TRAFFIC DOWNLOAD" queue=\
    pcq-download-default
add limit-at=1M max-limit=2M name=1.Umum-Upload packet-mark=Paket-Umum-Upload \
    parent="4.ALL-TRAFFIC UPLOAD" queue=pcq-upload-default
add limit-at=7M max-limit=14M name=2.Youtube-Download packet-mark=\
    Paket-Youtube-Download parent="4.ALL-TRAFFIC DOWNLOAD" priority=5 queue=\
    pcq-download-default
add limit-at=1M max-limit=2M name=2.Youtube-Upload packet-mark=\
    Paket-Youtube-Upload parent="4.ALL-TRAFFIC UPLOAD" priority=5 queue=\
    pcq-upload-default

/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=Paket-Game-Upload,Paket-Game-Download \
    parent="TOTAL BANDWIDTH" priority=1/1 queue=default/default target=\
    192.168.5.0/24,192.168.50.0/24,192.168.90.0/24
add name=2.ICMP packet-marks=Paket-ICMP-Upload,Paket-ICMP-Download parent=\
    "TOTAL BANDWIDTH" queue=default/default target=\
    192.168.5.0/24,192.168.50.0/24,192.168.90.0/24
add name=3.DNS packet-marks=Paket-DNS-Upload,Paket-DNS-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=2M/14M name="4.ALL-TRAFFIC UMUM YOUTUBE" packet-marks="Paket-Umu\
    m-Upload,Paket-Umum-Download,Paket-Youtube-Upload,Paket-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="4.ALL-TRAFFIC UMUM YOUTUBE" \
    queue=pcq-upload-default/pcq-download-default target=192.168.5.0/24
add name=2.CLIENT-HOTSPOT parent="4.ALL-TRAFFIC UMUM YOUTUBE" queue=\
    default/default target=192.168.50.0/24
add name=3.CLIENT-PPPOE parent="4.ALL-TRAFFIC UMUM YOUTUBE" queue=\
    default/default target=192.168.90.0/24



===============================================================================

HARAP DI BACA TERLEBIH DAHULU	
---------------------------------

Script ini adalah script yang saya gunakan di jaringan yang saya konfigurasikan. jika ingin menggunakan script ini, silahkan lakukan penyesuaian dengan kondisi jaringan yang teman-teman konfigurasikan.

=========================================================================================================
Script untuk Menambahkan Network Address dari setiap Segmen Jaringan
untuk address/Network Address silahkan disesuaikan dengan format Network address 
yang digunakan.

/ip firewall address-list
add address=192.168.5.0/24 list=IP-Lokal   
add address=192.168.50.0/24 list=IP-Lokal
add address=192.168.90.0/24 list=IP-Lokal

=========================================================================================================
Script Contoh Marking Koneksi Game Online yang digunakan.
Sebelum Menambahkan Marking koneksi game ini, pastikan sudah menambahkan konfigurasi di bagian Address List
di Menu IP -> Firewall -> Address List
untuk lebih jelasnya silahkan gunakan script ini sambil menonton videonya agar tidak salah menerapkannya.

/ip firewall mangle
add action=mark-connection chain=prerouting comment=ICMP new-connection-mark=\
    Koneksi-ICMP passthrough=yes protocol=icmp src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Koneksi-ICMP \
    in-interface=ether1-Internet new-packet-mark=Paket-ICMP-Download \
    passthrough=no
add action=mark-packet chain=forward connection-mark=Koneksi-ICMP \
    new-packet-mark=Paket-ICMP-Upload out-interface=ether1-Internet \
    passthrough=no
add action=mark-connection chain=prerouting comment=DNS dst-port=53 \
    new-connection-mark=Koneksi-DNS passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-packet chain=forward connection-mark=Koneksi-DNS \
    in-interface=ether1-Internet new-packet-mark=Paket-DNS-Download \
    passthrough=no
add action=mark-packet chain=forward connection-mark=Koneksi-DNS \
    new-packet-mark=Paket-DNS-Upload out-interface=ether1-Internet \
    passthrough=no
add action=mark-connection chain=prerouting comment=PUBG dst-port=\
    5222,5228,7889,10012,17500,18081 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    8011,9030,10010-10650,11000-14000,20000,20001,20002,17000 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="FREE FIRE" dst-port=\
    7006,14000,20561,39698,39779,39003 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=7008,10000-10009,17000 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="MOBILE LEGENDS" \
    dst-port=5500-5700,8001,30000-30300,9000-9010 new-connection-mark=\
    Koneksi-Game passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    30097-30147,30000-30150,9001,30101-30105,5057,5228,5001-5009 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=tcp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=5520-5529,5551,5651,5153 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=tcp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    5000-5200,5500-5700,8001,30000-30300,9000-9010 new-connection-mark=\
    Koneksi-Game passthrough=yes protocol=udp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    5601-5602,5025,5605,5005,5503,5101-5109,5001-5009,30101 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    5520-5529,5020-5024,5501-5509,5517 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=udp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="POINT BLANK" dst-port=\
    39190-39200,49001-49190 new-connection-mark=Koneksi-Game passthrough=yes \
    protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=40000-40010 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=udp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment=AOV dst-port=10001-10094 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=tcp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    10101-10201,10080-10110,17000-18000 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=udp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="ORIGIN APEX LEGENDS" \
    dst-port=9960-9969,1024-1124,3216,18000,18120,18060,27900,28910,29900 \
    new-connection-mark=Koneksi-Game passthrough=yes protocol=tcp \
    src-address-list=IP-Lokal
add action=mark-connection chain=prerouting dst-port=\
    1024-1124,18000,29900,37000-40000 new-connection-mark=Koneksi-Game \
    passthrough=yes protocol=udp src-address-list=IP-Lokal

===================================================================================================
Script Marking Koneksi untuk Traffic Koneksi UMUM

/ip firewall mangle
add action=mark-connection chain=prerouting comment=KONEKSI-UMUM \
    connection-mark=!Koneksi-Game dst-port=\
    80,81,443,8000-8081,21,22,23,81,88,5050,843,182,53 new-connection-mark=\
    Koneksi-Umum passthrough=yes protocol=tcp src-address-list=IP-Lokal
add action=mark-connection chain=prerouting connection-mark=!Koneksi-Game \
    dst-port=80,81,443,8000-8081,21,22,23,81,88,5050,843,182,53 \
    new-connection-mark=Koneksi-Umum passthrough=yes protocol=udp \
    src-address-list=IP-Lokal

====================================================================================================
Script Marking IP Address dan Marking Koneksi Youtube

/ip firewall mangle
add action=add-dst-to-address-list address-list=IP-Youtube \
    address-list-timeout=30m chain=prerouting comment="IP YOUTUBE" content=\
    googlevideo.com src-address-list=IP-Lokal
add action=mark-connection chain=prerouting comment="KONEKSI YOUTUBE" \
    dst-address-list=IP-Youtube new-connection-mark=Koneksi-Youtube \
    passthrough=yes src-address-list=IP-Lokal
Related Posts