Monday, December 23, 2019

Setting Mikrotik Browsing, Social Media, Dan Game Online Lancar Tanpa Lag


Setting Mikrotik Browsing, Social Media, Dan Game Online Lancar Tanpa Lag – Pengaturan penting yang harus diterapkan pada jaringan adalah memisahkan trafik pengguna berdasarkan kategori.
Hal ini dibutuhkan karena penggunaan internet yang berbeda tiap orang. Ada yang menggunakan internet untuk berselancar situs, membuka sosial media, streaming video, dan bermain game. Agar tidak terjadi bentrok antar penggunaan internet tersebut harus memisahkan trafiknya.
Kali ini ramitan.com menulis tentang bagaimana mengatur perangkat Mikrotik yang menggunakan RouterOS agar lancar tanpa lag yang saya pakai untuk keperluan jaringan wireless dirumah.
Tutorial saya dapat dari Agung Cespun S di Facebook dengan sedikit tambahan port & konten game serta media sosial.
Baca juga: Pengaturan Dasar Sederhana Untuk Mikrotik Sampai Konek Internet
Untuk sekedar informasi disini saya menggunakan indihome 10mbps, nanti bisa kamu sesuaikan pengaturan queue tree, sesuaikan dengan settingan mikrotik kamu dan kecepatan internet kamu dirumah/diwarnet.

Sebelum kamu melakukan pengaturan mikrotik dengan tutorial ini, sangat penting terlebih dahulu baca catatan penting dibawah ini!

Sebelum memulai

  1. Pastikan mikrotik  RouterOS V6, lebih baik kamu update ke versi terbaru
  2. Sudah terhubung internet dengan IP Address, IP Pool, dan DHCP Server telah diatur. 
  3. Pada pengaturan ini ether1 = WAN (sumber internet)
  4. Nama interface ether1 tetap ether1.
  5. Kecepatan internet 10Mbps (nanti bisa kamu atur pada queue tree untuk kecepatan berbeda)
  6. Kalau kecepatan internet kamu bukan 10Mbps silahkan atur queue tree. Untuk LAN silahkan gunakan interface selain ether1.

Cara Setting Mikrotik Browsing, Social Media, Dan Game Online Tanpa Lag

Sekarang kamu bisa membuka Winbox dan mulai ikuti pengaturan dibawah ini untuk memulai.

1. Pengaturan IP Address List

Pada settingan awal kita tambahkan address list untuk jaringan lokal dan Google Global Cache (GGC).  IP addresss ggc-telkom yang digunakan khusus untuk indihome, kalo kamu memakai koneksi ISP lain, harap ganti IP address list ggc-telkom sesuaikan dengan ISP kamu bisa kamu cek disini

/ip firewall address-list
add address=0.0.0.0/8 list=private-lokal
add address=10.0.0.0/8 list=private-lokal
add address=100.64.0.0/10 list=private-lokal
add address=127.0.0.0/8 list=private-lokal
add address=169.254.0.0/16 list=private-lokal
add address=172.16.0.0/12 list=private-lokal
add address=192.0.0.0/24 list=private-lokal
add address=192.0.2.0/24 list=private-lokal
add address=192.168.0.0/16 list=private-lokal
add address=198.18.0.0/15 list=private-lokal
add address=198.51.100.0/24 list=private-lokal
add address=203.0.113.0/24 list=private-lokal
add address=224.0.0.0/3 list=private-lokal
add address=118.98.0.0/17 list=ggc-telkom
add address=118.97.0.0/16 list=ggc-telkom

2. Pengaturan Firewall Raw

Pada tahap kedua menggunakan filter raw untuk menangkap ip social media, seperti instagram, WhatsApp, Facebook, Life360, dan TikTok. Untuk game pada pengaturan ini untuk menangkap game Vainglory, Mobile Legends, Dan PUBG Mobile. Kamu bisa menambahkan port atau domain content lain apabila ingin menangkap social media atau game lain, bisa kamu sesuaikan pada winbox disesuaikan. Berikut skripnya:

/ip firewall raw
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment=Vainglory dst-address-list=\
!private-lokal dst-port=7000-8020 protocol=tcp src-address-list=\
private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment=Vainglory content=.superevil.net \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment="Mobile Legends" dst-address-list=\
!private-lokal dst-port=30000-30150 protocol=tcp src-address-list=\
private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment="Mobile Legends" content=\
.youngjoygame.com dst-address-list=!private-lokal src-address-list=\
private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment="PUBG Mobile" dst-address-list=\
!private-lokal dst-port=10012,17500 protocol=tcp src-address-list=\
private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment="PUBG Mobile" dst-address-list=\
!private-lokal dst-port="10491,10010,10013,10612,20002,20001,20000,12235,1\
3748,13972,13894,11455,10096,10039" protocol=udp src-address-list=\
private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment="PUBG Mobile" content=.igamecj.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment="PUBG Mobile" content=\
tencentgames.helpshift.com dst-address-list=!private-lokal \
src-address-list=private-lokal
add action=add-dst-to-address-list address-list=games address-list-timeout=\
none-dynamic chain=prerouting comment=Garena content=.garenanow.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=ig content=.cdninstagram.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=ig content=.instagram.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=WA content=.whatsapp.net \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=WA content=.whatsapp.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=life360 content=.life360.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=fb content=.facebook.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=fb content=.facebook.net \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=fb content=.fbcdn.net \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=twitter content=.twitter.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=twitter content=.twimg.com \
dst-address-list=!private-lokal src-address-list=private-lokal
add action=add-dst-to-address-list address-list=sosmed address-list-timeout=\
none-dynamic chain=prerouting comment=tiktok content=.tiktokv.com \
dst-address-list=!private-lokal src-address-list=private-lokal 

3. Pengaturan Mangle

Tahap ketiga menggunakan mangle dengan settingan sebagai berikut, berisi settingan mangle untuk browsing, social media, dan game online:

/ip firewall mangle
add action=mark-connection chain=prerouting comment=private-lokal \
dst-address-list=private-lokal new-connection-mark=private-lokal \
passthrough=yes src-address-list=private-lokal
add action=accept chain=prerouting comment=private-lokal connection-mark=\
private-lokal dst-address-list=private-lokal src-address-list=\
private-lokal
add action=mark-connection chain=prerouting comment=vip dst-address-list=\
!private-lokal new-connection-mark=vip passthrough=yes protocol=icmp \
src-address-list=private-lokal
add action=mark-connection chain=prerouting comment=dns dst-address-list=\
!private-lokal dst-port=53,5353,123,1194 new-connection-mark=vip \
passthrough=yes protocol=tcp src-address-list=private-lokal
add action=mark-connection chain=prerouting comment=dns dst-address-list=\
!private-lokal dst-port=53,5353,123,1194 new-connection-mark=vip \
passthrough=yes protocol=udp src-address-list=private-lokal
add action=accept chain=prerouting comment=vip connection-mark=vip
add action=mark-connection chain=prerouting comment=games dst-address-list=\
games new-connection-mark=games passthrough=yes src-address-list=\
private-lokal
add action=accept chain=prerouting comment=games connection-mark=games
add action=mark-connection chain=prerouting comment=sosmed dst-address-list=\
sosmed new-connection-mark=sosmed passthrough=yes src-address-list=\
private-lokal
add action=accept chain=prerouting comment=sosmed connection-mark=sosmed
add action=mark-connection chain=prerouting comment=ggc-telkom \
dst-address-list=ggc-telkom new-connection-mark=ggc-redirector \
passthrough=yes src-address-list=private-lokal
add action=accept chain=prerouting comment=ggc-redirector connection-mark=\
ggc-redirector
add action=mark-connection chain=prerouting comment=all-trafik \
dst-address-list=!private-lokal new-connection-mark=all-trafik \
passthrough=yes src-address-list=private-lokal
add action=accept chain=prerouting comment=all-trafik connection-mark=\
all-trafik
add action=jump chain=forward in-interface=ether1 jump-target=qos-down
add action=mark-packet chain=qos-down comment=vip-down connection-mark=vip \
new-packet-mark=vip-down passthrough=no
add action=mark-packet chain=qos-down comment=games-down connection-mark=\
games new-packet-mark=games-down passthrough=no
add action=mark-packet chain=qos-down comment=sosmed-down connection-mark=\
sosmed new-packet-mark=sosmed-down passthrough=no
add action=mark-packet chain=qos-down comment=ggc-telkom-down \
connection-mark=ggc-redirector new-packet-mark=ggc-telkom-down \
passthrough=no
add action=mark-packet chain=qos-down comment=browsing-down connection-bytes=\
0-1000000 connection-mark=all-trafik new-packet-mark=browsing-down \
passthrough=no
add action=mark-packet chain=qos-down comment=midle-down connection-bytes=\
1000001-3000000 connection-mark=all-trafik new-packet-mark=midle-down \
passthrough=no
add action=mark-packet chain=qos-down comment=high-down connection-bytes=\
3000001-1000000000 connection-mark=all-trafik new-packet-mark=high-down \
passthrough=no
add action=mark-packet chain=qos-down comment=unknown-down connection-mark=\
all-trafik new-packet-mark=unknown-down passthrough=no
add action=mark-packet chain=qos-down comment=unknown-down new-packet-mark=\
unknown-down passthrough=no
add action=return chain=qos-down
add action=jump chain=forward jump-target=qos-up out-interface=ether1
add action=mark-packet chain=qos-up comment=vip-up connection-mark=vip \
new-packet-mark=vip-up passthrough=no
add action=mark-packet chain=qos-up comment=games-up connection-mark=games \
new-packet-mark=games-up passthrough=no
add action=mark-packet chain=qos-up comment=sosmed-up connection-mark=sosmed \
new-packet-mark=sosmed-up passthrough=no
add action=mark-packet chain=qos-up comment=ggc-telkom-up connection-mark=\
ggc-redirector new-packet-mark=ggc-telkom-up passthrough=no
add action=mark-packet chain=qos-up comment=browsing-up connection-bytes=\
0-500000 connection-mark=all-trafik new-packet-mark=browsing-up \
passthrough=no
add action=mark-packet chain=qos-up comment=midle-up connection-bytes=\
501000-1500000 connection-mark=all-trafik new-packet-mark=midle-up \
passthrough=no
add action=mark-packet chain=qos-up comment=high-up connection-bytes=\
1500001-1000000000 connection-mark=all-trafik new-packet-mark=high-up \
passthrough=no
add action=mark-packet chain=qos-up comment=unknown-up connection-mark=\
all-trafik new-packet-mark=unknown-up passthrough=no
add action=mark-packet chain=qos-up comment=unknown-up new-packet-mark=\
unknown-up passthrough=no
add action=return chain=qos-up 

