Community discussions

MikroTik App
 
foamz
newbie
Topic Author
Posts: 27
Joined: Sun Jan 03, 2010 2:38 pm
Location: Knysna, South Africa
Contact:

host kick script

Mon Nov 01, 2010 9:03 am

Hi all

I need a bit of help for a script.
I want to kick every host that is not authenticated or bypassed on MT. I can generate a list of those hosts by doing:
/ip hotspot host print where !authorized and !bypassed
and then kick them one by one by doing
remove <host_number>
Now to put that in a script is a little above my head :?

Any help will be appreciated
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6077
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: host kick script

Mon Nov 01, 2010 12:00 pm

/ip hotspot host remove [find where !authorized and !bypassed]
 
foamz
newbie
Topic Author
Posts: 27
Joined: Sun Jan 03, 2010 2:38 pm
Location: Knysna, South Africa
Contact:

Re: host kick script

Mon Nov 01, 2010 12:06 pm

Awesome! So simple and it works like a charm :D

Thanks mrz
 
rooin
newbie
Posts: 31
Joined: Tue Feb 22, 2011 10:44 am

Re: host kick script

Fri Mar 11, 2011 2:47 am

I am looking to take this script a step further.

Could someone explain to me how I would write a script that checks for unauthorized hotspot hosts and removes them only if they have been idle for x amount of time?

Version 4.5.

Thanks in advanced.

Who is online

Users browsing this forum: No registered users and 16 guests