netmask = 16
#
- # Any other configuration normall found in a "client"
+ # Any other configuration normally found in a "client"
# entry can be used here.
#
dynamic_clients = dynamic_client_server
#
+ # The directory where client definitions are stored. This
+ # needs to be used ONLY if the client definitions are stored
+ # in flat-text files. Each file in that directory should be
+ # ONE and only one client definition. The name of the file
+ # should be the IP address of the client.
+ #
+ # If you are storing clients in SQL, this entry should not
+ # be used.
+# directory = ${confdir}/dynamic-clients/
+
+ #
# Define the lifetime (in seconds) for dynamic clients.
# They will be cached for this lifetime, and deleted afterwards.
#
# If the lifetime is "0", then the dynamic client is never
# deleted. The only way to delete the client is to re-start
# the server.
- lifetime = 86400
+ lifetime = 3600
}
#
# Or, look the client up in SQL.
#
# This requires the SQL module to be configured, of course.
- if ("%{sql: SELECT nasname FROM nas WHERE nasname = %{Packet-Src-IP-Address}}") {
+ if ("%{sql: SELECT nasname FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}") {
update control {
#
# Echo the IP.
#
# Do multiple SELECT statements to grab
# the various definitions.
- FreeRADIUS-Client-Shortname = "%{sql: SELECT shortname FROM nas WHERE nasname = %{Packet-Src-IP-Address}}"
+ FreeRADIUS-Client-Shortname = "%{sql: SELECT shortname FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
+
+ FreeRADIUS-Client-Secret = "%{sql: SELECT secret FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
- FreeRADIUS-Client-Secret = "%{sql: SELECT secret FROM nas WHERE nasname = %{Packet-Src-IP-Address}}"
+ FreeRADIUS-Client-NAS-Type = "%{sql: SELECT type FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
- FreeRADIUS-Client-NAS-Type = "%{sql: SELECT type FROM nas WHERE nasname = %{Packet-Src-IP-Address}}"
+ FreeRADIUS-Client-Virtual-Server = "%{sql: SELECT server FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
}
}