Hi there,
i’m trying to get my Hotspot running with MAC Authorisation and Freeradius/SQL.
I’ve setup the Hotspot on my Mikrotik and its working fine with local user. I created a local user with the MAC as the username. It works fine. But when i try to authenticate with the Freeradius it doesnt do it. It works fine as long as i use a username and password in the database but when i try to put the MAC address as the user and blank password nothing happen. their are several topics about and i searched the net for about two days without any luck..
In my SQL Database i have only a usergroup with my users
and under the table “radreply” my user with the password.
Quit basic but for testing its fine. I though i don’t need more cause the local Mikrotik Radius also just needs the Mac address as a user.
Ok, i sorted this out.
But next question is this one:
Our customers log in only with their MAC-address (from their Laptop or a Router that is connected to our network)
This MAC is stored in the Radius SQL Database. Now when we delete the user from the database he can still use the internet. How can we terminate the session when we delete the user from our database? We offer only 1 day, 1 week, 1 month access so maybe their is a solution over session-time? Hope you can help me.
If you want the user to be logged out when his account expires in the database I wouldn’t use DMs, I would use the RADIUS attribute that tells the router when to log a user out. See the RADIUS client wiki for a list of attributes. You can get the value to send back by using DATE_SUBTRACT combined with NOW() and your expiration date column, details depend on your SQL dialect.