Selasa, 22 Oktober 2019

scrip v4.5 by Ega

1. IP ADDRESS LIST
-----------------------------------------


Sesuaikan dengan ip di masing2 ether mikrotik kalian

/ip firewall address-list
add address=192.168.1.0/24 list="IP LOCAL"
add address=100.5.10.0/17 list="IP LOCAL"
add address=192.168.200.1/24 list="IP LOCAL"

--------------------------------------------------------------------------------------------------------------------------

2. RAW 
----------------------------------


bagian RAW tidak ada yg di ganti

/ip firewall raw
add action=add-dst-to-address-list address-list=youtube.com \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=YOUTUBE.COM \
    content=googlevideo.com dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=INSTAGRAM content=.cdninstagram.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=INSTAGRAM content=\
    scontent-sin6-2.cdninstagram.com dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=INSTAGRAM content=.instagram.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=WHATSAPP content=.whatsapp.net \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=WHATSAPP content=.whatsapp.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=fb content=.facebook.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=fb content=.facebook.net \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=fb content=.fbcdn.net \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=twitter content=.twitter.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=twitter content=twitter.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=twitter content=.twimg.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=.telegram.org content=.telegram.org \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=.telegram.org content=telegram.org \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
    "1d 00:00:00" chain=prerouting comment=tiktokcdn.com content=tiktokcdn.com \
    dst-address-list="!IP LOCAL"
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=DOTA2 \
    dst-address-list="!IP LOCAL" dst-port=27000-28998 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=PALADINS \
    dst-address-list="!IP LOCAL" dst-port=9000-9999 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=WARFRAME \
    dst-address-list="!IP LOCAL" dst-port=6695-6699 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "POINT BLANK - Zepetto" dst-address-list="!IP LOCAL" dst-port=\
    39190-39200,49001-49190 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="FIFA ONLINE" \
    dst-address-list="!IP LOCAL" dst-port=7770-7790 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=LOL \
    dst-address-list="!IP LOCAL" dst-port=2080-2099 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=HON \
    dst-address-list="!IP LOCAL" dst-port=11031 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=DRAGONNEST \
    dst-address-list="!IP LOCAL" dst-port=14300-14440 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="LOST SAGA" \
    dst-address-list="!IP LOCAL" dst-port=14000-14050 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="BLACK SQUAD" \
    dst-address-list="!IP LOCAL" dst-port=61000,62000 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "ECHO OF SOUL (EOS)" dst-address-list="!IP LOCAL" dst-port=7800 protocol=\
    tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=CROSSFIRE \
    dst-address-list="!IP LOCAL" dst-port=10009 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="IDOL STREET" \
    dst-address-list="!IP LOCAL" dst-port=2001-2010 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="RF ONLINE" \
    dst-address-list="!IP LOCAL" dst-port=27780 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="ROHAN ONLINE" \
    dst-address-list="!IP LOCAL" dst-port=22100 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "PERFECT WORLD" dst-address-list="!IP LOCAL" dst-port=29000 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=AYODANCE \
    dst-address-list="!IP LOCAL" dst-port=18900-18910 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "COUNTER-STRIKE ONLINE" dst-address-list="!IP LOCAL" dst-port=36567,8001 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=AYOOKE \
    dst-address-list="!IP LOCAL" dst-port=28001-28010 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "SPECIAL FORCE" dst-address-list="!IP LOCAL" dst-port=27920-27940 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=X-SHOT \
    dst-address-list="!IP LOCAL" dst-port=7320-7350 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "MERCENARY OPS" dst-address-list="!IP LOCAL" dst-port=6000-6125 protocol=\
    tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "PERFECT WORLD" dst-address-list="!IP LOCAL" dst-port=29000 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "LINE GET RICH" dst-address-list="!IP LOCAL" dst-port=10500-10515 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "COC (CLASH OF CLANS)" dst-address-list="!IP LOCAL" dst-port=9330-9340 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="DOMINO QQ" \
    dst-address-list="!IP LOCAL" dst-port=9122,11000-11150 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "SEVEN KNIGHTS (NETMARBLE)" dst-address-list="!IP LOCAL" dst-port=\
    12000-12010 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "CLASH ROYALE (CRY)" dst-address-list="!IP LOCAL" dst-port=9330-9340 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "LAST EMPIRE WAR Z" dst-address-list="!IP LOCAL" dst-port=9930-9940 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=MOSTLY \
    dst-address-list="!IP LOCAL" dst-port=9933 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "SHINOBI HEROES" dst-address-list="!IP LOCAL" dst-port=10005-10020 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "NARUTO LITTLE NINJA (CHINA)" dst-address-list="!IP LOCAL" dst-port=\
    6170-6180 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "POINT BLANK MOBILE / PB MOBILE" dst-address-list="!IP LOCAL" dst-port=\
    44590-44610 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "MOBILE LEGENDS: BANG BANG (ML)" dst-address-list="!IP LOCAL" dst-port=\
    5000-5508,5551-5558,5601-5608,5651-5658,30097-30147 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "ARENA OF VALOR (AOV)  GARENA" dst-address-list="!IP LOCAL" dst-port=\
    10001-10094 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "ARENA OF VALOR (AOV)  GARENA" dst-address-list="!IP LOCAL" dst-port=\
    10101-10201,10080-10110,17000-18000 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "DANCE UP INDO" dst-address-list="!IP LOCAL" dst-port=10000-10010 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "BOOYA CAPSA SUSUN" dst-address-list="!IP LOCAL" dst-port=7090-7100 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "BOOYA DOMINO QIUQIU" dst-address-list="!IP LOCAL" dst-port=7020-7030 \
    protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "Free fire garena" dst-address-list="!IP LOCAL" dst-port=\
    39698,39003,39779 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=DOTA2 \
    dst-address-list="!IP LOCAL" dst-port=27000-28998 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=PUBG \
    dst-address-list="!IP LOCAL" dst-port=7086-7995,12070-12460,41182-41192 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=PUBG \
    dst-address-list="!IP LOCAL" dst-port=10012,17500 protocol=tcp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=PALADINS \
    dst-address-list="!IP LOCAL" dst-port=9000-9999 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    BLACKRETRIBUTION dst-address-list="!IP LOCAL" dst-port=\
    7020-7050,8200-8220,9000-9020 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="LEFT4DEAD 2" \
    dst-address-list="!IP LOCAL" dst-port=4360-4390 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=WARFRAME \
    dst-address-list="!IP LOCAL" dst-port=4950-4955 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "LAST MAN TANDING" dst-address-list="!IP LOCAL" dst-port=34000-34025,3500 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "POINT BLANK - Zepetto" dst-address-list="!IP LOCAL" dst-port=40000-40010 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="FIFA ONLINE" \
    dst-address-list="!IP LOCAL" dst-port=16300-16350 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=LOL \
    dst-address-list="!IP LOCAL" dst-port=5100 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=HON \
    dst-address-list="!IP LOCAL" dst-port=11100-11125,11440-11460 protocol=\
    udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=DRAGONNEST \
    dst-address-list="!IP LOCAL" dst-port=15000-15500 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="LOST SAGA" \
    dst-address-list="!IP LOCAL" dst-port=14000-14050 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment="BLACK SQUAD" \
    dst-address-list="!IP LOCAL" dst-port=50000-50100 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "ECHO OF SOUL (EOS)" dst-address-list="!IP LOCAL" dst-port=5355 protocol=\
    udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=CROSSFIRE \
    dst-address-list="!IP LOCAL" dst-port=12060-12070 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "COUNTER-STRIKE ONLINE" dst-address-list="!IP LOCAL" dst-port=8001 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=AYOOKE \
    dst-address-list="!IP LOCAL" dst-port=26001-26010 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "SPECIAL FORCE" dst-address-list="!IP LOCAL" dst-port=30000-30030 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=X-SHOT \
    dst-address-list="!IP LOCAL" dst-port=7800-7850,30000 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=ROBLOX \
    dst-address-list="!IP LOCAL" dst-port=56849-57729,60275-64632 protocol=\
    udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "RULES OF SURVIVAL" dst-address-list="!IP LOCAL" dst-port=24000-24050 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "CLASH ROYALE (CRY)" dst-address-list="!IP LOCAL" dst-port=9330-9340 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "DREAM LEAGUE SOCCER" dst-address-list="!IP LOCAL" dst-port=60970-60980 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "RPG TORAM ONLINE" dst-address-list="!IP LOCAL" dst-port=30100-30110 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "ARENA OF VALOR (AOV)  GARENA" dst-address-list="!IP LOCAL" dst-port=\
    10080,17000 protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=\
    "Free fire garena" dst-address-list="!IP LOCAL" dst-port=10000-10007,7008 \
    protocol=udp
