0% found this document useful (0 votes)
300 views2 pages

PPPOE Script for Hotspot Management

The document contains scripts for modifying the Scrip V2 to add ICMP and adjust colors. It includes scripts for PPPOE connections on login and logout to mark packets, create queues, and log information. It also contains scripts for hotspot auto-login and logout to mark packets and create queues.

Uploaded by

Dedl Supra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views2 pages

PPPOE Script for Hotspot Management

The document contains scripts for modifying the Scrip V2 to add ICMP and adjust colors. It includes scripts for PPPOE connections on login and logout to mark packets, create queues, and log information. It also contains scripts for hotspot auto-login and logout to mark packets and create queues.

Uploaded by

Dedl Supra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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")]

You might also like