Update of Radhuntgroup table via dynamic client
Muhammad Nuzaihan Bin Kamal Luddin
muhammad at taqisystems.com
Thu Nov 28 05:11:49 CET 2013
Hi,
I am working out a modification of the dynamic-client to update the
radhuntgroups when the dynamic-client (nas) table is updated.
For every user added, it will be added to the radhuntgroup ("groupname"
column will be the same as "shortname" column in nas table)
But when the nas is accessing the freeradius and got in via the shared
secret. i was looking at updating the radhuntgroup table with the
"groupname" column with the IP address - so i can allow this dynamic NAS
to authenticate these users from radhuntgroup via that IP.
if ("%{sql: SELECT nasname FROM accesspoints WHERE
nasname = '%{Packet-Src-IP-Address}'}") {
update control {
#
# Echo the IP.
# FreeRADIUS-Client-IP-Address =
"%{Packet-Src-IP-Address}"
#
# Do multiple SELECT statements to grab
# the various definitions.
FreeRADIUS-Client-Shortname = "%{sql:
SELECT shortname FROM accesspoints WHERE nasname =
'%{Packet-Src-IP-Address}'}"
FreeRADIUS-Client-Secret = "%{sql:
SELECT secret FROM accesspoints WHERE nasname = '%{Packet-Src-IP-Address}'}"
FreeRADIUS-Client-NAS-Type = "%{sql:
SELECT type FROM accesspoints WHERE nasname = '%{Packet-Src-IP-Address}'}"
FreeRADIUS-Client-Virtual-Server =
"%{sql: SELECT server FROM accesspoints WHERE nasname =
'%{Packet-Src-IP-Address}'}"
}
}
I am looking at FreeRADIUS-Client-IP-Address =
"%{Packet-Src-IP-Address}" to run the Update query but am having
problems with looking at using the UPDATE sql query.
Have anyone did something similar to this?
Thanks and Regards,
Muhammad Nuzaihan
--
Taqi Systems
269-J Jalan Panji
Kampung Chempaka, Kota Bharu, Kelantan 16100
Phone: +6097738657
Mobile: +60199788657
pub 4096R/4C77F88C 2013-04-06 [expires: 2015-04-06]
Key fingerprint = 2FE1 87FA E775 2E05 CC0F B3F6 3CB7 C65F 4C77
F88C
uid Muhammad Nuzaihan Bin Kamal Luddin
<muhammad at taqisystems.com>
More information about the Freeradius-Users
mailing list