More/better documentation
authorAlan T. DeKok <aland@freeradius.org>
Fri, 26 Aug 2011 11:09:05 +0000 (07:09 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 26 Aug 2011 11:16:35 +0000 (07:16 -0400)
raddb/modules/dynamic_clients
raddb/sites-available/dynamic-clients

index 7fdaa6d..bf047be 100644 (file)
@@ -5,8 +5,25 @@
 # This module loads RADIUS clients as needed, rather than when the server
 # starts.
 #
-#  There are no configuration entries for this module.
-#  For documentation, see the file:
+#  There are no configuration entries for this module.  Instead, it
+#  relies on the "client" configuration.  You must:
+#
+#      1) link raddb/sites-enabled/dyanmic_clients to
+#         raddb/sites-available/dyanmic_clients
+#
+#      2) Define a client network/mask (see top of the above file)
+#
+#      3) uncomment the "directory" entry in that client definition
+#
+#      4) list "dynamic_clients" in the "authorize" section of the
+#         "dynamic_clients' virtual server.  The default example already
+#         does this.
+#
+#      5) put files into the above directory, one per IP.
+#         e.g. file "192.168.1.1" should contain a normal client definition
+#         for a client with IP address 192.168.1.1.
+#
+#  For more documentation, see the file:
 #
 #      raddb/sites-available/dynamic-clients 
 #
index 711ba0c..f8c3cc4 100644 (file)
@@ -100,6 +100,12 @@ server dynamic_client_server {
                #  The attributes used to define a dynamic client mirror
                #  the configuration items in the "client" structure.
                #
+
+               #
+               #  Example 1: Hard-code a client IP.  This example is
+               #             useless, but it documents the attributes
+               #             you need.
+               #
                update control {
 
                        #
@@ -133,7 +139,20 @@ server dynamic_client_server {
                }
 
                #
-               #  Or, look the client up in SQL.
+               #  Example 2: Read the clients from "clients" files
+               #             in a directory.
+               #
+
+               #             This requires you to uncomment the
+               #             "directory" configuration in the
+               #             "client dynamic" configuration above,
+               #             and then put one file per IP address in
+               #             that directory.
+               #
+               dynamic_clients
+
+               #
+               #  Example 3: Look the clients 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}'}") {