Hi
I need a script that will make possible to resolve below problem
IP HOTSPOT ACTIVCE USER β IP BINDINGS
If the user log in correctly with correct log in and a password in the hotspot HTML
it will automatically be transfered in IP BINDINGS place with the same address IP and address mac
heellllp me
dasiu
January 29, 2013, 11:09pm
2
:foreach user in=[/ip hotspot active find] do={
:local ip [/ip hotspot active get $user address];
:local mac [/ip hotspot active get $user mac-address];
:local username [/ip hotspot active get $user user];
:foreach binding in=[/ip hotspot ip-binding find address=$ip] do={
/ip hotspot ip-binding remove $binding;
}
/ip hotspot ip-binding add type=bypassed mac-address=$mac address=$ip comment=$username;
}
But you need to make sure, that DHCP server will give user the same IP all the time, otherwise he will be asked for password again if the IP changes.
looki83
January 29, 2013, 11:32pm
3
You are crazy⦠Thanks Dasiu
dahili
August 2, 2013, 10:57pm
4
This version will not ask password if the ip change any ip ok for same mac
:foreach user in=[/ip hotspot active find] do={
:local ip [/ip hotspot active get $user address];
:local mac [/ip hotspot active get $user mac-address];
:local username [/ip hotspot active get $user user];
:foreach binding in=[/ip hotspot ip-binding find address=$ip] do={
/ip hotspot ip-binding remove $binding;
}
/ip hotspot ip-binding add type=bypassed mac-address=$mac address=0.0.0.0 comment=$username;
}
ivanRR
January 16, 2018, 9:59am
5
hapi:
:foreach user in=[/ip hotspot active find] do={
:local ip [/ip hotspot active get $user address];
:local mac [/ip hotspot active get $user mac-address];
:local username [/ip hotspot active get $user user];
:foreach binding in=[/ip hotspot ip-binding find address=$ip] do={
/ip hotspot ip-binding remove $binding;
}
/ip hotspot ip-binding add type=bypassed mac-address=$mac address=$ip comment=$username;
}
But you need to make sure, that DHCP server will give user the same IP all the time, otherwise he will be asked for password again if the IP changes.
why all of user active = ip binding. please change to only spesification user β ip binding
thank u