Scrip V2 modif ini memakia tambahan icmp
Ganti /sesuaikan yg warna merah
Parent ganti jika memakai scrip v4
-UP PPPOE :
:local ips [/ppp active get [find name=$user] address];
:local up [/ppp active get [find name=$user] uptime];
:local caller [/ppp active get [find name=$user] caller-id];
:local service [/ppp active get [find name=$user] service];
:local active [/ppp active print count];
:log warning "login $user $ips";
[/ip firewall mangle add action=mark-packet chain=forward comment=("dpaket-"."$user") connection-
mark="!PORT SELAIN PORT UMUM ( GAME )" dst-address=("$ips") in-interface=ether1-internet new-packet-
mark=("dpaket-"."$user") packet-mark="!ICMP DOWN" passthrough=yes];
[/ip firewall mangle add action=mark-packet chain=forward comment=("upaket-"."$user") connection-
mark="!PORT SELAIN PORT UMUM ( GAME )" new-packet-mark=("upaket-"."$user") out-interface=ether1-internet
packet-mark="!ICMP DOWN" passthrough=yes src-address=("$ips")];
[/queue tree add limit-at=1M max-limit=4M name=("$user"." -> "."$ips") packet-mark=("dpaket-"."$user")
parent="CLIEN RUMAHAN DOWN"];
[/queue tree add limit-at=768K max-limit=1M name=("$user"." > "."$ips") packet-mark=("upaket-"."$user")
parent="CLIEN RUMAHAN UPLUAD"];
DOWN PPPOE:
/queue tree remove [find packet-mark=("dpaket-"."$user")] ;
/queue tree remove [find packet-mark=("upaket-"."$user")] ;
/ip firewall mangle remove [find where comment=("dpaket-"."$user")]
/ip firewall mangle remove [find where comment=("upaket-"."$user")]
============================================================================
HOTSPOT AUTOLOGIN
IN :
:local datetime [/system clock get date];
:local timedate [/system clock get time];
[/ip firewall mangle add action=mark-packet chain=forward comment=user_hotspot connection-mark=\ "!PORT
SELAIN PORT UMUM ( GAME )" dst-address="$address" in-interface=\ ether1-internet new-packet-mark=("paket-
down"."$address") packet-mark="!ICMP DOWN" \ passthrough=yes];
[/ip firewall mangle add action=mark-packet chain=forward comment=user_hotspot connection-mark=\ "!PORT
SELAIN PORT UMUM ( GAME )" new-packet-mark=("paket-up"."$address") out-interface=\ ether1-internet packet-
mark="!ICMP DOWN" passthrough=yes src-address=\ "$address"];
[/queue tree add limit-at=768K max-limit=1300K name=("$user-hotspot"." ->down "."$address") packet-
mark=("paket-down"."$address") parent="HOTSPOT ALL DOWNLOAD"];
[/queue tree add limit-at=256K max-limit=512K name=("$user-hotspot"." ->up "."$address") packet-mark=("paket-
down"."$address") parent="HOTSPOT ALL UPLUAD"];
OUT:
/queue tree remove [find packet-mark=("paket-down"."$address")] ;
/queue tree remove [find packet-mark=("paket-up"."$address")] ;
/ip firewall mangle remove [find where new-packet-mark=("paket-down"."$address")]
/ip firewall mangle remove [find where new-packet-mark=("paket-up"."$address")]