Hi everyone.
I want to customize login process to my guest hotspot.
What we have already?
Mikrotik Routerboard with configured (I think so
) Hotspot pointing to my radius server which holds custom login.php page.
We need to authenticate based on mac address and randomly generated code.
If user comes for the first time we generate code, write user mac address to radius database with newly generated code and lastly send this generated code to user.
The page changes and ask for this code. User should provide this code and get access to the internet.
The main problem we donโt know what to do when user press commit on page proving this code.
Where to send POST query so the divece change against the radius database??
Thanks in advance
Maybe send it to another PHP file on the same place as the custom login.php?
Assuming the radius database is FreeRADIUS, you can just modify it through MySQL after validating the supplied code, and then redirect to login.php, where (now that they are validated) the user would login as normal.
Yes this is FreeRADIUS database, hotspot config with mac auth check on:
/ip hotspot profile add hotspot-address=10.5.50.1 login-by=mac,cookie,http-chap name=hsprof1 use-radius=yes
Default login page on mikrotik is changed according to: https://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot#External_authentication
Iโll give it a try. At this point i should send post with credentials to http://hotspotdev/login.php? Will try this tomorrow