Rabu, 18 September 2013

Setting Mikrotik Warnet Azainet Rantau Parapat

Setting Mikrotik Warnet Azainet Rantau Parapat - setting-mikrotik-warnet-Rantau Parapat, beda lokasi beda selera pemilik warnetnya soal setting-mikrotik, berikut ini settingan-mikrotik sebuah warnet di Rantau Parapat, yang saya setting via remote dari Binjai.




Koneksi warnet yang di gunakan 3 line speedy, 1 mega untuk 15 unit komputer game, dan 2 mega untuk 15 unit komputer browsing dan download, tambah proxy external ubuntu. Berikut ini filter rule untuk menangkap ip game online kemudian di routing ke line speedy 1mbps.

/ip firewall filter
add action=add-dst-to-address-list address-list=ip-facebook address-list-timeout=0s chain=forward disabled=no dst-port=843,9339,8291 in-interface=ether5-HUB/SWITCH protocol=tcp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=1818,2001,3010,4300,5105,5121,5126,5171,5340-5352,6000-6152,7777,28900-28914 in-interface=ether5-HUB/SWITCH protocol=tcp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=7341-7350,7451,8085,9600,9601-9602,9300,9376-9377,9400,9700,10001-10011 in-interface=ether5-HUB/SWITCH protocol=tcp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=10402,11011-11041,12011,12110,13008,13413,15000-15002,16402-16502,16666,18901-18909,19000 in-interface=ether5-HUB/SWITCH protocol=tcp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=19101,22100,27780,28012,29000,29200,39100,39110,39220,39190,40000,49100,4300 in-interface=ether5-HUB/SWITCH protocol=tcp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=14009-14010,4300 in-interface=ether5-HUB/SWITCH protocol=udp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=14009-14010 in-interface=ether5-HUB/SWITCH protocol=udp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=1293,1479,6100-6152,7777-7977,8001,9401,9600-9602,12020-12080,30000,40000-40010 in-interface=ether5-HUB/SWITCH protocol=udp

add action=add-dst-to-address-list address-list=game_online address-list-timeout=1d chain=forward disabled=no dst-port=42051-42052,11100-11125,11440-11460in-interface=ether5-HUB/SWITCH protocol=udp

Layer 7 untuk limit download dan Streaming di mikrotiknya

/ip firewall layer7-protocol
add name=http-video regexp="http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)"

add name=youtube regexp="http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)"
add name=big regexp="^.*get.+\\.exe|rar|zip|7z|cab|asf|mov|wmv|mpg|mpeg|mkv|avi|flv|pdf|wav|rm|mp3|mp4|ram|msu|msi|nup|vdf|rmvb|dat|daa|iso|nrg|bin|vcd|mp2|3gp|mpe|qt|raw|wma|ogg|doc|deb|tar|bzip|gzip|gzip2|0[0-9][0-9]).*\$"

add name=streaming regexp="a.youtube.com|d.youtube.com|e.youtube.com|f.youtube.com|g.youtube.com|h.youtube.com|i.youtube.com|j.youtube.com|l.youtube.com|c.youtube.com|d.youtube.com|youtube|tube|dailymotion.com"

Mangle Routing mark-mikrotik untuk memisah jalur ke arah speedy 1m, sisanya yang 2mbps di routing-mark/ di alokasikan ke browsing dan download.

/ip firewall mangle
add action=mark-routing chain=prerouting comment="Routing Game" disabled=no dst-address-list=game_online dst-port=19101,22100,27780,28012,29000,29200,39100,39110,39220,39190,40000,49100 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=1293,1479,6100-6152,7777-7977,8001,9401,9600-9602,12020-12080,30000,40000-40010 new-routing-mark=game passthrough=no protocol=udp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=14000-14010 new-routing-mark=game passthrough=no protocol=udp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=1818,2001,3010,4300,5105,5121,5126,5171,5340-5352,6000-6152,7777 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=7341-7350,7451,8085,9600,9601-9602,9300,9376-9377,9400,9700,10001-10011 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=10402,11011-11041,12011,12110,13008,13413,15000-15002,16402-16502,16666,18901-18909,19000 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=14000-14010,28900-28914 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting comment="Lineage 2" disabled=no dst-address-list=game_online dst-port=7777-7778 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting disabled=no dst-address-list=game_online dst-port=2106 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting comment=9Dragon disabled=no dst-address-list=game_online dst-port=!80,8080 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN

