Advertisement
rootplg3544

custom hotspot di simple queue nah sekarang giliran custom

Jun 10th, 2018
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. [Share]
  2. Kemaren saya sudah sharing cara custom hotspot di simple queue nah sekarang giliran custom hotspot di queue tree :D
  3.  
  4. 1.Syarat Rate Limit (rx/tx) dikosongin
  5. 2.Jika menggunakan user manager tinggal masukin nama profile hotspot ke dalam Group name pada usermanager, jangan lupa Rate limit di kosongin
  6. 3. Sesuaikan nama parent, di contoh saya menggunakan "7.ALL HTSPOT"
  7.  
  8. Saat user login Script ini akan otomatis menambahkan input baru pada queue tree dan mangle, dan akan menghapus kembali ketika user logout. kekurangan script ini saya membuat upload dan download dalam satu paket, kalau mau terpisah silahkan dimodifikasi sesuai kebutuhan kebutuhan :)
  9.  
  10. # SCRIPT ON LOGIN
  11. :local datetime [/system clock get date];
  12. :local timedate [/system clock get time];
  13. [/ip firewall mangle add action=mark-packet chain=prerouting dst-address="$address" new-packet-mark=("paket-"."$address") passthrough=no comment=("paket-"."$address")];
  14. [/ip firewall mangle add action=mark-packet chain=forward dst-address="$address" new-packet-mark=("paket-"."$address") passthrough=no comment=("paket-"."$address")];
  15. [/queue tree add max-limit=2M name=("$user"." -> "."$address") comment=("Login at: [ $timedate - $datetime ] From: [ $interface ] Mac: [ ".$"mac-address"." ]") packet-mark=("paket-"."$address") queue="HS-Down" parent="7.ALL HOTSPOT"];
  16. :log warning ("--> [ $user ] Login at: [ $timedate - $datetime ] From: [ $interface ] Mac: [ ".$"mac-address"." ]")
  17.  
  18. # SCRIPT ON LOGOUT
  19. /queue tree remove [find packet-mark=("paket-"."$address")] ;
  20. /ip firewall mangle remove [find where comment=("paket-"."$address")]
  21. :log warning ("--> [ $user ] Logout at: [ $timedate - $datetime ] From: [ $interface ] Mac: [ ".$"mac-address"." ]")
  22.  
  23. ini script untuk simple queue
  24. https://www.facebook.com/groups/mikrotik.id/permalink/10156462751692929/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement