Script for remove ip-binding in hotspot

I need a script for ROS , to delete all ip-binding inside hotspot.

I try some script but with no lucky.

Any working solution ?

Regard

brasileottanta

with this script you can remove all ip-binding entries.
ip hotspot ip-binding remove [find]

Thanks.:slight_smile: Do you know a script that remove all ip-binding of specific server ?

like this : ip hotspot ip-binding remove [find] server=myhotspot


bye.

brasileottanta

The “find” command can accept a condition, so:
ip hotspot ip-binding remove [find where server=myhotspot]

hello, excuse my English is bad,
I need a script to do this:
bypassed and blocked a ip ip or mac bindings with schedule
eh tried in various ways but nothing, example:
/ip hotspot ip-binding blocked [find rule=19.168.48.65]

Ver este ai, do BrasDeutscher, Pará

Script to Remove all Regular IP-Bindings

RouterOS 6.37rc27 from BrasDeutscher

{

set your server name here

:global sv "Hotspot"

set here 0 for regular, or 7 for blocked, or 8 for bypassed

:global num 0

!!-- Do not edit the below, this can breake my script --!!

:global tp
:global tpn
:global mac
:global action
:foreach i in=[/ip hotspot ip-binding find where server="$sv" ] do={
:set tp [/ip hotspot ip-binding get $i type ];
:set tpn [:len $tp ];
:if ("$tpn" = "$num" ) do={
:set mac [/ip hotspot ip-binding get $i mac-address ];
:set action [/ip hotspot ip-binding remove [find where mac-address=$mac ]];
:log warning ("Removing Code:$num Mac => $mac");
}}}