add action=add-dst-to-address-list address-list="IP GAME ONLINE" \
    address-list-timeout="1d 00:00:00" chain=prerouting comment=PUBG \
    dst-address-list="!IP LOCAL" dst-port="10491,10010,10013,10612,20002,20001\
    ,20000,12235,13748,13972,13894,11455,10096,10039" protocol=udp

--------------------------------------------------------------------------------------------------------------------------

3. MANGLE
--------------------------------



Untuk bagian MANGLE kalian sesuaikan nama masing2 ether1 yanga ada di mikrotik kalian
yg kalian perhatikan bagian in-interface, di sini in-interface saya ada "ether1-internet" jasi kalian sesuaikan dengan nama ether1 kalian masing2

/ip firewall mangle
add action=mark-connection chain=postrouting comment="TOTAL ALL" \
    connection-mark="!PORT SELAIN PORT UMUM ( GAME )" new-connection-mark=\
    "TOTAL ALL" packet-mark="!ICMP DOWN" passthrough=yes
add action=mark-packet chain=forward connection-mark="TOTAL ALL" \
    in-interface=ether1-internet new-packet-mark="DOWNLOAD ALL" passthrough=yes
add action=mark-packet chain=forward connection-mark="TOTAL ALL" \
    new-packet-mark="UPLUAD ALL" out-interface=ether1-internet passthrough=yes