add action=mark-routing chain=prerouting comment="Yulgang Online" disabled=no dst-address-list=game_online dst-port=19000-19001 new-routing-mark=game passthrough=no protocol=tcp src-address-list=LAN


Mangle Hit Proxy External dengan DSCP=12

/ip firewall mangle 
add action=mark-packet chain=prerouting comment=Proxy content="X-Cache: HIT" disabled=no new-packet-mark=proxy-hit passthrough=no protocol=tcp

add action=mark-packet chain=prerouting disabled=no dscp=12 new-packet-mark=proxy-hit passthrough=no protocol=tcp
add action=mark-packet chain=forward disabled=no dscp=12 in-interface=ether4-Proxy new-packet-mark=proxy-hit out-interface=ether5-HUB/SWITCH passthrough=no protocol=tcp

Mangle untuk Ping

/ip firewall mangle 
add action=mark-packet chain=prerouting comment=ping disabled=no new-packet-mark=icmp passthrough=no protocol=icmp

Mangle Update Game di berikan prioritas di queue tree mikrotik

/ip firewall mangle 
add action=mark-connection chain=prerouting comment="Update Game" disabled=no dscp=!12 dst-address-list=game_online dst-port=80,21 new-connection-mark=update-conn packet-mark=!hit passthrough=yes protocol=tcp

add action=mark-packet chain=prerouting connection-mark=update-conn disabled=no dscp=!12 new-packet-mark=update passthrough=no

Mangle untuk content youtube di berikan prioritas di queue tree mikrotik

/ip firewall mangle 
add action=mark-connection chain=prerouting comment=Facebook disabled=no dscp=!12 dst-address-list=ip-facebook new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=apps.facebook.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=facebook.com/apps disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=app.facebook.com/pool-live disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=static.ak.connect.facebook.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=statics.poker.static.zynga.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.ninjasaga.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.castle.zgncdn.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.static.zynga.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.static.zgncdn.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.empire.zynga.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.poker.zynga.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.castle.zynga.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.farmville.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.farmville.zgncdn.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=akamai.net disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=.channel.facebook.com disabled=no dscp=!12 new-connection-mark=facebook-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-packet chain=prerouting connection-mark=facebook-conn disabled=no dscp=!12 new-packet-mark=facebook packet-mark=!proxy-hit passthrough=no

Mangle untuk melimit streaming youtube

/ip firewall mangle 
add action=mark-connection chain=prerouting comment=Streaming disabled=no dscp=!12 layer7-protocol=streaming new-connection-mark=streaming-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=dailymotion.com disabled=no dscp=!12 new-connection-mark=streaming-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-connection chain=prerouting content=mivo disabled=no new-connection-mark=streaming-conn packet-mark=!proxy-hit passthrough=yes protocol=tcp

add action=mark-packet chain=prerouting connection-mark=streaming-conn disabled=no new-packet-mark=streaming passthrough=no

Mangle untuk melimit ip per client, seperti yang beliau inginkan.

/ip firewall mangle 
add action=mark-connection chain=forward comment="LUAR KE DALAM" disabled=no dscp=!12 new-connection-mark=all.post_conn out-interface=ether5-HUB/SWITCH packet-mark=!proxy-hit passthrough=yes src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.10 new-packet-mark=IP10 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.11 new-packet-mark=IP11 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.12 new-packet-mark=IP12 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.13 new-packet-mark=IP13 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.14 new-packet-mark=IP14 packet-mark=!proxy-hit passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.15 new-packet-mark=IP15 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.16 new-packet-mark=IP16 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.17 new-packet-mark=IP17 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.18 new-packet-mark=IP18 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.19 new-packet-mark=IP19 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.20 new-packet-mark=IP20 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.21 new-packet-mark=IP21 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.22 new-packet-mark=IP22 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.23 new-packet-mark=IP23 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.24 new-packet-mark=IP24 passthrough=no protocol=tcp src-address-list=!game_online

add action=mark-packet chain=forward connection-mark=all.post_conn disabled=no dscp=!12 dst-address=192.168.88.25 new-packet-mark=IP25 passthrough=no protocol=tcp src-address-list=!game_online

Saya berikan queue tree tersendiri, dan begitupun rule, rule ini adalah hasil racikan yang saya kumpul dari berbagai sumber yang ada di internet.