SHARE
TWEET

2 LINE PISAH JALUR GAME dan NON-GAME

punces Sep 21st, 2016 (edited) 1,350 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##### routing untuk pisah jalur antar port-game dan bukan port-game, 2 line isp
  2. ## untuk ip address game bisa diambil dari http://pastebin.com/raw/KDAuLHJJ dan copas di terminal winbox
  3.  
  4. ### copy paste scrip berikut di terminal winbox, scrip ini untuk menambah address list ip lokal secara global ###
  5. /ip firewall address-list
  6. add address=10.0.0.0/8 comment="lokal-private" list=lokal-private
  7. add address=172.16.0.0/12 comment="lokal-private" list=lokal-private
  8. add address=192.168.0.0/16 comment="lokal-private" list=lokal-private
  9. #################################################################################################################
  10.  
  11.  
  12. #################################################################################################################
  13. #### apabila menggunakan PPPOE mikrotik, berikut scriptnya ####
  14. ## misal nama pppoe mikrotik adalah pppoe1 dan pppoe2, maka :
  15. ## pengaturan ip route mikrotiknya :
  16. add check-gateway=ping comment=default distance=1 gateway=pppoe1
  17. add check-gateway=ping comment=backup-default distance=2 gateway=pppoe1
  18. add check-gateway=ping comment=jalur1 distance=1 gateway=pppoe1 routing-mark=jalur1
  19. add check-gateway=ping comment=backup-jalur1 distance=2 gateway=pppoe2 routing-mark=jalur1
  20. add check-gateway=ping comment=jalur2 distance=1 gateway=pppoe2 routing-mark=jalur2
  21. add check-gateway=ping comment=backup-jalur2 distance=2 gateway=pppoe1 routing-mark=jalur2
  22. ## script mangle routing :
  23. add action=mark-routing chain=prerouting comment=game dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 new-routing-mark=jalur1 passthrough=no protocol=tcp
  24.  
  25. add action=mark-routing chain=prerouting comment=game dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 new-routing-mark=jalur1 passthrough=no protocol=udp
  26.  
  27. add action=mark-routing chain=prerouting comment=bukan-game dst-address-list=!lokal-private new-routing-mark=jalur2 passthrough=no protocol=!icmp src-address-list=lokal-private
  28. #################################################################################################################
  29.  
  30.  
  31. #################################################################################################################
  32. #### apabila bukan PPPOE mikrotik, berikut scriptnya ####
  33. ## misal :
  34.   # modem1 menggunakan ether1 dengan ip modem = 192.168.1.1
  35.   # dan modem2 menggunakan ether2 dengan ip modem = 192.168.2.1
  36. ## pengaturan ip route mikrotiknya :
  37. add check-gateway=ping comment=default distance=1 gateway=192.168.1.1
  38. add check-gateway=ping comment=backup-default distance=2 gateway=192.168.2.1
  39. add check-gateway=ping comment=jalur1 distance=1 gateway=192.168.1.1 routing-mark=jalur1
  40. add check-gateway=ping comment=backup-jalur1 distance=2 gateway=192.168.2.1 routing-mark=jalur1
  41. add check-gateway=ping comment=jalur2 distance=1 gateway=192.168.2.1 routing-mark=jalur2
  42. add check-gateway=ping comment=backup-jalur2 distance=2 gateway=192.168.1.1 routing-mark=jalur2
  43. ## script mangle routing :
  44. add action=mark-routing chain=prerouting comment=game dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 new-routing-mark=jalur1 passthrough=no protocol=tcp
  45.  
  46. add action=mark-routing chain=prerouting comment=game dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 new-routing-mark=jalur1 passthrough=no protocol=udp
  47.  
  48. add action=mark-routing chain=prerouting comment=bukan-game dst-address-list=!lokal-private new-routing-mark=jalur2 passthrough=no protocol=!icmp src-address-list=lokal-private
  49. #################################################################################################################
  50.  
  51.  
  52.  
  53. ########### MANAGEMENT BANDWIDTH #########################
  54. ######## LAYER 7 ######
  55. /ip firewall layer7-protocol
  56. add name=extension regexp="\\.(exe|rar|zip|7z|cab|asf|mov|wmv|mpg|mpeg|mkv|avi|flv|pdf|wav|rm|mp3|mp4|ram|rmvb|dat|daa|iso|nrg|bin|vcd|mp2|3gp|mpe|qt|raw|wma|ogg|doc|deb|tar|bzip|gzip|gzip2)"
  57. add name=bittorrent regexp="^(\13bittorrent protocol|azver1\$|get /scrape\\\\\?info_hash=)|d1:ad2:id20:|87P\\)[RP]"
  58. add name=torrentsites regexp="^.*(get|GET).+(torrent|thepiratebay|isohunt|entertane|demonoid|btjunkie|mininova|flixflux|torrentz|vertor|h33t|btscene|bitunity|bittoxic|thunderbytes|entertane|zoozle|vcdq|bi\
  59.     tnova|bitsoup|meganova|fulldls|btbot|flixflux|seedpeer|fenopy|gpirate|commonbits).*\$"
  60. add name=yt-video-audio regexp="r[0-9]+---[a-z]+-+[a-z0-9-]+\\.googlevideo\\.com"
  61. add name=idm regexp="get /.*(user-agent: mozilla/4.0|range: bytes=)"
  62. add name=layer7-bittorrent-exp regexp="^(\\x13bittorrent protocol|azver\\x01\$|get /scrape\\\?info_hash=get /announce\\\?info_hash=|get /client/bitcomet/|GET /data\\\?fid=)|d1:ad2:id20:|\\x08'7P\\)[RP]"
  63. add name=2-idm regexp="get /.*range: bytes"
  64. add name=streaming regexp="(porn|stream|video|movie)"
  65.  
  66. ######################### FIREWALL MANGLE ############################
  67. ##### SESUAIKAN NAMA INTERFACE di in-interface
  68. add action=jump chain=prerouting in-interface=game jump-target=qos
  69. add action=jump chain=postrouting jump-target=qos out-interface=game
  70. add action=jump chain=prerouting in-interface=browsing jump-target=qos
  71. add action=jump chain=postrouting jump-target=qos out-interface=browsing
  72. add action=mark-packet chain=qos comment=unknown new-packet-mark=unknown
  73. add action=mark-packet chain=qos comment=browsing new-packet-mark=browsing port=80,443,843 protocol=tcp
  74. add action=mark-packet chain=qos comment=browsing new-packet-mark=browsing port=80,443,843 protocol=udp
  75. add action=mark-packet chain=qos comment=extension layer7-protocol=extension new-packet-mark=extension
  76. add action=mark-packet chain=qos comment=idm layer7-protocol=idm new-packet-mark=idm
  77. add action=mark-packet chain=qos comment=idm layer7-protocol=2-idm new-packet-mark=idm
  78. add action=mark-packet chain=qos comment=torrent layer7-protocol=bittorrent new-packet-mark=torrent
  79. add action=mark-packet chain=qos comment=torrent layer7-protocol=torrentsites new-packet-mark=torrent
  80. add action=mark-packet chain=qos comment=torrent layer7-protocol=layer7-bittorrent-exp new-packet-mark=torrent
  81. add action=mark-packet chain=qos comment=torrent new-packet-mark=torrent p2p=all-p2p
  82. add action=mark-packet chain=qos comment=ftp-ssh new-packet-mark=ftp-ssh port=21,22 protocol=tcp
  83. add action=mark-packet chain=qos comment=streaming new-packet-mark=streaming port=182,8777,1935 protocol=tcp
  84. add action=mark-packet chain=qos comment=streaming new-packet-mark=streaming port=182,8777,1935 protocol=udp
  85. add action=mark-packet chain=qos comment=streaming layer7-protocol=streaming new-packet-mark=streaming
  86. add action=mark-packet chain=qos comment=youtube layer7-protocol=yt-video-audio new-packet-mark=youtube
  87. add action=mark-packet chain=qos comment=patch dst-address-list=games new-packet-mark=patch port=80,443,843,8001 protocol=tcp
  88. add action=mark-packet chain=qos comment=patch new-packet-mark=patch port=80,443,843,8001 protocol=tcp src-address-list=games
  89. add action=mark-packet chain=qos comment=patch dst-address-list=games new-packet-mark=patch port=80,443,843,8001 protocol=udp
  90. add action=mark-packet chain=qos comment=patch new-packet-mark=patch port=80,443,843,8001 protocol=udp src-address-list=games
  91. add action=mark-packet chain=qos comment=tv-winbox new-packet-mark=tv-winbox port=5938,8291 protocol=tcp
  92. add action=mark-packet chain=qos comment=games dst-address-list=games new-packet-mark=games port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=tcp
  93. add action=mark-packet chain=qos comment=games new-packet-mark=games port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=tcp src-address-list=games
  94. add action=mark-packet chain=qos comment=games dst-address-list=games new-packet-mark=games port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=udp
  95. add action=mark-packet chain=qos comment=games new-packet-mark=games port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=udp src-address-list=games
  96. add action=mark-packet chain=qos comment=vip new-packet-mark=vip port=53,5353 protocol=tcp
  97. add action=mark-packet chain=qos comment=vip new-packet-mark=vip port=53,5353 protocol=udp
  98. add action=mark-packet chain=qos comment=vip new-packet-mark=vip protocol=icmp
  99. add action=mark-packet chain=qos comment=vip new-packet-mark=vip protocol=igmp
  100. add action=return chain=qos
  101.  
  102.  
  103. ########################## QUEUE TREE ##################################
  104. #### sesuaikan parent=browsing dan parent=game dengan nama interface wan
  105. #### sesuikan max-limit dengan max download dan max upload isp
  106. #### sesuaikan limit-at dengan konsep HTB
  107. /queue tree
  108. add max-limit=8M name=1.INCOMING parent=global queue=default
  109. add limit-at=64k max-limit=8M name=I.VIP packet-mark=vip parent=1.INCOMING priority=1 queue=default
  110. add limit-at=3M max-limit=8M name=I.GAMES packet-mark=games parent=1.INCOMING priority=3 queue=default
  111. add limit-at=256k max-limit=8M name=I.PATCH-GAMES packet-mark=patch parent=1.INCOMING priority=4 queue=default
  112. add limit-at=256k max-limit=8M name=I.TV-WINBOX packet-mark=tv-winbox parent=1.INCOMING priority=5 queue=default
  113. add limit-at=256k max-limit=8M name=I.BROWSING packet-mark=browsing parent=1.INCOMING priority=6 queue=default
  114. add limit-at=256k max-limit=8M name=I.YOUTUBE packet-mark=youtube parent=1.INCOMING priority=6 queue=default
  115. add limit-at=256k max-limit=8M name=I.A.STREAMING packet-mark=streaming parent=1.INCOMING priority=7 queue=default
  116. add limit-at=256k max-limit=8M name=I.B.FTP-SSH packet-mark=ftp-ssh parent=1.INCOMING priority=7 queue=default
  117. add limit-at=256k max-limit=8M name=I.C.DOWNLOAD packet-mark=extension parent=1.INCOMING priority=7 queue=default
  118. add limit-at=256k max-limit=8M name=I.D.IDM packet-mark=idm parent=1.INCOMING priority=7 queue=default
  119. add limit-at=256k max-limit=8M name=I.E.TORRENT packet-mark=torrent parent=1.INCOMING priority=7 queue=default
  120. add limit-at=256k max-limit=8M name=I.UNKNOWN packet-mark=unknown parent=1.INCOMING queue=default
  121. add max-limit=700k name=2.OUTGOING-GAME parent=game queue=default
  122. add limit-at=32k max-limit=700k name=G.VIP packet-mark=vip parent=2.OUTGOING-GAME priority=1 queue=default
  123. add limit-at=32k max-limit=700k name=G.GAMES packet-mark=games parent=2.OUTGOING-GAME priority=3 queue=default
  124. add limit-at=32k max-limit=700k name=G.PATCH-GAMES packet-mark=patch parent=2.OUTGOING-GAME priority=4 queue=default
  125. add limit-at=32k max-limit=700k name=G.TV-WINBOX packet-mark=tv-winbox parent=2.OUTGOING-GAME priority=5 queue=default
  126. add limit-at=32k max-limit=700k name=G.BROWSING packet-mark=browsing parent=2.OUTGOING-GAME priority=6 queue=default
  127. add limit-at=32k max-limit=700k name=G.YOUTUBE packet-mark=youtube parent=2.OUTGOING-GAME priority=6 queue=default
  128. add limit-at=32k max-limit=700k name=G.A.STREAMING packet-mark=streaming parent=2.OUTGOING-GAME priority=7 queue=default
  129. add limit-at=32k max-limit=700k name=G.B.FTP-SSH packet-mark=ftp-ssh parent=2.OUTGOING-GAME priority=7 queue=default
  130. add limit-at=32k max-limit=700k name=G.C.UPLOAD packet-mark=extension parent=2.OUTGOING-GAME priority=7 queue=default
  131. add limit-at=32k max-limit=700k name=G.D.IDM packet-mark=idm parent=2.OUTGOING-GAME priority=7 queue=default
  132. add limit-at=32k max-limit=700k name=G.E.TORRENT packet-mark=torrent parent=2.OUTGOING-GAME priority=7 queue=default
  133. add limit-at=32k max-limit=700k name=G.UNKNOWN packet-mark=unknown parent=2.OUTGOING-GAME queue=default
  134. add max-limit=700k name=3..OUTGOING-BROWSING parent=browsing queue=default
  135. add limit-at=32k max-limit=700k name=B.VIP packet-mark=vip parent=3..OUTGOING-BROWSING priority=1 queue=default
  136. add limit-at=32k max-limit=700k name=B.GAMES packet-mark=games parent=3..OUTGOING-BROWSING priority=3 queue=default
  137. add limit-at=32k max-limit=700k name=B.PATCH-GAMES packet-mark=patch parent=3..OUTGOING-BROWSING priority=4 queue=default
  138. add limit-at=32k max-limit=700k name=B.TV-WINBOX packet-mark=tv-winbox parent=3..OUTGOING-BROWSING priority=5 queue=default
  139. add limit-at=32k max-limit=700k name=B.BROWSING packet-mark=browsing parent=3..OUTGOING-BROWSING priority=6 queue=default
  140. add limit-at=32k max-limit=700k name=B.YOUTUBE packet-mark=youtube parent=3..OUTGOING-BROWSING priority=6 queue=default
  141. add limit-at=32k max-limit=700k name=B.A.STREAMING packet-mark=streaming parent=3..OUTGOING-BROWSING priority=7 queue=default
  142. add limit-at=32k max-limit=700k name=B.B.FTP-SSH packet-mark=ftp-ssh parent=3..OUTGOING-BROWSING priority=7 queue=default
  143. add limit-at=32k max-limit=700k name=B.C.UPLOAD packet-mark=extension parent=3..OUTGOING-BROWSING priority=7 queue=default
  144. add limit-at=32k max-limit=700k name=B.D.IDM packet-mark=idm parent=3..OUTGOING-BROWSING priority=7 queue=default
  145. add limit-at=32k max-limit=700k name=B.E.TORRENT packet-mark=torrent parent=3..OUTGOING-BROWSING priority=7 queue=default
  146. add limit-at=32k max-limit=700k name=B.UNKNOWN packet-mark=unknown parent=3..OUTGOING-BROWSING queue=default
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top