Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #hanya untuk ROS yang sudah support fitur "Raw"
- #tanpa user profile yang lain, hanya ada 2 user profile saja, voucherpagi dan vouchermalam
- #konter timing berdasarkan inactive time di firewall raw
- #copy paste di terminal winbox lalu tekan enter :
- /ip firewall raw
- add action=passthrough chain=voucherpagi comment="JANGAN DIHAPUS" time=6h-17h59m,sun,mon,tue,wed,thu,fri,sat
- add action=passthrough chain=vouchermalam comment="JANGAN DIHAPUS" time=18h-5h59m59s,sun,mon,tue,wed,thu,fri,sat
- #user profile voucherpagi
- #buatlah user profile dengan nama voucherpagi
- #isikan dibagian on login script berikut :
- {
- :local usernya $user;
- :if ([/ip hotspot user find name=$usernya limit-uptime=12h]="") do={/ip hotspot user set [find name=$usernya] limit-uptime=12h};
- :if ([/system schedule find name=$usernya]="") do={
- /system schedule add name=$usernya interval=1d on-event="/ip hotspot user remove [find name=$usernya]\r\n/ip hotspot active remove [find user=$usernya]\r\n/system schedule remove [find name=$usernya]"
- }
- :if ([/ip firewall raw get [find chain=voucherpagi] invalid] = true) do={
- /ip hotspot active remove [find user=$usernya]
- /ip hotspot user disable [find name=$usernya]
- }
- }
- #user profile vouchermalam
- #buatlah user profile dengan nama vouchermalam
- #isikan dibagian on login script berikut :
- {
- :local usernya $user;
- :if ([/ip hotspot user find name=$usernya limit-uptime=12h]="") do={/ip hotspot user set [find name=$usernya] limit-uptime=12h};
- :if ([/system schedule find name=$usernya]="") do={
- /system schedule add name=$usernya interval=1d on-event="/ip hotspot user remove [find name=$usernya]\r\n/ip hotspot active remove [find user=$usernya]\r\n/system schedule remove [find name=$usernya]"
- }
- :if ([/ip firewall raw get [find chain=vouchermalam] invalid] = true) do={
- /ip hotspot active remove [find user=$usernya]
- /ip hotspot user disable [find name=$usernya]
- }
- }
- #system schedule voucherpagi
- #buatlah system schedule dengan nama voucherpagi
- #start time = 17:59:59
- #interval 1d
- #on event script, isikan :
- /ip hotspot user disable [find profile=voucherpagi]
- /ip hotspot user enable [find profile=vouchermalam]
- /ip hotspot active remove [find]
- #system schedule vouchermalam
- #buatlah system schedule dengan nama vouchermalam
- #start time = 05:59:59
- #interval 1d
- #on event script, isikan :
- /ip hotspot user disable [find profile=vouchermalam]
- /ip hotspot user enable [find profile=voucherpagi]
- /ip hotspot active remove [find]
Add Comment
Please, Sign In to add comment