add action=mark-connection chain=postrouting comment=GAME dst-address-list=\
    "IP GAME ONLINE" new-connection-mark="PORT SELAIN PORT UMUM ( GAME )" \
    passthrough=yes
add action=mark-packet chain=forward connection-mark=\
    "PORT SELAIN PORT UMUM ( GAME )" in-interface=ether1-internet new-packet-mark=\
    "PORT SELAIN PORT UMUM(GAME) DOWN" passthrough=yes
add action=mark-packet chain=forward connection-mark=\
    "PORT SELAIN PORT UMUM ( GAME )" new-packet-mark=\
    "PORT SELAIN PORT UMUM(GAME) UP" out-interface=ether1-internet passthrough=yes
add action=mark-connection chain=postrouting comment=\
    "MASUKAN PORT GAME KE TRAFICK BERAT JIKA 200k-999M" connection-mark=\
    "PORT SELAIN PORT UMUM ( GAME )" connection-rate=200k-999M \
    new-connection-mark="PORT BERAT" passthrough=yes
add action=mark-packet chain=forward connection-mark="PORT BERAT" \
    in-interface=ether1-internet new-packet-mark="PORT BERAT DOWN" passthrough=yes
add action=mark-packet chain=forward connection-mark="PORT BERAT" \
    new-packet-mark="PORT BERAT UP" out-interface=ether1-internet passthrough=yes
add action=mark-connection chain=postrouting comment=\
    "KEMBALIKAN PORT BERAT KE GAME JIKA TRAFICK 0K-200K" connection-mark=\
    "PORT BERAT" connection-rate=0-200k new-connection-mark=\
    "PORT SELAIN PORT UMUM ( GAME )" passthrough=yes
add action=mark-connection chain=postrouting 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" passthrough=yes
add action=mark-packet chain=forward connection-mark=ICMP new-packet-mark=\
    "ICMP UP" out-interface=ether1-internet passthrough=yes
add action=mark-connection chain=postrouting comment=SOSMED dst-address-list=\
    sosmed new-connection-mark=SOSMED passthrough=yes
add action=mark-packet chain=forward connection-mark=SOSMED in-interface=\
    ether1-internet new-packet-mark="SOSMED DOWN" passthrough=yes
add action=mark-packet chain=forward connection-mark=SOSMED new-packet-mark=\
    "SOSMED UP" out-interface=ether1-internet passthrough=yes
add action=mark-connection chain=postrouting comment=YOUTUBE \
    dst-address-list=youtube.com new-connection-mark=YT passthrough=yes
add action=mark-packet chain=forward connection-mark=YT in-interface=\
    ether1-internet new-packet-mark="YOUTUBE DOWN" passthrough=yes
add action=mark-packet chain=forward connection-mark=YT new-packet-mark=\
    "YOUTUBE UP" out-interface=ether1-internet passthrough=yes

--------------------------------------------------------------------------------------------------------------------------

4. QUEUE TREE
---------------------------



Unntuk bagian queue tree, kalian sesuaikan dengan paketan internetan kalian masing2
bagian yg berwarna kuning angka 40M dan 5M kalian sesuaikan dengan paketan internet kalian

/queue tree
add max-limit=40M name="TRAFICK GLOBAL DOWN" parent=global queue=\
    pcq-download-default
add max-limit=5M name="TRAFICK GLOBAL UP" parent=global queue=\
    pcq-download-default
add name="1.youtube.com down" packet-mark="YOUTUBE DOWN" parent=\
    "TRAFICK GLOBAL DOWN" queue=pcq-download-default
add name="1.youtube.com up" packet-mark="YOUTUBE UP" parent=\
    "TRAFICK GLOBAL UP" queue=pcq-upload-default
add name="2.Sosmed down" packet-mark="SOSMED DOWN" parent=\
    "TRAFICK GLOBAL DOWN" queue=pcq-download-default
add name="2.sosmed up" packet-mark="SOSMED UP" parent="TRAFICK GLOBAL UP" \
    queue=pcq-upload-default
add name="3.all trafic up" packet-mark="UPLUAD ALL" parent=\
    "TRAFICK GLOBAL UP" queue=pcq-download-default
add name="3.all trafic down" packet-mark="DOWNLOAD ALL" parent=\
    "TRAFICK GLOBAL DOWN" queue=pcq-download-default
add name="4.berat down" packet-mark="PORT BERAT DOWN" parent=\
    "TRAFICK GLOBAL DOWN" queue=pcq-download-default
add name="4.berat up" packet-mark="PORT BERAT UP" parent="TRAFICK GLOBAL UP" \
    queue=pcq-download-default
add max-limit=10M name="1.SELAIN PORT UMUM RINGAN GAME ONLINE DOWN" \
    packet-mark="PORT SELAIN PORT UMUM(GAME) DOWN" parent=global priority=1 \
    queue=pcq-download-default
add max-limit=5M name="2.PORT SELAIN PORT UMUM(GAME) UP" packet-mark=\
    "PORT SELAIN PORT UMUM(GAME) UP" parent=global priority=1 queue=\
    pcq-upload-default
add name="4.ICMP DOWN" packet-mark="ICMP DOWN" parent=global priority=1
add name="5.ICMP UP" packet-mark="ICMP UP" parent=global priority=1

--------------------------------------------------------------------------------------------------------------------------

5. SIMPLE QUEUE
-----------------------------------



Bagian simple queue juga kalian sesuaikan dengan paketan internet kalian masing2

/queue simple
add max-limit=5M/10M name="1.SELAIN PORT UMUM RINGAN GAME ONLINE DOWN" \
    packet-marks=\
    "PORT SELAIN PORT UMUM(GAME) DOWN,PORT SELAIN PORT UMUM(GAME) UP" \
    priority=1/1 queue=default/default target="100.5.0.0/17,192.168.1.0/24,192.168.200.0/24,"
add name="2.ICMP DOWNLOAD" packet-marks="ICMP DOWN,ICMP UP" priority=1/1 \
    queue=default/default target="100.5.0.0/17,192.168.1.0/24,192.168.200.0/24,"
