Pada tutorial kali ini saya akan membuat voucher hotspot di Mikrotik dengan sistem FUP mirip seperti sistem FUP di Indihome dengan menggunakan scrip pada Mikrotik, contohnya:
- Paket : 5Mbps
- Kecepatan Awal : 5Mbps
- Batas FUP 1 : > 1GB (Diatas 1GB)
- Kecepatan Setelah FUP 1 : 4Mbps
- Batas FUP 2 : > 1,5Gb (Diatas 1,5GB)
- Kecepatan Setelah FUP 2 : 2Mbps
Langkah-langkah
Konsepnya kita akan membuat 3 user profiles sebagai berikut:
- 5mb : untuk kecepatan upload 512k dan download 5Mbps
- fup1 : untuk kecepatan upload 512k dan download 4Mbps
- fup2 : untuk kecepatan upload 512k dan download 2Mbps
Jadi kecepatan awal sebelum kena fup user hotspot/voucher diberi kecepatan Up/Downoad 512k/5M, ketika user hotspot/voucher melewati pemakaian internet/fup1 sebesar 1Gb maka voucher tersebut akan logout otomatis dan kecepatan akan turun menjadi Up/Download 512k/4M, kemudian setelah pemakaian internet/fup melewati 1,5Gb maka kecepatan akan turun menjadi Up/Download 512k/2Mbps dan voucher tersebut otomatis logout.
Buat User Profile
Buat User Profile kira-kira seperti pada gambar dibawah ini

Buat Scheduler
Buat schedule dengan script dibawah ini, script ini akan memeriksa secara berkala bytes-in+bytes-out apabila melebihi fup maka user/voucher akan otomatis diganti menjadi fup1 dan fup2 sesuai dengan pemakaian internet.
Ubah trafLimit sesuai kuota yang diinginkan, konversi dulu byte-KB-MB dan GB, misalnya untuk 1GB=1024MB dan 1KB=1024bytes. Maka untuk 1 GB=1024 x 1024 x 1024.
Silahkan share untuk membuka link download dan membuka scriptnya
Apabila tutorial ini bermanfaat support saya dengan cara share artikel ini..
Terimakasih
:foreach i in=[/ip hotspot active find] do={
/ip hotspot active remove $i
}
/ip hotspot user {
:local limitedProfile "5m"
:local limitedSlowProfile "fup1"
:local trafLimit 1073741824
:local userList [find profile=$limitedProfile]
:foreach user in=$userList do={
:local traf ([get $user bytes-in] + [get $user bytes-out])
:put ("User (" . [get $user name] . ") traf: " . $traf)
:if ($traf > $trafLimit) do={
set $user profile=$limitedSlowProfile
:put ("User (" . [get $user name] . ") reached the traf limit")
:log warning ("User (" . [get $user name] . ") reached the traf limit")
}
}
}
/ip hotspot user {
:local limitedProfile "fup1"
:local limitedSlowProfile "fup2"
:local trafLimit 1610612736
:local userList [find profile=$limitedProfile]
:foreach user in=$userList do={
:local traf ([get $user bytes-in] + [get $user bytes-out])
:put ("User (" . [get $user name] . ") traf: " . $traf)
:if ($traf > $trafLimit) do={
set $user profile=$limitedSlowProfile
:put ("User (" . [get $user name] . ") reached the traf limit")
:log warning ("User (" . [get $user name] . ") reached the traf limit")
}
}
}
Pengujian
Belum saya coba..hehe
nanti saya bikin videonya saja
Baca juga:
- Sistem FUP Untuk Pelanggan PPPoE Bulanan di Mikrotik
- Membuat Voucher Hotspot dengan Sistem FUP Seperti Indihome
- Cek Penggunaan FUP Indihome dengan Menggunakan Bot Telegram di Mikrotik
- Menghemat Kuota FUP dengan Menurunkan Limit Berdasarkan Tanggal
Sumber : Forum Mikrotik



