Saturday, 2 May 2015

Tahapan Setting Mikrotik untuk Warnet Game O

Tahap awal setiing mikrotik masuk ke aplikasi winbox

Langkah - langkah menghubungkan mikrotik dengan komputer

1. Ubah nama interface
Caranya : klik menu interface ubah nama interface ether1 dengan nama speedy atau apa saja sesuka kita, ether2 ubah menjadi warnet ( tidak dirubah namanya juga tidak jadi soal )

2. Setting IP address 
Untuk memberi identitas Ip pada masing-masing interface yang kita gunakan
caranya : klik IP-Addresses, klik tanda +, masukan IP address  (koneksi dari speedy)
Karena IP address modem speedy biasanya 192.168.1.1 maka saya masukan 192.168.1.2/24

klik tanda + lagi untuk IP interface yang kedua (koneksi untuk komputer client)
saya gunakan IP 192.168.3.3/24

3. Setting gateway 
klik IP-Routes, klik + , isikan gateway 192.168.1.1

4. Setting DNS 
klik IP-DNS, klik setting, masukan DNS speedy

5. coba test ping dari mikrotik ke modem
buka New Terminal, ketik ping 192.168.1.1 kalau reply berarti sudah Oke

6. Setting NAT 
caranya : klik IP-Firewall, klik tab NAT
di tab general, pilih chain=srcnat , src address=192.168.3.0 (network interface kedua)
lanjutkan klik tab action, pilih action=masquerade

7. Sekarang coba test ping dari komputer ke gateway 192.168.1.1


Setting Tambahan

1. Setting jam dan tanggal mikrotik 
Sesuiakan clok mikrotik menjadi GMT +7 (jakarta), klik system-clock, pilih time zone=asia/jakarta

Selanjutnya 

1.Setting DHCP 
caranya : klik IP-DHCP server, klik DHCP setup
pilih nama interface kedua (network interface komputer client), klik next, nanti otomatis DHCP address space di subnet yang sama dengan interface kedua
selanjutnya klik next , lalu  next sampai selasai.

Tahap berikutnya membuat settingan Management atau pembagian bandwidth untuk komputer client.

Simple queues 

Klik Simple queues, klik +  . klik tab general , isikan nama " Total Bandwidth "
Target Upload max limit=7166k , Target Download max limit=7166k
kilik tab Advanced - interface=all , queue type=default small , klik OK

Sekarang membuat Simple queues untuk masing - masing komputer client

klik tab general , isikan nama " Komputer 1"
Target address=192.168.3.5 (IP komputer 1 )
Target Upload max limit=5m , Target Download max limit=5m
klik tab Advanced - Target Upload limit at=96k - Target Download limit at=512k

Lanjutkan untuk komputer client yang lainnya seperti langkah diatas

PORT GAME

/ip firewall mangle
add action=mark-connection chain=prerouting comment="DRAGON NEST TCP" disabled=no
src-address=192.168.3.0/24 dst-port=14300-15512 new-connection-mark="GAME-conn"
passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting comment="DRAGON NEST UDP" disabled=no
src-address=192.168.3.0/24 dst-port=15000-15500 new-connection-mark="GAME-conn"
passthrough=no protocol=udp

Lanjutkan untuk Port Game yang lainnya, berikut daftar Port TCP dan UDP beberapa GAME

POKER  TCP=9339,843

AYO DANCE  TCP=18900-18910

World in AYO DANCE  TCP=52510,53100-53110,54100,55100

DOTA 2   TCP=9100-9200,8230-8250,8110-8120
                 UDP=28010-28200,27010-27200,39000

FIFA online 3   TCP=7770-7790
                         UDP=16300-16350

LOST SAGA   TCP=14000-14010
                         UDP=1400-14010

Modoo Marble   TCP=28900-28914

POINT BLANK  TCP=39190-39200
                             UDP=40000-40010

SPECIAL FORCE2  TCP=27920-27940
                                  UDP=30000-30030

HON   UDP=9100-9200,11200-11500


Mangle per client

/ip firewall mangle

add action=mark-packet chain=forward comment="CLIENT1-GAME" src-address=192.168.3.5 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT1-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT2-GAME" src-address=192.168.3.6 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT2-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT3-GAME" src-address=192.168.3.7 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT3-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT4-GAME" src-address=192.168.3.8 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT4-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT5-GAME" src-address=192.168.3.9 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT5-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT6-GAME" src-address=192.168.3.10 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT6-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT7-GAME" src-address=192.168.3.11 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-MASTER-pkt passthrough=no


Queue Tree

/queue tree
add name=Client1Game parent=global-out packet-mark=GAME-CLIENT1-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client2Game parent=global-out packet-mark=GAME-CLIENT2-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client3Game parent=global-out packet-mark=GAME-CLIENT3-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client4Game parent=global-out packet-mark=GAME-CLIENT4-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client5Game parent=global-out packet-mark=GAME-CLIENT5-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client6Game parent=global-out packet-mark=GAME-CLIENT6-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=MasterGame parent=global-out packet-mark=GAME-CLIENT7-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s


LIMIT Browsing, Download, dan Upload

/ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=http \
passthrough=yes protocol=tcp in-interface=ether3 out-interface=ether4 
connection-bytes=0-262146 comment="BROWSE"

add chain=forward action=mark-packet new-packet-mark=http_pkt\
passthrough=no protocol=tcp connection-mark=http

/ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=Download \
passthrough=yes protocol=tcp in-interface=ether3 out-interface=ether4 
connection-bytes=262146-4294967295 comment="LIMIT DOWNLOAD"

addchain=forward action=mark-packet new-packet-mark=Download_pkt \
passthrough=no packet-mark=!Game_pkt connection-mark=Download

/ip firewall mangle 
add action=mark-packet chain=prerouting comment="" disabled=no in-interface=ether4 \ new-packet-mark=icmp_pkt passthrough=no protocol=icmp src-address=192.168.1.0/24

add chain=prerouting action=mark-packet new-packet-mark=Upload \
passthrough=no protocol=tcp src-address=192.168.1.0/24 \
in-interface=ether4 packet-mark=!icmp_pkt comment="UPLOAD"

Queue Type

/queue type

name="Download" kind=pcq pcq-rate=1m pcq-limit=50 \
pcq-classifier=dst-address pcq-total-limit=2000

name="Http" kind=pcq pcq-rate=2M pcq-limit=50 \
pcq-classifier=dst-address pcq-total-limit=2000


name="Upload" kind=pcq pcq-rate=0 pcq-limit=50 \
pcq-classifier=src-address pcq-total-limit=2000


Queue Tree

/queue tree

name="Main Browse" parent=ether4 limit-at=0 priority=8 max-limit=2M \
burst-limit=0 burst-threshold=0 burst-time=0s

name="Browse" parent=Main Browse packet-mark=http_pkt \
limit-at=0 queue=Http priority=8 max-limit=2M \
burst-limit=0 burst-threshold=0 burst-time=0s

name="Download" parent=global-out packet-mark=Download_pkt \
limit-at=0 queue=Download priority=8 max-limit=1m \
burst-limit=0 burst-threshold=0 burst-time=0s

name="Main Upload" parent=global-in limit-at=0 priority=8 \
max-limit=512k burst-limit=0 burst-threshold=0 burst-time=0s

name="Upload" parent=Main Upload packet-mark=Upload \
limit-at=0 queue=Upload priority=8 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s