I have fewer than 20 clients on my network, and they frequently share the wifi password with their friends, which I don't want.
A RADIUS server appears to be the solution, but I am unable to get FreeRADIUS to function effectively on OpenWRT 24.10.0.
To limit concurrent use of an account, I must use Simultaneous-Use:= "1"
To use Simultaneous-Use:= "1"
, I need to run freeradius3-mod-radutmp
or freeradius3-mod-sql-sqlite
The trouble begins there; both modules do not appear to be working on OpenWRT.
An external FreeRADIUS server is overkill for fewer than 20 clients.
Do we need to guess what router?
Doesn't matter, the problem appears to be OpenWRT's build of FreeRadius Freeradius3 Simultaneous-Use not working for concurrent connections
You need to be more detailed than "both modules not working" , probably only complaining for sake iof complaining is why it never got reported as a bug.
Ah yes, get ubus call system board
from your OpenWrt device.
As I mentioned previously, my problem is the same as this: Freeradius3 Simultaneous-Use not working for concurrent connections
I have NBG7815, but this does not matter.
{
"kernel": "6.6.83",
"hostname": "router-sinan",
"system": "ARMv8 Processor rev 4",
"model": "Zyxel NBG7815",
"board_name": "zyxel,nbg7815",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "24.10-SNAPSHOT",
"revision": "r28723-441754bde1",
"target": "qualcommax/ipq807x",
"description": "OpenWrt 24.10-SNAPSHOT r28723-441754bde1",
"builddate": "1743510547"
}
}
Fill a bug report with more detailed symptom than "it does not work"
Please do not waste people's time when you don't have an answer.
Aren't you doing exactly the same thing ?
Well it does, as the solution is either mysql or radutmp.
radutmp exists as freeradius3-mod-radutmp so which are you using and how have you configured freeradius?
You've proven you are using 24.10-snapshot, now what is your freeradius configuration?
I have tried so many things, so the configuration looks like a mess now. But it didn't work with the default settings too. I have to reinstall freeradius again.
Are you using freeradius on OpenWRT right now? What I need is someone actually using freeradius on OpenWRT and can do a quick test with Simultaneous-Use:= "1"
i use yfi hotspot manager to do this. maybe daloradius and radiusdesk can be run on openwrt
rad_recv: Accounting-Request packet from host 127.0.0.1 port 3799, id=36, length=267
ChilliSpot-Version = "1.3.1-svn"
ChilliSpot-Attr-10 = 0x00000002
Event-Timestamp = "Apr 23 2025 03:23:57 "
User-Name = "dvdwalt@ri"
Acct-Input-Octets = 66384842
Acct-Output-Octets = 3423159
Acct-Input-Gigawords = 0
Acct-Output-Gigawords = 0
Acct-Input-Packets = 63518
Acct-Output-Packets = 19895
Acct-Session-Time = 1983
Acct-Status-Type = Interim-Update
Acct-Session-Id = "6807ea4d00000001"
Framed-IP-Address = 10.1.0.3
NAS-Port-Type = Wireless-802.11
NAS-Port = 1
NAS-Port-Id = "00000001"
Calling-Station-Id = "A4-D9-90-24-EE-FF"
Called-Station-Id = "00-15-18-01-81-31"
NAS-IP-Address = 127.0.0.1
NAS-Identifier = "nas01"
WISPr-Location-ID = "isocc=,cc=,ac=,network=Coova,"
WISPr-Location-Name = "My_HotSpot"
# Executing section preacct from file /etc/freeradius2/sites-enabled/default
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] Hashing 'NAS-Port = 1,Client-IP-Address = 127.0.0.1,NAS-IP-Address = 127.0.0.1,Acct-Session-Id = "6807ea4d00000001",User-Name = "dvdwalt@ri"'
[acct_unique] Acct-Unique-Session-ID = "df2cc438ad41e34d".
++[acct_unique] returns ok
[suffix] Looking up realm "ri" for User-Name = "dvdwalt@ri"
[suffix] Found realm "ri"
[suffix] Adding Stripped-User-Name = "dvdwalt"
[suffix] Adding Realm = "ri"
[suffix] Accounting realm is LOCAL.
++[suffix] returns ok
++[files] returns noop
rlm_perl: Added pair Called-Station-Id = 00-15-18-01-81-31
rlm_perl: Added pair NAS-Port-Type = Wireless-802.11
rlm_perl: Added pair NAS-Identifier = nas01
rlm_perl: Added pair NAS-Port = 1
rlm_perl: Added pair WISPr-Location-ID = isocc=,cc=,ac=,network=Coova,
rlm_perl: Added pair Acct-Session-Time = 1983
rlm_perl: Added pair Acct-Session-Id = 6807ea4d00000001
rlm_perl: Added pair Acct-Input-Packets = 63518
rlm_perl: Added pair Realm = ri
rlm_perl: Added pair Event-Timestamp = Apr 23 2025 03:23:57
rlm_perl: Added pair Acct-Input-Octets = 66384842
rlm_perl: Added pair Acct-Output-Gigawords = 0
rlm_perl: Added pair NAS-Port-Id = 00000001
rlm_perl: Added pair Stripped-User-Name = dvdwalt
rlm_perl: Added pair Framed-IP-Address = 10.1.0.3
rlm_perl: Added pair Acct-Output-Packets = 19895
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair ChilliSpot-Version = 1.3.1-svn
rlm_perl: Added pair Acct-Status-Type = Interim-Update
rlm_perl: Added pair WISPr-Location-Name = My_HotSpot
rlm_perl: Added pair Acct-Input-Gigawords = 0
rlm_perl: Added pair Acct-Output-Octets = 3423159
rlm_perl: Added pair Calling-Station-Id = A4-D9-90-24-EE-FF
rlm_perl: Added pair Acct-Unique-Session-Id = df2cc438ad41e34d
rlm_perl: Added pair User-Name = dvdwalt@ri
rlm_perl: Added pair ChilliSpot-Attr-10 = 0x00000002
++[perl] returns ok
# Executing section accounting from file /etc/freeradius2/sites-enabled/default
+- entering group accounting {...}
[detail] expand: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d -> /var/log/radius/radacct/127.0.0.1/detail-20250423
[detail] /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/radius/radacct/127.0.0.1/detail-20250423
[detail] expand: %t -> Wed Apr 23 03:50:24 2025
++[detail] returns ok
++[unix] returns noop
[radutmp] expand: /var/log/radius/radutmp -> /var/log/radius/radutmp
[radutmp] expand: %{User-Name} -> dvdwalt@ri
++[radutmp] returns ok
[sql] expand: %{User-Name} -> dvdwalt@ri
[sql] sql_set_user escaped user --> 'dvdwalt@ri'
[sql] expand: %{Acct-Input-Gigawords} -> 0
[sql] expand: %{Acct-Input-Octets} -> 66384842
[sql] expand: %{Acct-Output-Gigawords} -> 0
[sql] expand: %{Acct-Output-Octets} -> 3423159
[sql] expand: UPDATE radacct SET framedipaddress = '%{Framed-IP-Address}', acctsessiontime = '%{Acct-Session-Time}', acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 |
'%{%{Acct-Output-Octets}:-0}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}' -> UPDATE radacct SET framedipaddress = '10.1.0.3', acctsessiontime = '1983', acctinputoctets = '0' << 32 |
'66384842', acctoutputoctets = '0' << 32 |
'3423159' WHERE acctsessionid = '6807ea4d00000001' AND username = 'dvdwalt@ri'
rlm_sql (sql): Reserving sql socket id: 0
rlm_sql (sql): Released sql socket id: 0
++[sql] returns ok
[attr_filter.accounting_response] expand: %{User-Name} -> dvdwalt@ri
attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] returns updated
Nas::new called
--------------------------------------------
--YFi Permanent User Module - Accounting ---
--------------------------------------------
Valid Permanenty User
-> Account Active
Attributes::new called
-> Special Key Yfi-Data: 192335999
-> Extra Data: 0
-> Total Data Avail is 192335999
-> Updating Percentage Data Used
-> Data usage is 69808001
-> Updating Percentage Data Used To 26.63 for dvdwalt@ri
-> Hard Limit Specified
____________________________________________
----END Yfi Permanent User Module ----------
____________________________________________
rlm_perl: Added pair Acct-Output-Octets = 3423159
rlm_perl: Added pair Calling-Station-Id = A4-D9-90-24-EE-FF
rlm_perl: Added pair Acct-Input-Gigawords = 0
rlm_perl: Added pair Acct-Unique-Session-Id = df2cc438ad41e34d
rlm_perl: Added pair User-Name = dvdwalt@ri
rlm_perl: Added pair ChilliSpot-Attr-10 = 0x00000002
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair ChilliSpot-Version = 1.3.1-svn
rlm_perl: Added pair Acct-Status-Type = Interim-Update
rlm_perl: Added pair WISPr-Location-Name = My_HotSpot
rlm_perl: Added pair Stripped-User-Name = dvdwalt
rlm_perl: Added pair Acct-Output-Gigawords = 0
rlm_perl: Added pair NAS-Port-Id = 00000001
rlm_perl: Added pair Framed-IP-Address = 10.1.0.3
rlm_perl: Added pair Acct-Output-Packets = 19895
rlm_perl: Added pair NAS-Identifier = nas01
rlm_perl: Added pair NAS-Port-Type = Wireless-802.11
rlm_perl: Added pair Called-Station-Id = 00-15-18-01-81-31
rlm_perl: Added pair SQL-User-Name = dvdwalt@ri
rlm_perl: Added pair Acct-Session-Id = 6807ea4d00000001
rlm_perl: Added pair Acct-Session-Time = 1983
rlm_perl: Added pair Acct-Input-Packets = 63518
rlm_perl: Added pair WISPr-Location-ID = isocc=,cc=,ac=,network=Coova,
rlm_perl: Added pair NAS-Port = 1
rlm_perl: Added pair Realm = ri
rlm_perl: Added pair Event-Timestamp = Apr 23 2025 03:23:57
rlm_perl: Added pair Acct-Input-Octets = 66384842
++[perl] returns ok
Sending Accounting-Response of id 36 to 127.0.0.1 port 3799
Finished request 34.
Cleaning up request 34 ID 36 with timestamp +2092
Going to the next request
Ready to process requests.