logon to hotspot based on Calling-Station-Id

Hi to all

I have one problem that I still dont know how to resolve so maybe someone can help me and have idea…
I have one radius server with mysql server on it, and will have deployed multiple hotspot mikrotiks…
So, I want to be able to specify if user will have rights to connect to use some specific hotspot
Of course, in mysql I see Calling-Station-Id…I cannot use configuration from clients.conf or Ip address because they are dynamic…

example:

user1 can connect to all hotspots
user2 can only connect to hostspot1
user2 can only connect to hostspot2

thx…

Have a look at Called-StationID instead of Caller-StationID.

Caller-StationID you’re basically checking who the caller is,
Called-StationID you’re basically checking where the client is trying to connect to

so, I can put in my sql in radreply user2 Called-StationID = hotspot1 and he could connect only to hotspot1?

No,

It’s a check item, not a reply item. I’m not sure of the tip of my head how the ‘default’ sql tables in freeradius looks, but you need something like this as a CHECK item, either per user (radcheck I think), or per group (radgroupcheck I think):

Called-Station-Id := hotspot 1

If the user connected to hotspotX, then the check will fail and authentication should be denied. If connected to hotspot 1 the check would pass, and the authentication process continues.

Oh, I understand :slight_smile:
it is simple and this way I can make more complex decisions..