4. Pengaturan queue tree

Langkah selanjutnya pengaturan queue tree untuk mengatur pembagian bandwith kamu. Harap sesuaikan dengan bandwith kamu, klo disini saya memakai indihome download 10mbps dan upload 2mbps, setelah menggunakan skrip ini lakukan penyesuaian pada queue tree di Winbox.

/queue tree
add max-limit=1G name=DOWNLOAD parent=global queue=default
add bucket-size=0 limit-at=64k max-limit=1G name=1.VIP packet-mark=vip-down \
parent=DOWNLOAD priority=1 queue=default
add bucket-size=0 limit-at=500k max-limit=1G name=2.GAMES packet-mark=\
games-down parent=DOWNLOAD priority=3 queue=default
add limit-at=8M max-limit=8M name=3.NORMAL parent=DOWNLOAD queue=default
add limit-at=1M max-limit=8M name=3.2.BROWSING packet-mark=browsing-down \
parent=3.NORMAL priority=5 queue=pcq-download-default
add limit-at=1M max-limit=8M name=3.3.MIDDLE packet-mark=midle-down parent=\
3.NORMAL priority=7 queue=pcq-download-default
add limit-at=1M max-limit=8M name=3.4.HIGH packet-mark=high-down parent=\
3.NORMAL queue=pcq-download-default
add limit-at=1M max-limit=8M name=3.5.UNKNOWN packet-mark=unknown-down \
parent=3.NORMAL queue=pcq-download-default
add limit-at=1M max-limit=10M name=4.GOOGLE packet-mark=ggc-telkom-down \
parent=DOWNLOAD queue=pcq-download-default
add max-limit=1G name=UPLOAD parent=global queue=default
add limit-at=64k max-limit=1G name=1.U-VIP packet-mark=vip-up parent=UPLOAD \
priority=1 queue=default
add limit-at=500k max-limit=1G name=2.U-GAMES packet-mark=games-up parent=\
UPLOAD priority=3 queue=default
add limit-at=1500k max-limit=2M name=3.U-NORMAL parent=UPLOAD queue=default
add limit-at=200k max-limit=2M name=3.2.U-BROWSING packet-mark=browsing-up \
parent=3.U-NORMAL priority=5 queue=pcq-upload-default
add limit-at=200k max-limit=2M name=3.3.U-MIDDLE packet-mark=midle-up parent=\
3.U-NORMAL priority=7 queue=pcq-upload-default
add limit-at=200k max-limit=2M name=3.4.U-HIGH packet-mark=high-up parent=\
3.U-NORMAL queue=pcq-upload-default
add limit-at=200k max-limit=2M name=3.5.U-UNKNOWN packet-mark=unknown-up \
parent=3.U-NORMAL queue=pcq-upload-default
add limit-at=200k max-limit=2M name=4.U-GOOGLE packet-mark=ggc-telkom-up \
parent=UPLOAD queue=pcq-upload-default
add limit-at=1M max-limit=10M name=3.1.SOSMED packet-mark=sosmed-down parent=\
3.NORMAL priority=5 queue=pcq-download-default
add limit-at=200k max-limit=2M name=3.1.U-SOSMED packet-mark=sosmed-up \
parent=3.U-NORMAL priority=5 queue=pcq-upload-default
Credit to: Agung Cespun S
Sekian tutorial setting Mikrotik browsing, social media, dan game online lancar tanpa lag, semoga bisa membantu kamu.
Apabila ada kesalahan dan hal yang ingin ditanyakan, silahkan tinggalkan komentar. Wassalam

2 comments: