Community discussions

MikroTik App
 
zivtal
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Sun Feb 05, 2017 6:22 pm

on hotspot connect event (not on login)

Tue Apr 10, 2018 12:02 am

Hi, there is a way to run script on hotspot connect?, I mean to run script event not login...
While someone just connect to hotspot he is apper hosts... can I run script even he isn't login?
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: on hotspot connect event (not on login)

Tue Apr 10, 2018 2:00 am

Use DHCP server 'lease-script'.
This script is triggered when host connect to network and obtain address from DHCP server.
https://wiki.mikrotik.com/wiki/Manual:I ... er#General

HTH,
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: on hotspot connect event (not on login)

Wed Apr 11, 2018 5:56 pm

whynot
You do not have the required permissions to view the files attached to this post.
 
zivtal
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Sun Feb 05, 2017 6:22 pm

Re: on hotspot connect event (not on login)

Thu Apr 12, 2018 10:23 am

whynot
This is on login, I want prelogin... I have hotspot protected by username and password (http) and I would like to do action before...

BTW- before login user not getting “user profile”...
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: on hotspot connect event (not on login)

Mon Apr 16, 2018 1:17 pm

/ip dhcp-server set 0 lease-script=script1

Who is online

Users browsing this forum: No registered users and 16 guests