Community discussions

MikroTik App
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Freeradius Sim-Use not working with Mikrotik Hotspot

Mon Nov 06, 2017 7:02 pm

Scenario: I have Mikrotik 6.39 / 6.40 Hotspot Server. Freeradius 2.2.0 on Ubuntu is installed.
Problem: Users can login to hotspot from multiple devices simultaneously.
Requirement: There should be no simultaneous logins per single account/username.

Already did the following but to no avail.
Created an account on 'radcheck' table at radius db with the following values:
test Cleartext-Password := 12345
test Simultaneous-Use := 1
Included the 'sql' parameter on 'session' handle at: /etc/freeradius/sites-enabled/default used for checking Simultaneous use.
session {
     sql
}
Un-commented the 'Simutaneous Use Checking Queries' on:
/etc/freeradius/sql/mysql/dialup.conf
Using the settings above, I can still login simultaneously on my laptop and smartphone.

Only 1 login should be accepted. Any help or tested solution is greatly appreciated.
 
savage
Forum Guru
Forum Guru
Posts: 1265
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: Freeradius Sim-Use not working with Mikrotik Hotspot

Mon Nov 06, 2017 8:19 pm

https://github.com/FreeRADIUS/freeradiu ... aneous_use

You need to *read* this, to understand how it works. It's not just a matter of slapping a few attributes into a radius request. Pay attention especially to section 3 in the documentation, IMPLEMENTATION, and 4. IF IT DOESN'T WORK
.
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Freeradius Sim-Use not working with Mikrotik Hotspot

Tue Nov 07, 2017 6:02 am

the guide saying more about radutmp/checkrad. In my opinion checking the NAS will be slow in heavy production Mikrotik NAS.
All should be done at Radius level.I m using SQL.
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: Freeradius Sim-Use not working with Mikrotik Hotspot

Wed Nov 08, 2017 11:55 am

NOTE: If you are using SQL, For sim-use i had to disable (comment) the “radutmp” entry in /etc/freeradius/sites-enabled/default .
ACCOUNTING SECTION
SESSION SECTION
 
savage
Forum Guru
Forum Guru
Posts: 1265
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: Freeradius Sim-Use not working with Mikrotik Hotspot

Wed Nov 08, 2017 12:24 pm

You can not use simultaneous use without checkrad.

If the radius server misses an accounting stop it's not going to close the session. The only way to know whether the session is active or not is to query he nas.

These things aren't out of the box configurations. It requires a lot of work and customization to get working.
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: Freeradius Sim-Use not working with Mikrotik Hotspot

Fri Nov 10, 2017 9:40 am

For good results you should not query NAS for user status.
All should be done by freeradius/mysql :)

Who is online

Users browsing this forum: RobWFS, wolf17 and 47 guests