add max-limit=5M/40M name="ALL TRAFICK" packet-marks="SOSMED UP,SOSMED DOWN,YOUTUBE UP,YOUTUBE DOWN,UPLUAD ALL,DOWNLOAD ALL,PORT BERAT DOWN,PORT BERAT UP"\
     priority=3/3 queue=pcq-upload-default/pcq-download-default target="100.5.0.0/17,192.168.1.0/24,192.168.200.0/24,"
add name="3.USER HOTSPOT&RUMAHAN" parent="ALL TRAFICK" priority=5/5 queue=\
    default/default

--------------------------------------------------------------------------------------------------------------------------

6. SCHEDULER
----------------------------------



scrip ini langsung copas ke terminal saja

/system scheduler
add name="del pppoe" on-event=\
    "/queue simple remove [find where comment=\"user_pppoe\"]" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-time=startup
add name="deluser-startup hotspot" on-event=\
    "/queue simple remove [find where comment=\"user_hotspot\"]" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-time=startup

--------------------------------------------------------------------------------------------------------------------------

7.USER STATIK SIMPLE QUEUE
---------------------------------------------------


Bagi kalian yang mempunyai user statik di simple queue, paste scrip di bawah ini, sebelum kalian maen paste, kalian sesuaikan dlu masing2 ip dan nama user nya, lihat bagian yang saya kasih warna MERAH, kalian sesuaikan dengan jumlah client dengan ip statik yang ada di simple queue kalian, misalkan tidak ada satu pun client yg menggunakan ip statik, ABAIKAN SCRIP INI....

/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="xiaomi" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.2
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="LAN PC" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.3
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="Evecross" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.4
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="TIARA" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.5
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="HALIMAH" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.6
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="AULIYA" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.7
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="ROJALI" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.8
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="Laptop Tiara" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.9
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="KIKI" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.10
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="WIFI PC" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.11
/queue simple add comment="Clien Rumahan static&ip binding"  max-limit=1200k/1200k name="Nokia" parent= "3.USER HOTSPOT&RUMAHAN" target=100.50.100.12

--------------------------------------------------------------------------------------------------------------------------

8. SCRIP HOTSPOT
------------------------------------



untuk scrip ini juga kalian sesuaikan dengan paketan di hotspot kalian, misalkan paket harian dengan limitasi 1M.1M, kalian isi di scrip ini, lihat bagian yang berwarna merah, untuk comment nya kalian sesuakan juga dengan nama paketan

SCRIP LOG IN

:local datetime [/system clock get date];
:local timedate [/system clock get time];
/queue simple add max-limit=2M/2M name="$user" comment=("HARIAN") parent="3.USER HOTSPOT&RUMAHAN" \ target=$address

SCRIP LOG OUT

/queue simple remove [find name="$user"] ;

--------------------------------------------------------------------------------------------------------------------------

9. SCRIP PPPOE
------------------------------------



Untuk bagian scrip PPPOE yang kalian perhatikan bagian yang berwarna merah, kalian sesuaikan dengan limitasi masing2 user pppoe yang kalian punya

"SCRIP LOG IN

:local address [/ppp active get [/ppp active  find name="$user"] address]
:log warning "$user login dengan ip $address"
:log warning "$user login dengan ip $address"
:local datetime [/system clock get date];
:local timedate [/system clock get time];
[/queue simple add max-limit=1M/1M name=("$user") comment="PPPOE" parent="3.USER HOTSPOT&RUMAHAN" \ target="$address"];

SCRIP LOG OUT

:log error "$user logout"
:log error "$user logout"
/queue simple remove [find name="$user"] ;

--------------------------------------------------------------------------------------------------------------------------


NB : Untuk masing2 user profil, bagian limitasi di kosongkan saja, karena limitasi nya sudah ada di dalam scrip, dan bagian transparent proxy nya jangan lupa di unchek list.

Apabila dalam penerapan scrip ini benar, mudah2an tidak ada masalah, dan satu lagi yg harus di perhatikan, sering2 cek bagian user profil > transparent proxy dan scrip, apabila transparent proxy nya di cheklis, di bagian scrip seperti nya otomatis hilang, dan itu bisa menyebabkan user hotspot LOSS limitasi, dari sumber yang saya alami sendiri.



CREDIT BY EGA

Video Tutorial Full Klik Link 




0 komentar: