{"id":210,"date":"2007-11-20T20:11:53","date_gmt":"2007-11-20T12:11:53","guid":{"rendered":"http:\/\/www.liangliang.org.cn\/blog\/?p=210"},"modified":"2007-11-20T20:11:53","modified_gmt":"2007-11-20T12:11:53","slug":"debian-%e5%ae%9e%e7%8e%b0freeradiusrouterosmysqldialup_admin","status":"publish","type":"post","link":"https:\/\/www.liangliang.org.cn\/?p=210","title":{"rendered":"HOWTO:Debian\u5b9e\u73b0Freeradius+rRouteros+Mysql+ Dialupadmin"},"content":{"rendered":"<p>Debian\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u65b9\u4fbf\u5feb\u6377\u7684\u8f6f\u4ef6\u5b89\u88c5\u65b9\u5f0f.\u5373:apt-get.<\/p>\n<p>\u4f7f\u7528apt-get\u5b89\u88c5\u6211\u4eec\u6240\u9700\u8981\u7684\u7ec4\u4ef6.<\/p>\n<p>apt-get install freeradius-ldap freeradius-mysql freeradius-krb5<\/p>\n<p>apt-get install apache2 libapache-mod-ssl libapache2-mod-php4 libdate-manip-perl php4-mysql<\/p>\n<p>apt-get install mysql-server<\/p>\n<p>apt-get install freeradius-mysql<\/p>\n<p>apt-get install freeradius-dialupadmin<\/p>\n<p>&nbsp;<\/p>\n<p>\u8fdb\u5165mysql\u5efa\u7acbradius\u6570\u636e\u5e93<\/p>\n<p>mysql -u root -p<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"181\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"179\">create database radius;<br \/>quit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u5c06freeradius\u63d0\u4f9b\u7684\u6570\u636e\u5e93\u5b9e\u4f8b\u8868\u683c,\u5bfc\u5165\u6211\u4eec\u5efa\u7acb\u7684radius\u6570\u636e\u5e93\u4e2d.<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"766\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"764\">\n<p>zcat \/usr\/share\/doc\/freeradius\/examples\/mysql.sql.gz |&nbsp;&nbsp; mysql -u root -p radius  <\/p>\n<p>sed \"\/auto_increment\/ s\/DEFAULT '0'\/\/\" \/usr\/share\/freeradius-dialupadmin\/sql\/badusers.sql | mysql -u root -p radius  <\/p>\n<p>mysql -u root -p radius &lt; \/usr\/share\/freeradius-dialupadmin\/sql\/mtotacct.sql  <\/p>\n<p>mysql -u root -p radius &lt; \/usr\/share\/freeradius-dialupadmin\/sql\/totacct.sql  <\/p>\n<p>sed \"\/auto_increment\/ s\/DEFAULT '0'\/\/\" \/usr\/share\/freeradius-dialupadmin\/sql\/userinfo.sql | mysql -u root -p radius<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5efa\u7acb\u6d4b\u8bd5\u5e10\u6237\u4e3atest\u5bc6\u7801\u4e3atest<\/p>\n<p>mysql -u root -p<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"552\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"550\">\n<p>use radius;<\/p>\n<p>insert into radcheck (username,attribute,value) values ('test','User-Password','test');<br \/>quit<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fee\u6539\/etc\/freeradius\/clients.conf<\/p>\n<p>vim \/etc\/freeradius\/clients.conf<\/p>\n<p>secret\u90e8\u5206:&nbsp; \u4e3aaccess\u94fe\u63a5\u63d0\u4f9b\u9a8c\u8bc1\u7684\u5bc6\u94a5.<\/p>\n<p>client IP\u90e8\u5206,\u4e3a\u9a8c\u8bc1\u5ba2\u6237IP.\u9ed8\u8ba4\u4e3a127.0.0.1.<\/p>\n<p>\u5b9e\u4f8b\u6587\u4ef6\u5982\u4e0b:<\/p>\n<p>&nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"400\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"398\">\n<p>client 127.0.0.1 {<br \/>&nbsp;&nbsp;&nbsp; secret&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = artradiustest<br \/>&nbsp;&nbsp;&nbsp; shortname&nbsp;&nbsp;&nbsp; = 127.0.0.1<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Permitted NAS types are:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; cisco<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; computone<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; livingston<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; max40xx<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; multitech<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; netserver<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; pathras<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; patton<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; portslave<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; tc<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; usrhiper<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; other&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # for all other types<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; nastype&nbsp;&nbsp;&nbsp;&nbsp; = other&nbsp;&nbsp;&nbsp; # localhost isn't usually a NAS...<br \/>}<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fee\u6539\/etc\/freeradius\/radiusd.conf<\/p>\n<p>vim \/etc\/freeradius\/radiusd.conf<\/p>\n<p>\u7531\u4e8e\u6211\u4eec\u4f7f\u7528mysql\u505a\u6570\u636e\u5e93.\u6240\u4ee5\u8bf7\u53bb\u6389sql\u524d# \u4f7f\u5176\u751f\u6548.\u4e3a\u4e86\u4fdd\u8bc1radiusd.conf\u7684\u5b8c\u6574\u6027.\u4e0b\u9762\u63d0\u4f9bradiusd.conf\u7684\u5168\u6587.<\/p>\n<p>\u5bfc\u81f4Blog\u8fc7\u957f,\u8bf7\u5927\u5bb6\u8c05\u89e3.<\/p>\n<p>&nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"596\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"594\">\n<p>##<br \/>## radiusd.conf&nbsp;&nbsp;&nbsp; -- FreeRADIUS server configuration file.<br \/>##<br \/>##&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/www.freeradius.org\/\">http:\/\/www.freeradius.org\/<\/a><br \/>##&nbsp;&nbsp;&nbsp; $Id: radiusd.conf.in,v 1.188.2.4.2.12 2006\/07\/29 19:43:30 nbk Exp $<br \/>##<\/p>\n<p>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The location of other config files and<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logfiles are declared in this file<br \/>#<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Also general configuration for modules can be done<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in this file, it is exported through the API to<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modules that ask for it.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; The configuration variables defined here are of the form ${foo}<br \/>#&nbsp;&nbsp;&nbsp; They are local to this file, and do not change from request to<br \/>#&nbsp;&nbsp;&nbsp; request.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; The per-request variables are of the form %{Attribute-Name}, and<br \/>#&nbsp;&nbsp;&nbsp; are taken from the values of the attribute in the incoming<br \/>#&nbsp;&nbsp;&nbsp; request.&nbsp; See 'doc\/variables.txt' for more information.<\/p>\n<p>prefix = \/usr<br \/>exec_prefix = \/usr<br \/>sysconfdir = \/etc<br \/>localstatedir = \/var<br \/>sbindir = ${exec_prefix}\/sbin<br \/>logdir = \/var\/log\/freeradius<br \/>raddbdir = \/etc\/freeradius<br \/>radacctdir = ${logdir}\/radacct<\/p>\n<p>#&nbsp; Location of config and logfiles.<br \/>confdir = ${raddbdir}<br \/>run_dir = ${localstatedir}\/run\/freeradius<\/p>\n<p>#<br \/>#&nbsp; The logging messages for the server are appended to the<br \/>#&nbsp; tail of this file.<br \/>#<br \/>log_file = ${logdir}\/radius.log<\/p>\n<p>#<br \/># libdir: Where to find the rlm_* modules.<br \/>#<br \/>#&nbsp;&nbsp; This should be automatically set at configuration time.<br \/>#<br \/>#&nbsp;&nbsp; If the server builds and installs, but fails at execution time<br \/>#&nbsp;&nbsp; with an 'undefined symbol' error, then you can use the libdir<br \/>#&nbsp;&nbsp; directive to work around the problem.<br \/>#<br \/>#&nbsp;&nbsp; The cause is usually that a library has been installed on your<br \/>#&nbsp;&nbsp; system in a place where the dynamic linker CANNOT find it.&nbsp; When<br \/>#&nbsp;&nbsp; executing as root (or another user), your personal environment MAY<br \/>#&nbsp;&nbsp; be set up to allow the dynamic linker to find the library.&nbsp; When<br \/>#&nbsp;&nbsp; executing as a daemon, FreeRADIUS MAY NOT have the same<br \/>#&nbsp;&nbsp; personalized configuration.<br \/>#<br \/>#&nbsp;&nbsp; To work around the problem, find out which library contains that symbol,<br \/>#&nbsp;&nbsp; and add the directory containing that library to the end of 'libdir',<br \/>#&nbsp;&nbsp; with a colon separating the directory names.&nbsp; NO spaces are allowed.<br \/>#<br \/>#&nbsp;&nbsp; e.g. libdir = \/usr\/local\/lib:\/opt\/package\/lib<br \/>#<br \/>#&nbsp;&nbsp; You can also try setting the LD_LIBRARY_PATH environment variable<br \/>#&nbsp;&nbsp; in a script which starts the server.<br \/>#<br \/>#&nbsp;&nbsp; If that does not work, then you can re-configure and re-build the<br \/>#&nbsp;&nbsp; server to NOT use shared libraries, via:<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; .\/configure --disable-shared<br \/>#&nbsp;&nbsp;&nbsp; make<br \/>#&nbsp;&nbsp;&nbsp; make install<br \/>#<br \/>libdir = \/usr\/lib\/freeradius<\/p>\n<p>#&nbsp; pidfile: Where to place the PID of the RADIUS server.<br \/>#<br \/>#&nbsp; The server may be signalled while it's running by using this<br \/>#&nbsp; file.<br \/>#<br \/>#&nbsp; This file is written when ONLY running in daemon mode.<br \/>#<br \/>#&nbsp; e.g.:&nbsp; kill -HUP `cat \/var\/run\/freeradius\/freeradius.pid`<br \/>#<br \/>pidfile = ${run_dir}\/freeradius.pid<\/p>\n<p># user\/group: The name (or #number) of the user\/group to run radiusd as.<br \/>#<br \/>#&nbsp;&nbsp; If these are commented out, the server will run as the user\/group<br \/>#&nbsp;&nbsp; that started it.&nbsp; In order to change to a different user\/group, you<br \/>#&nbsp;&nbsp; MUST be root ( or have root privleges ) to start the server.<br \/>#<br \/>#&nbsp;&nbsp; We STRONGLY recommend that you run the server with as few permissions<br \/>#&nbsp;&nbsp; as possible.&nbsp; That is, if you're not using shadow passwords, the<br \/>#&nbsp;&nbsp; user and group items below should be set to 'nobody'.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; On SCO (ODT 3) use \"user = nouser\" and \"group = nogroup\".<br \/>#<br \/>#&nbsp; NOTE that some kernels refuse to setgid(group) when the value of<br \/>#&nbsp; (unsigned)group is above 60000; don't use group nobody on these systems!<br \/>#<br \/>#&nbsp; On systems with shadow passwords, you might have to set 'group = shadow'<br \/>#&nbsp; for the server to be able to read the shadow password file.&nbsp; If you can<br \/>#&nbsp; authenticate users while in debug mode, but not in daemon mode, it may be<br \/>#&nbsp; that the debugging mode server is running as a user that can read the<br \/>#&nbsp; shadow info, and the user listed below can not.<br \/>#<br \/>user = freerad<br \/>group = freerad<\/p>\n<p>#&nbsp; max_request_time: The maximum time (in seconds) to handle a request.<br \/>#<br \/>#&nbsp; Requests which take more time than this to process may be killed, and<br \/>#&nbsp; a REJECT message is returned.<br \/>#<br \/>#&nbsp; WARNING: If you notice that requests take a long time to be handled,<br \/>#&nbsp; then this MAY INDICATE a bug in the server, in one of the modules<br \/>#&nbsp; used to handle a request, OR in your local configuration.<br \/>#<br \/>#&nbsp; This problem is most often seen when using an SQL database.&nbsp; If it takes<br \/>#&nbsp; more than a second or two to receive an answer from the SQL database,<br \/>#&nbsp; then it probably means that you haven't indexed the database.&nbsp; See your<br \/>#&nbsp; SQL server documentation for more information.<br \/>#<br \/>#&nbsp; Useful range of values: 5 to 120<br \/>#<br \/>max_request_time = 30<\/p>\n<p>#&nbsp; delete_blocked_requests: If the request takes MORE THAN 'max_request_time'<br \/>#&nbsp; to be handled, then maybe the server should delete it.<br \/>#<br \/>#&nbsp; If you're running in threaded, or thread pool mode, this setting<br \/>#&nbsp; should probably be 'no'.&nbsp; Setting it to 'yes' when using a threaded<br \/>#&nbsp; server MAY cause the server to crash!<br \/>#<br \/>delete_blocked_requests = no<\/p>\n<p>#&nbsp; cleanup_delay: The time to wait (in seconds) before cleaning up<br \/>#&nbsp; a reply which was sent to the NAS.<br \/>#<br \/>#&nbsp; The RADIUS request is normally cached internally for a short period<br \/>#&nbsp; of time, after the reply is sent to the NAS.&nbsp; The reply packet may be<br \/>#&nbsp; lost in the network, and the NAS will not see it.&nbsp; The NAS will then<br \/>#&nbsp; re-send the request, and the server will respond quickly with the<br \/>#&nbsp; cached reply.<br \/>#<br \/>#&nbsp; If this value is set too low, then duplicate requests from the NAS<br \/>#&nbsp; MAY NOT be detected, and will instead be handled as seperate requests.<br \/>#<br \/>#&nbsp; If this value is set too high, then the server will cache too many<br \/>#&nbsp; requests, and some new requests may get blocked.&nbsp; (See 'max_requests'.)<br \/>#<br \/>#&nbsp; Useful range of values: 2 to 10<br \/>#<br \/>cleanup_delay = 5<\/p>\n<p>#&nbsp; max_requests: The maximum number of requests which the server keeps<br \/>#&nbsp; track of.&nbsp; This should be 256 multiplied by the number of clients.<br \/>#&nbsp; e.g. With 4 clients, this number should be 1024.<br \/>#<br \/>#&nbsp; If this number is too low, then when the server becomes busy,<br \/>#&nbsp; it will not respond to any new requests, until the 'cleanup_delay'<br \/>#&nbsp; time has passed, and it has removed the old requests.<br \/>#<br \/>#&nbsp; If this number is set too high, then the server will use a bit more<br \/>#&nbsp; memory for no real benefit.<br \/>#<br \/>#&nbsp; If you aren't sure what it should be set to, it's better to set it<br \/>#&nbsp; too high than too low.&nbsp; Setting it to 1000 per client is probably<br \/>#&nbsp; the highest it should be.<br \/>#<br \/>#&nbsp; Useful range of values: 256 to infinity<br \/>#<br \/>max_requests = 1024<\/p>\n<p>#&nbsp; bind_address:&nbsp; Make the server listen on a particular IP address, and<br \/>#&nbsp; send replies out from that address.&nbsp; This directive is most useful<br \/>#&nbsp; for machines with multiple IP addresses on one interface.<br \/>#<br \/>#&nbsp; It can either contain \"*\", or an IP address, or a fully qualified<br \/>#&nbsp; Internet domain name.&nbsp; The default is \"*\"<br \/>#<br \/>#&nbsp; As of 1.0, you can also use the \"listen\" directive.&nbsp; See below for<br \/>#&nbsp; more information.<br \/>#<br \/>bind_address = *<\/p>\n<p>#&nbsp; port: Allows you to bind FreeRADIUS to a specific port.<br \/>#<br \/>#&nbsp; The default port that most NAS boxes use is 1645, which is historical.<br \/>#&nbsp; RFC 2138 defines 1812 to be the new port.&nbsp; Many new servers and<br \/>#&nbsp; NAS boxes use 1812, which can create interoperability problems.<br \/>#<br \/>#&nbsp; The port is defined here to be 0 so that the server will pick up<br \/>#&nbsp; the machine's local configuration for the radius port, as defined<br \/>#&nbsp; in \/etc\/services.<br \/>#<br \/>#&nbsp; If you want to use the default RADIUS port as defined on your server,<br \/>#&nbsp; (usually through 'grep radius \/etc\/services') set this to 0 (zero).<br \/>#<br \/>#&nbsp; A port given on the command-line via '-p' over-rides this one.<br \/>#<br \/>#&nbsp; As of 1.0, you can also use the \"listen\" directive.&nbsp; See below for<br \/>#&nbsp; more information.<br \/>#<br \/>port = 0<\/p>\n<p>#<br \/>#&nbsp; By default, the server uses \"bind_address\" to listen to all IP's<br \/>#&nbsp; on a machine, or just one IP.&nbsp; The \"port\" configuration is used<br \/>#&nbsp; to select the authentication port used when listening on those<br \/>#&nbsp; addresses.<br \/>#<br \/>#&nbsp; If you want the server to listen on additional addresses, you can<br \/>#&nbsp; use the \"listen\" section.&nbsp; A sample section (commented out) is included<br \/>#&nbsp; below.&nbsp; This \"listen\" section duplicates the functionality of the<br \/>#&nbsp; \"bind_address\" and \"port\" configuration entries, but it only listens<br \/>#&nbsp; for authentication packets.<br \/>#<br \/>#&nbsp; If you comment out the \"bind_address\" and \"port\" configuration entries,<br \/>#&nbsp; then it becomes possible to make the server accept only accounting,<br \/>#&nbsp; or authentication packets.&nbsp; Previously, it always listened for both<br \/>#&nbsp; types of packets, and it was impossible to make it listen for only<br \/>#&nbsp; one type of packet.<br \/>#<br \/>#listen {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; IP address on which to listen.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Allowed values are:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; dotted quad (1.2.3.4)<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostname&nbsp;&nbsp;&nbsp; (radius.example.com)<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wildcard&nbsp;&nbsp;&nbsp; (*)<br \/>#&nbsp;&nbsp;&nbsp; ipaddr = *<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Port on which to listen.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Allowed values are:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; integer port number (1812)<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; 0 means \"use \/etc\/services for the proper port\"<br \/>#&nbsp;&nbsp;&nbsp; port = 0<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Type of packets to listen for.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Allowed values are:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; auth&nbsp;&nbsp;&nbsp; listen for authentication packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; acct&nbsp;&nbsp;&nbsp; listen for accounting packets<br \/>&nbsp;&nbsp;&nbsp; #<br \/>#&nbsp;&nbsp;&nbsp; type = auth<br \/>#}<\/p>\n<p>#&nbsp; hostname_lookups: Log the names of clients or just their IP addresses<br \/>#&nbsp; e.g., www.freeradius.org (on) or 206.47.27.232 (off).<br \/>#<br \/>#&nbsp; The default is 'off' because it would be overall better for the net<br \/>#&nbsp; if people had to knowingly turn this feature on, since enabling it<br \/>#&nbsp; means that each client request will result in AT LEAST one lookup<br \/>#&nbsp; request to the nameserver.&nbsp;&nbsp; Enabling hostname_lookups will also<br \/>#&nbsp; mean that your server may stop randomly for 30 seconds from time<br \/>#&nbsp; to time, if the DNS requests take too long.<br \/>#<br \/>#&nbsp; Turning hostname lookups off also means that the server won't block<br \/>#&nbsp; for 30 seconds, if it sees an IP address which has no name associated<br \/>#&nbsp; with it.<br \/>#<br \/>#&nbsp; allowed values: {no, yes}<br \/>#<br \/>hostname_lookups = no<\/p>\n<p>#&nbsp; Core dumps are a bad thing.&nbsp; This should only be set to 'yes'<br \/>#&nbsp; if you're debugging a problem with the server.<br \/>#<br \/>#&nbsp; allowed values: {no, yes}<br \/>#<br \/>allow_core_dumps = no<\/p>\n<p>#&nbsp; Regular expressions<br \/>#<br \/>#&nbsp; These items are set at configure time.&nbsp; If they're set to \"yes\",<br \/>#&nbsp; then setting them to \"no\" turns off regular expression support.<br \/>#<br \/>#&nbsp; If they're set to \"no\" at configure time, then setting them to \"yes\"<br \/>#&nbsp; WILL NOT WORK.&nbsp; It will give you an error.<br \/>#<br \/>regular_expressions&nbsp;&nbsp;&nbsp; = yes<br \/>extended_expressions&nbsp;&nbsp;&nbsp; = yes<\/p>\n<p>#&nbsp; Log the full User-Name attribute, as it was found in the request.<br \/>#<br \/># allowed values: {no, yes}<br \/>#<br \/>log_stripped_names = no<\/p>\n<p>#&nbsp; Log authentication requests to the log file.<br \/>#<br \/>#&nbsp; allowed values: {no, yes}<br \/>#<br \/>log_auth = no<\/p>\n<p>#&nbsp; Log passwords with the authentication requests.<br \/>#&nbsp; log_auth_badpass&nbsp; - logs password if it's rejected<br \/>#&nbsp; log_auth_goodpass - logs password if it's correct<br \/>#<br \/>#&nbsp; allowed values: {no, yes}<br \/>#<br \/>log_auth_badpass = no<br \/>log_auth_goodpass = no<\/p>\n<p># usercollide:&nbsp; Turn \"username collision\" code on and off.&nbsp; See the<br \/># \"doc\/duplicate-users\" file<br \/>#<br \/>#&nbsp; WARNING<br \/>#&nbsp; !!!!!!!&nbsp; Setting this to \"yes\" may result in the server behaving<br \/>#&nbsp; !!!!!!!&nbsp; strangely.&nbsp; The \"username collision\" code will ONLY work<br \/>#&nbsp; !!!!!!!&nbsp; with clear-text passwords.&nbsp; Even then, it may not do what<br \/>#&nbsp; !!!!!!!&nbsp; you want, or what you expect.<br \/>#&nbsp; !!!!!!!<br \/>#&nbsp; !!!!!!!&nbsp; We STRONGLY RECOMMEND that you do not use this feature,<br \/>#&nbsp; !!!!!!!&nbsp; and that you find another way of acheiving the same goal.<br \/>#&nbsp; !!!!!!!<br \/>#&nbsp; !!!!!!!&nbsp; e,g. module fail-over.&nbsp; See 'doc\/configurable_failover'<br \/>#&nbsp; WARNING<br \/>#<br \/>usercollide = no<\/p>\n<p># lower_user \/ lower_pass:&nbsp; <br \/># Lower case the username\/password \"before\" or \"after\"<br \/># attempting to authenticate.&nbsp; <br \/>#<br \/>#&nbsp; If \"before\", the server will first modify the request and then try<br \/>#&nbsp; to auth the user.&nbsp; If \"after\", the server will first auth using the<br \/>#&nbsp; values provided by the user.&nbsp; If that fails it will reprocess the<br \/>#&nbsp; request after modifying it as you specify below.<br \/>#<br \/>#&nbsp; This is as close as we can get to case insensitivity.&nbsp; It is the<br \/>#&nbsp; admin's job to ensure that the username on the auth db side is<br \/>#&nbsp; *also* lowercase to make this work<br \/>#<br \/># Default is 'no' (don't lowercase values)<br \/># Valid values = \"before\" \/ \"after\" \/ \"no\"<br \/>#<br \/>lower_user = no<br \/>lower_pass = no<\/p>\n<p># nospace_user \/ nospace_pass:<br \/>#<br \/>#&nbsp; Some users like to enter spaces in their username or password<br \/>#&nbsp; incorrectly.&nbsp; To save yourself the tech support call, you can<br \/>#&nbsp; eliminate those spaces here:<br \/>#<br \/># Default is 'no' (don't remove spaces)<br \/># Valid values = \"before\" \/ \"after\" \/ \"no\" (explanation above)<br \/>#<br \/>nospace_user = no<br \/>nospace_pass = no<\/p>\n<p>#&nbsp; The program to execute to do concurrency checks.<br \/>checkrad = ${sbindir}\/checkrad<\/p>\n<p># SECURITY CONFIGURATION<br \/>#<br \/>#&nbsp; There may be multiple methods of attacking on the server.&nbsp; This<br \/>#&nbsp; section holds the configuration items which minimize the impact<br \/>#&nbsp; of those attacks<br \/>#<br \/>security {<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; max_attributes: The maximum number of attributes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; permitted in a RADIUS packet.&nbsp; Packets which have MORE<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; than this number of attributes in them will be dropped.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If this number is set too low, then no RADIUS packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; will be accepted.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If this number is set too high, then an attacker may be<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; able to send a small number of packets which will cause<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the server to use all available memory on the machine.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Setting this number to 0 means \"allow any number of attributes\"<br \/>&nbsp;&nbsp;&nbsp; max_attributes = 200<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; reject_delay: When sending an Access-Reject, it can be<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; delayed for a few seconds.&nbsp; This may help slow down a DoS<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attack.&nbsp; It also helps to slow down people trying to brute-force<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; crack a users password.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Setting this number to 0 means \"send rejects immediately\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If this number is set higher than 'cleanup_delay', then the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; rejects will be sent at 'cleanup_delay' time, when the request<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is deleted from the internal cache of requests.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Useful ranges: 1 to 5<br \/>&nbsp;&nbsp;&nbsp; reject_delay = 1<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; status_server: Whether or not the server will respond<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; to Status-Server requests.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Normally this should be set to \"no\", because they're useless.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See: <a href=\"http:\/\/www.freeradius.org\/rfc\/rfc2865.html#Keep-Alives\">http:\/\/www.freeradius.org\/rfc\/rfc2865.html#Keep-Alives<\/a><br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; However, certain NAS boxes may require them.&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; When sent a Status-Server message, the server responds with<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; an Access-Accept packet, containing a Reply-Message attribute,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; which is a string describing how long the server has been<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; running.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; status_server = no<br \/>}<\/p>\n<p># PROXY CONFIGURATION<br \/>#<br \/>#&nbsp; proxy_requests: Turns proxying of RADIUS requests on or off.<br \/>#<br \/>#&nbsp; The server has proxying turned on by default.&nbsp; If your system is NOT<br \/>#&nbsp; set up to proxy requests to another server, then you can turn proxying<br \/>#&nbsp; off here.&nbsp; This will save a small amount of resources on the server.<br \/>#<br \/>#&nbsp; If you have proxying turned off, and your configuration files say<br \/>#&nbsp; to proxy a request, then an error message will be logged.<br \/>#<br \/>#&nbsp; To disable proxying, change the \"yes\" to \"no\", and comment the<br \/>#&nbsp; $INCLUDE line.<br \/>#<br \/>#&nbsp; allowed values: {no, yes}<br \/>#<br \/>proxy_requests&nbsp; = yes<br \/>$INCLUDE&nbsp; ${confdir}\/proxy.conf<\/p>\n<p># CLIENTS CONFIGURATION<br \/>#<br \/>#&nbsp; Client configuration is defined in \"clients.conf\".&nbsp; <br \/>#<\/p>\n<p>#&nbsp; The 'clients.conf' file contains all of the information from the old<br \/>#&nbsp; 'clients' and 'naslist' configuration files.&nbsp; We recommend that you<br \/>#&nbsp; do NOT use 'client's or 'naslist', although they are still<br \/>#&nbsp; supported.<br \/>#<br \/>#&nbsp; Anything listed in 'clients.conf' will take precedence over the<br \/>#&nbsp; information from the old-style configuration files.<br \/>#<br \/>$INCLUDE&nbsp; ${confdir}\/clients.conf<\/p>\n<p># SNMP CONFIGURATION<br \/>#<br \/>#&nbsp; Snmp configuration is only valid if SNMP support was enabled<br \/>#&nbsp; at compile time.<br \/>#<br \/>#&nbsp; To enable SNMP querying of the server, set the value of the<br \/>#&nbsp; 'snmp' attribute to 'yes'<br \/>#<br \/>snmp&nbsp;&nbsp;&nbsp; = no<br \/>$INCLUDE&nbsp; ${confdir}\/snmp.conf<\/p>\n<p># THREAD POOL CONFIGURATION<br \/>#<br \/>#&nbsp; The thread pool is a long-lived group of threads which<br \/>#&nbsp; take turns (round-robin) handling any incoming requests.<br \/>#<br \/>#&nbsp; You probably want to have a few spare threads around,<br \/>#&nbsp; so that high-load situations can be handled immediately.&nbsp; If you<br \/>#&nbsp; don't have any spare threads, then the request handling will<br \/>#&nbsp; be delayed while a new thread is created, and added to the pool.<br \/>#<br \/>#&nbsp; You probably don't want too many spare threads around,<br \/>#&nbsp; otherwise they'll be sitting there taking up resources, and<br \/>#&nbsp; not doing anything productive.<br \/>#<br \/>#&nbsp; The numbers given below should be adequate for most situations.<br \/>#<br \/>thread pool {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Number of servers to start initially --- should be a reasonable<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; ballpark figure.<br \/>&nbsp;&nbsp;&nbsp; start_servers = 5<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Limit on the total number of servers running.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If this limit is ever reached, clients will be LOCKED OUT, so it<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; should NOT BE SET TOO LOW.&nbsp; It is intended mainly as a brake to<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; keep a runaway server from taking the system with it as it spirals<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; down...<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You may find that the server is regularly reaching the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'max_servers' number of threads, and that increasing<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'max_servers' doesn't seem to make much difference.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If this is the case, then the problem is MOST LIKELY that<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; your back-end databases are taking too long to respond, and<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; are preventing the server from responding in a timely manner.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The solution is NOT do keep increasing the 'max_servers'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; value, but instead to fix the underlying cause of the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; problem: slow database, or 'hostname_lookups=yes'.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For more information, see 'max_request_time', above.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; max_servers = 32<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Server-pool size regulation.&nbsp; Rather than making you guess<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; how many servers you need, FreeRADIUS dynamically adapts to<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the load it sees, that is, it tries to maintain enough<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; servers to handle the current load, plus a few spare<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; servers to handle transient load spikes.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It does this by periodically checking how many servers are<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; waiting for a request.&nbsp; If there are fewer than<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; min_spare_servers, it creates a new spare.&nbsp; If there are<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; more than max_spare_servers, some of the spares die off.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The default values are probably OK for most sites.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; min_spare_servers = 3<br \/>&nbsp;&nbsp;&nbsp; max_spare_servers = 10<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; There may be memory leaks or resource allocation problems with<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the server.&nbsp; If so, set this value to 300 or so, so that the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; resources will be cleaned up periodically.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This should only be necessary if there are serious bugs in the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; server which have not yet been fixed.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; '0' is a special value meaning 'infinity', or 'the servers never<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; exit'<br \/>&nbsp;&nbsp;&nbsp; max_requests_per_server = 0<br \/>}<\/p>\n<p># MODULE CONFIGURATION<br \/>#<br \/>#&nbsp; The names and configuration of each module is located in this section.<br \/>#<br \/>#&nbsp; After the modules are defined here, they may be referred to by name,<br \/>#&nbsp; in other sections of this configuration file.<br \/>#<br \/>modules {<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Each module has a configuration as follows:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; name [ instance ] {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; config_item = value<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'name' is used to load the 'rlm_name' library<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; which implements the functionality of the module.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'instance' is optional.&nbsp; To have two different instances<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; of a module, it first must be referred to by 'name'.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The different copies of the module are then created by<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; inventing two 'instance' names, e.g. 'instance1' and 'instance2'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The instance names can then be used in later configuration<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; INSTEAD of the original 'name'.&nbsp; See the 'radutmp' configuration<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; below for an example.<br \/>&nbsp;&nbsp;&nbsp; #<\/p>\n<p>&nbsp;&nbsp;&nbsp; # PAP module to authenticate users based on their stored password<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Supports multiple encryption schemes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; clear: Clear text<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; crypt: Unix crypt<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; md5: MD5 ecnryption<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; sha1: SHA1 encryption.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; DEFAULT: crypt<br \/>&nbsp;&nbsp;&nbsp; pap {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; encryption_scheme = crypt<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # CHAP module<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; To authenticate requests containing a CHAP-Password attribute.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; chap {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; authtype = CHAP<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Pluggable Authentication Modules<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For Linux, see:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/www.kernel.org\/pub\/linux\/libs\/pam\/index.html\">http:\/\/www.kernel.org\/pub\/linux\/libs\/pam\/index.html<\/a><br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; WARNING: On many systems, the system PAM libraries have<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memory leaks!&nbsp; We STRONGLY SUGGEST that you do not<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use PAM for authentication, due to those memory leaks.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; pam {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The name to use for PAM authentication.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; PAM looks in \/etc\/pam.d\/${pam_auth_name}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; for it's configuration.&nbsp; See 'redhat\/radiusd-pam'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; for a sample PAM configuration file.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Note that any Pam-Auth attribute set in the 'authorize'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; section will over-ride this one.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pam_auth = radiusd<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Unix \/etc\/passwd style authentication<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; unix {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Cache \/etc\/passwd, \/etc\/shadow, and \/etc\/group<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The default is to NOT cache them.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; For FreeBSD and NetBSD, you do NOT want to enable<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the cache, as it's password lookups are done via a<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; database, so set this value to 'no'.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Some systems (e.g. RedHat Linux with pam_pwbd) can<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; take *seconds* to check a password, when th passwd<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; file containing 1000's of entries.&nbsp; For those systems,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; you should set the cache value to 'yes', and set<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the locations of the 'passwd', 'shadow', and 'group'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; files, below.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # allowed values: {no, yes}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Reload the cache every 600 seconds (10mins). 0 to disable.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache_reload = 600<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Define the locations of the normal passwd, shadow, and<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; group files.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; 'shadow' is commented out by default, because not all<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; systems have shadow passwords.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; To force the module to use the system password functions,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; instead of reading the files, leave the following entries<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; commented out.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This is required for some systems, like FreeBSD,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; and Mac OSX.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; passwd = \/etc\/passwd<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shadow = \/etc\/shadow<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; group = \/etc\/group<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The location of the \"wtmp\" file.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This should be moved to it's own module soon.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The only use for 'radlast'.&nbsp; If you don't use<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; 'radlast', then you can comment out this item.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; radwtmp = ${logdir}\/radwtmp<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Extensible Authentication Protocol<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For all EAP related authentications.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Now in another file, because it is very large.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>$INCLUDE ${confdir}\/eap.conf<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Microsoft CHAP authentication<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module supports MS-CHAP and MS-CHAPv2 authentication.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It also enforces the SMB-Account-Ctrl attribute.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; mschap {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; As of 0.9, the mschap module does NOT support<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; reading from \/etc\/smbpasswd.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If you are using \/etc\/smbpasswd, see the 'passwd'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; module for an example of how to use \/etc\/smbpasswd<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if use_mppe is not set to no mschap will<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # add MS-CHAP-MPPE-Keys for MS-CHAPv1 and<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # MS-MPPE-Recv-Key\/MS-MPPE-Send-Key for MS-CHAPv2<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #use_mppe = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if mppe is enabled require_encryption makes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # encryption moderate<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #require_encryption = yes<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # require_strong always requires 128 bit key<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # encryption<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #require_strong = yes<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Windows sends us a username in the form of<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # DOMAIN\\user, but sends the challenge response<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # based on only the user portion.&nbsp; This hack<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # corrects for that incorrect behavior.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #with_ntdomain_hack = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The module can perform authentication itself, OR<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # use a Windows Domain Controller.&nbsp; This configuration<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # directive tells the module to call the ntlm_auth<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # program, which will do the authentication, and return<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # the NT-Key.&nbsp; Note that you MUST have \"winbindd\" and<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # \"nmbd\" running on the local machine for ntlm_auth<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # to work.&nbsp; See the ntlm_auth program documentation<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # for details.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Be VERY careful when editing the following line!<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #ntlm_auth = \"\/path\/to\/ntlm_auth --request-nt-key --username=%{Stripped-User-Name:-%{User-Name:-None}} --challenge=%{mschap:Challenge:-00} --nt-response=%{mschap:NT-Response:-00}\"<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Lightweight Directory Access Protocol (LDAP)<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module definition allows you to use LDAP for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; authorization and authentication.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See doc\/rlm_ldap for description of configuration options <br \/>&nbsp;&nbsp;&nbsp; #&nbsp; and sample authorize{} and authenticate{} blocks <br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; However, LDAP can be used for authentication ONLY when the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Access-Request packet contains a clear-text User-Password<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute.&nbsp; LDAP authentication will NOT work for any other<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; authentication method.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This means that LDAP servers don't understand EAP.&nbsp; If you<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; force \"Auth-Type = LDAP\", and then send the server a<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; request containing EAP authentication, then authentication<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; WILL NOT WORK.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The solution is to use the default configuration, which does<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; work.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Setting \"Auth-Type = LDAP\" is ALMOST ALWAYS WRONG.&nbsp; We<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; really can't emphasize this enough.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp; ldap {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server = \"ldap.your.domain\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # identity = \"cn=admin,o=My Org,c=UA\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # password = mypass<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; basedn = \"o=My Org,c=UA\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter = \"(uid=%{Stripped-User-Name:-%{User-Name}})\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # base_filter = \"(objectclass=radiusprofile)\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # set this to 'yes' to use TLS encrypted connections<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # to the LDAP database by using the StartTLS extended<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # operation.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The StartTLS operation is supposed to be used with normal<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # ldap connections instead of using ldaps (port 689) connections<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start_tls = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tls_cacertfile&nbsp;&nbsp;&nbsp; = \/path\/to\/cacert.pem<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tls_cacertdir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = \/path\/to\/ca\/dir\/<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tls_certfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = \/path\/to\/radius.crt<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tls_keyfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = \/path\/to\/radius.key<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tls_randfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = \/path\/to\/rnd<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tls_require_cert&nbsp;&nbsp;&nbsp; = \"demand\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # default_profile = \"cn=radprofile,ou=dialup,o=My Org,c=UA\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # profile_attribute = \"radiusProfileDn\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access_attr = \"dialupAccess\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Mapping of RADIUS dictionary attributes to LDAP<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # directory attributes.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dictionary_mapping = ${raddbdir}\/ldap.attrmap<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ldap_connections_number = 5<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NOTICE: The password_header directive is NOT case insensitive<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # password_header = \"{clear}\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Set:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; password_attribute = nspmPassword<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # to get the user's password from a Novell eDirectory<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # backend. This will work *only if* freeRADIUS is<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # configured to build with --with-edir option.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The server can usually figure this out on its own, and pull<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the correct User-Password or NT-Password from the database.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Note that NT-Passwords MUST be stored as a 32-digit hex<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; string, and MUST start off with \"0x\", such as:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; 0x000102030405060708090a0b0c0d0e0f<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Without the leading \"0x\", NT-Passwords will not work.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This goes for NT-Passwords stored in SQL, too.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # password_attribute = userPassword<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Un-comment the following to disable Novell eDirectory account<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # policy check and intruder detection. This will work *only if*<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # FreeRADIUS is configured to build with --with-edir option.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # edir_account_policy_check=no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # groupname_attribute = cn<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # groupmembership_filter = \"(|(&amp;(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&amp;(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # groupmembership_attribute = radiusGroupName<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout = 4<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timelimit = 3<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; net_timeout = 1<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # compare_check_items = yes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # do_xlat = yes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # access_attr_used_for_allow = yes<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; By default, if the packet contains a User-Password,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; and no other module is configured to handle the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; authentication, the LDAP module sets itself to do<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; LDAP bind for authentication.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; You can disable this behavior by setting the following<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; configuration entry to \"no\".<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; allowed values: {no, yes}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # set_auth_type = yes<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # passwd module allows to do authorization via any passwd-like<br \/>&nbsp;&nbsp;&nbsp; # file and to extract any attributes from these modules<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # parameters are:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; filename - path to filename<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; format - format for filename record. This parameters<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; correlates record in the passwd file and RADIUS<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attributes.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Field marked as '*' is key field. That is, the parameter<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with this name from the request is used to search for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the record from passwd file<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attribute marked as '=' is added to reply_itmes instead<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of default configure_itmes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attribute marked as '~' is added to request_items<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Field marked as ',' may contain a comma separated list<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of attributes.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; authtype - if record found this Auth-Type is used to authenticate<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; hashsize - hashtable size. If 0 or not specified records are not<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stored in memory and file is red on every request.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; allowmultiplekeys - if few records for every key are allowed<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; ignorenislike - ignore NIS-related records<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; delimiter - symbol to use as a field separator in passwd file,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for format ':' symbol is always used. '\\0', '\\n' are<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not allowed <br \/>&nbsp;&nbsp;&nbsp; #<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; An example configuration for using \/etc\/smbpasswd.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #passwd etc_smbpasswd {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; filename = \/etc\/smbpasswd<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; format = \"*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::\"<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; authtype = MS-CHAP<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; hashsize = 100<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; ignorenislike = no<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; allowmultiplekeys = no<br \/>&nbsp;&nbsp;&nbsp; #}<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Similar configuration, for the \/etc\/group file. Adds a Group-Name<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute for every group that the user is member of.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #passwd etc_group {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; filename = \/etc\/group<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; format = \"=Group-Name:::*,User-Name\"<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; hashsize = 50<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; ignorenislike = yes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; allowmultiplekeys = yes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; delimiter = \":\"<br \/>&nbsp;&nbsp;&nbsp; #}<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Realm module, for proxying.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You can have multiple instances of the realm module to<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; support multiple realm syntaxs at the same time.&nbsp; The<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; search order is defined by the order in the authorize and<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; preacct sections.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Four config options:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; format&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp; must be 'prefix' or 'suffix'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; delimiter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp; must be a single character<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; ignore_default -&nbsp; set to 'yes' or 'no'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_null&nbsp;&nbsp;&nbsp; -&nbsp; set to 'yes' or 'no'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; ignore_default and ignore_null can be set to 'yes' to prevent<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the module from matching against DEFAULT or NULL realms.&nbsp; This<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; may be useful if you have have multiple instances of the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; realm module.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; They both default to 'no'.<br \/>&nbsp;&nbsp;&nbsp; #<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; 'realm\/username'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Using this entry, IPASS users have their realm set to \"IPASS\".<br \/>&nbsp;&nbsp;&nbsp; realm IPASS {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; format = prefix<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delimiter = \"\/\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_default = no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_null = no<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; 'username@realm'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; realm suffix {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; format = suffix<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delimiter = \"@\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_default = no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_null = no<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; 'username%realm'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; realm realmpercent {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; format = suffix<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delimiter = \"%\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_default = no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_null = no<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'domain\\user'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; realm ntdomain {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; format = prefix<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delimiter = \"\\\\\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_default = no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ignore_null = no<br \/>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; <\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; A simple value checking module<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It can be used to check if an attribute value in the request<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; matches a (possibly multi valued) attribute in the check<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; items This can be used for example for caller-id<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; authentication.&nbsp; For the module to run, both the request<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute and the check items attribute must exist<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; i.e.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; A user has an ldap entry with 2 radiusCallingStationId<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attributes with values \"12345678\" and \"12345679\".&nbsp; If we<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; enable rlm_checkval, then any request which contains a<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Calling-Station-Id with one of those two values will be<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; accepted.&nbsp; Requests with other values for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Calling-Station-Id will be rejected.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Regular expressions in the check attribute value are allowed<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; as long as the operator is '=~'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; checkval {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The attribute to look for in the request<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item-name = Calling-Station-Id<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The attribute to look for in check items. Can be multi valued<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check-name = Calling-Station-Id<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The data type. Can be<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # string,integer,ipaddr,date,abinary,octets<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data-type = string<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If set to yes and we dont find the item-name attribute in the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # request then we send back a reject<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # DEFAULT is no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #notfound-reject = no<br \/>&nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; rewrite arbitrary packets.&nbsp; Useful in accounting and authorization.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The module can also use the Rewrite-Rule attribute. If it<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is set and matches the name of the module instance, then<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; that module instance will be the only one which runs.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Also if new_attribute is set to yes then a new attribute<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; will be created containing the value replacewith and it<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; will be added to searchin (packet, reply, proxy, proxy_reply or config).<br \/>&nbsp;&nbsp;&nbsp; # searchfor,ignore_case and max_matches will be ignored in that case.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # Backreferences are supported: %{0} will contain the string the whole match<br \/>&nbsp;&nbsp;&nbsp; # and %{1} to %{8} will contain the contents of the 1st to the 8th parentheses<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # If max_matches is greater than one the backreferences will correspond to the<br \/>&nbsp;&nbsp;&nbsp; # first match<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #attr_rewrite sanecallerid {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; attribute = Called-Station-Id<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # may be \"packet\", \"reply\", \"proxy\", \"proxy_reply\" or \"config\"<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; searchin = packet<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; searchfor = \"[+ ]\"<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; replacewith = \"\"<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; ignore_case = no<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; new_attribute = no<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; max_matches = 10<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; ## If set to yes then the replace string will be appended to the original string<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; append = no<br \/>&nbsp;&nbsp;&nbsp; #}<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Preprocess the incoming RADIUS request, before handing it off<br \/>&nbsp;&nbsp;&nbsp; # to other modules.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module processes the 'huntgroups' and 'hints' files.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; In addition, it re-writes some weird attributes created<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; by some NASes, and converts the attributes into a form which<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is a little more standard.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; preprocess {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; huntgroups = ${confdir}\/huntgroups<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hints = ${confdir}\/hints<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This hack changes Ascend's wierd port numberings<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # to standard 0-??? port numbers so that the \"+\" works<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # for IP address assignments.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with_ascend_hack = no<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ascend_channels_per_line = 23<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Windows NT machines often authenticate themselves as<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NT_DOMAIN\\username<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If this is set to 'yes', then the NT_DOMAIN portion<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # of the user-name is silently discarded.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This configuration entry SHOULD NOT be used.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # See the \"realms\" module for a better way to handle<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NT domains.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with_ntdomain_hack = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Specialix Jetstream 8500 24 port access server.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If the user name is 10 characters or longer, a \"\/\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # and the excess characters after the 10th are<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # appended to the user name.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If you're not running that NAS, you don't need<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # this hack.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with_specialix_jetstream_hack = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Cisco (and Quintum in Cisco mode) sends it's VSA attributes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # with the attribute name *again* in the string, like:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; H323-Attribute = \"h323-attribute=value\".<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If this configuration item is set to 'yes', then<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # the redundant data in the the attribute text is stripped<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # out.&nbsp; The result is:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; H323-Attribute = \"value\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If you're not running a Cisco or Quintum NAS, you don't<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # need this hack.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with_cisco_vsa_hack = no<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Livingston-style 'users' file<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; files {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usersfile = ${confdir}\/users<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; acctusersfile = ${confdir}\/acct_users<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; preproxy_usersfile = ${confdir}\/preproxy_users<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If you want to use the old Cistron 'users' file<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; with FreeRADIUS, you should change the next line<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; to 'compat = cistron'.&nbsp; You can the copy your 'users'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; file from Cistron.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; compat = no<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Write a detailed log of all accounting records received.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; detail {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Note that we do NOT use NAS-IP-Address here, as<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; that attribute MAY BE from the originating NAS, and<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; NOT from the proxy which actually sent us the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; request.&nbsp; The Client-IP-Address attribute is ALWAYS<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the address of the client which sent us the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; request.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The following line creates a new detail file for<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; every radius client (by IP address or hostname).<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; In addition, a new detail file is created every<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; day, so that the detail file doesn't have to go<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; through a 'log rotation'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If your detail files are large, you may also want<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; to add a ':%H' (see doc\/variables.txt) to the end<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; of it, to create a new detail file every hour, e.g.:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; ....\/detail-%Y%m%d:%H<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This will create a new detail file for every hour.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detailfile = ${radacctdir}\/%{Client-IP-Address}\/detail-%Y%m%d<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The Unix-style permissions on the 'detail' file.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The detail file often contains secret or private<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; information about users.&nbsp; So by keeping the file<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; permissions restrictive, we can prevent unwanted<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; people from seeing that information.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detailperm = 0600<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Certain attributes such as User-Password may be<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # \"sensitive\", so they should not be printed in the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detail file.&nbsp; This section lists the attributes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # that should be suppressed.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The attributes should be listed one to a line.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #suppress {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # User-Password<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #}<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Many people want to log authentication requests.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Rather than modifying the server core to print out more<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; messages, we can use a different instance of the 'detail'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module, to log the authentication requests to a file.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You will also need to un-comment the 'auth_log' line<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in the 'authorize' section, below.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # detail auth_log {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailfile = ${radacctdir}\/%{Client-IP-Address}\/auth-detail-%Y%m%d<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This MUST be 0600, otherwise anyone can read<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the users passwords!<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailperm = 0600<br \/>&nbsp;&nbsp;&nbsp; # }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module logs authentication reply packets sent<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; to a NAS.&nbsp; Both Access-Accept and Access-Reject packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; are logged.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You will also need to un-comment the 'reply_log' line<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in the 'post-auth' section, below.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # detail reply_log {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailfile = ${radacctdir}\/%{Client-IP-Address}\/reply-detail-%Y%m%d<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This MUST be 0600, otherwise anyone can read<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the users passwords!<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailperm = 0600<br \/>&nbsp;&nbsp;&nbsp; # }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module logs packets proxied to a home server.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You will also need to un-comment the 'pre_proxy_log' line<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in the 'pre-proxy' section, below.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # detail pre_proxy_log {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailfile = ${radacctdir}\/%{Client-IP-Address}\/pre-proxy-detail-%Y%m%d<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This MUST be 0600, otherwise anyone can read<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the users passwords!<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailperm = 0600<br \/>&nbsp;&nbsp;&nbsp; # }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module logs response packets from a home server.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You will also need to un-comment the 'post_proxy_log' line<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in the 'post-proxy' section, below.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # detail post_proxy_log {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailfile = ${radacctdir}\/%{Client-IP-Address}\/post-proxy-detail-%Y%m%d<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; This MUST be 0600, otherwise anyone can read<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the users passwords!<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # detailperm = 0600<br \/>&nbsp;&nbsp;&nbsp; # }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The rlm_sql_log module appends the SQL queries in a log<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; file which is read later by the radsqlrelay program.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module only performs the dynamic expansion of the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; variables found in the SQL statements. No operation is<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; executed on the database server. (this could be done<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; later by an external program) That means the module is<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; useful only with non-\"SELECT\" statements.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See rlm_sql_log(5) manpage.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>#&nbsp;&nbsp;&nbsp; sql_log {<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path = ${radacctdir}\/sql-relay<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; acct_table = \"radacct\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postauth_table = \"radpostauth\"<br \/>#<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start = \"INSERT INTO ${acct_table} (AcctSessionId, UserName, \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctSessionTime, AcctTerminateCause) VALUES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '%{Framed-IP-Address}', '%S', '0', '0', '');\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stop = \"INSERT INTO ${acct_table} (AcctSessionId, UserName,&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctSessionTime, AcctTerminateCause) VALUES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '%{Framed-IP-Address}', '0', '%S', '%{Acct-Session-Time}',&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '%{Acct-Terminate-Cause}');\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alive = \"INSERT INTO ${acct_table} (AcctSessionId, UserName, \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctSessionTime, AcctTerminateCause) VALUES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '%{Framed-IP-Address}', '0', '0', '%{Acct-Session-Time}','');\"<br \/>#<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Post-Auth = \"INSERT INTO ${postauth_table}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (user, pass, reply, date) VALUES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('%{User-Name}', '%{User-Password:-Chap-Password}',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '%{reply:Packet-Type}', '%S');\"<br \/>#&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Create a unique accounting session Id.&nbsp; Many NASes re-use<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; or repeat values for Acct-Session-Id, causing no end of<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; confusion.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module will add a (probably) unique session id <br \/>&nbsp;&nbsp;&nbsp; #&nbsp; to an accounting packet based on the attributes listed<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; below found in the packet.&nbsp; See doc\/rlm_acct_unique for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; more information.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; acct_unique {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key = \"User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port\"<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Include another file that has the SQL-related configuration.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This is another file only because it tends to be big.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The following configuration file is for use with MySQL.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For Postgresql, use:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${confdir}\/postgresql.conf<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For MS-SQL, use:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${confdir}\/mssql.conf<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For Oracle, use:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${confdir}\/oraclesql.conf<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; $INCLUDE&nbsp; ${confdir}\/sql.conf<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; For Cisco VoIP specific accounting with Postgresql,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; use:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${confdir}\/pgsql-voip.conf<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You will also need the sql schema from:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src\/billing\/cisco_h323_db_schema-postgres.sql<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Note: This config can be use AS WELL AS the standard sql<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; config if you need SQL based Auth<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Write a 'utmp' style file, of which users are currently<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; logged in, and where they've logged in from.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This file is used mainly for Simultaneous-Use checking,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; and also 'radwho', to see who's currently logged in.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; radutmp {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Where the file is stored.&nbsp; It's not a log file,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; so it doesn't need rotating.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = ${logdir}\/radutmp<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The field in the packet to key on for the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; 'user' name,&nbsp; If you have other fields which you want<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; to use to key on to control Simultaneous-Use,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; then you can use them here.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Note, however, that the size of the field in the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; 'utmp' data structure is small, around 32<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; characters, so that will limit the possible choices<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; of keys.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; You may want instead: %{Stripped-User-Name:-%{User-Name}}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; username = %{User-Name}<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Whether or not we want to treat \"user\" the same<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; as \"USER\", or \"User\".&nbsp; Some systems have problems<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; with case sensitivity, so this should be set to<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; 'no' to enable the comparisons of the key attribute<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; to be case insensitive.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case_sensitive = yes<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Accounting information may be lost, so the user MAY<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; have logged off of the NAS, but we haven't noticed.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If so, we can verify this information with the NAS,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If we want to believe the 'utmp' file, then this<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; configuration entry can be set to 'no'.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check_with_nas = yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Set the file permissions, as the contents of this file<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # are usually private.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; perm = 0600<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callerid = \"yes\"<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # \"Safe\" radutmp - does not contain caller ID, so it can be<br \/>&nbsp;&nbsp;&nbsp; # world-readable, and radwho can work for normal users, without<br \/>&nbsp;&nbsp;&nbsp; # exposing any information that isn't already exposed by who(1).<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # This is another 'instance' of the radutmp module, but it is given<br \/>&nbsp;&nbsp;&nbsp; # then name \"sradutmp\" to identify it later in the \"accounting\"<br \/>&nbsp;&nbsp;&nbsp; # section.<br \/>&nbsp;&nbsp;&nbsp; radutmp sradutmp {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = ${logdir}\/sradutmp<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; perm = 0644<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callerid = \"no\"<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # attr_filter - filters the attributes received in replies from<br \/>&nbsp;&nbsp;&nbsp; # proxied servers, to make sure we send back to our RADIUS client<br \/>&nbsp;&nbsp;&nbsp; # only allowed attributes.<br \/>&nbsp;&nbsp;&nbsp; attr_filter {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attrsfile = ${confdir}\/attrs<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; counter module:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module takes an attribute (count-attribute).<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It also takes a key, and creates a counter for each unique<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; key.&nbsp; The count is incremented when accounting packets are<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; received by the server.&nbsp; The value of the increment depends<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; on the attribute type.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If the attribute is Acct-Session-Time or of an integer type we add the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; value of the attribute. If it is anything else we increase the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; counter by one.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'reset' parameter defines when the counters are all reset to<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; zero.&nbsp; It can be hourly, daily, weekly, monthly or never.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; hourly: Reset on 00:00 of every hour<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; daily: Reset on 00:00:00 every day<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; weekly: Reset on 00:00:00 on sunday<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; monthly: Reset on 00:00:00 of the first day of each month<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It can also be user defined. It should be of the form:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; num[hdwm] where:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; h: hours, d: days, w: weeks, m: months<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If the letter is ommited days will be assumed. In example:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; reset = 10h (reset every 10 hours)<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; reset = 12&nbsp; (reset every 12 days)<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The check-name attribute defines an attribute which will be<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; registered by the counter module and can be used to set the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; maximum allowed value for the counter after which the user<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is rejected.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Something like:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; DEFAULT Max-Daily-Session := 36000<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fall-Through = 1<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You should add the counter module in the instantiate<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; section so that it registers check-name before the files<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module reads the users file.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If check-name is set and the user is to be rejected then we<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; send back a Reply-Message and we log a Failure-Message in<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the radius.log<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If the count attribute is Acct-Session-Time then on each login<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; we send back the remaining online time as a Session-Timeout attribute<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The counter-name can also be used instead of using the check-name<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; like below:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; DEFAULT&nbsp; Daily-Session-Time &gt; 3600, Auth-Type = Reject<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reply-Message = \"You've used up more than one hour today\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The allowed-servicetype attribute can be used to only take<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; into account specific sessions. For example if a user first<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; logs in through a login menu and then selects ppp there will<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; be two sessions. One for Login-User and one for Framed-User<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; service type. We only need to take into account the second one.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The module should be added in the instantiate, authorize and<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; accounting sections.&nbsp; Make sure that in the authorize<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; section it comes after any module which sets the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'check-name' attribute.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; counter daily {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = ${raddbdir}\/db.daily<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key = User-Name<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count-attribute = Acct-Session-Time<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reset = daily<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; counter-name = Daily-Session-Time<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check-name = Max-Daily-Session<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allowed-servicetype = Framed-User<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache-size = 5000<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module is an SQL enabled version of the counter module.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Rather than maintaining seperate (GDBM) databases of<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; accounting info for each counter, this module uses the data<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; stored in the raddacct table by the sql modules. This<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module NEVER does any database INSERTs or UPDATEs.&nbsp; It is<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; totally dependent on the SQL module to process Accounting<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; packets.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'sqlmod_inst' parameter holds the instance of the sql<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module to use when querying the SQL database. Normally it<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is just \"sql\".&nbsp; If you define more and one SQL module<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; instance (usually for failover situations), you can<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; specify which module has access to the Accounting Data<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; (radacct table).<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'reset' parameter defines when the counters are all<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; reset to zero.&nbsp; It can be hourly, daily, weekly, monthly or<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; never.&nbsp; It can also be user defined. It should be of the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; form:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; num[hdwm] where:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h: hours, d: days, w: weeks, m: months<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If the letter is ommited days will be assumed. In example:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reset = 10h (reset every 10 hours)<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reset = 12&nbsp; (reset every 12 days)<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'key' parameter specifies the unique identifier for the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; counter records (usually 'User-Name').<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'query' parameter specifies the SQL query used to get<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the current Counter value from the database. There are 3<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; parameters that can be used in the query:<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %k&nbsp;&nbsp;&nbsp; 'key' parameter<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %b&nbsp;&nbsp;&nbsp; unix time value of beginning of reset period<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %e&nbsp;&nbsp;&nbsp; unix time value of end of reset period<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'check-name' parameter is the name of the 'check'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute to use to access the counter in the 'users' file<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; or SQL radcheck or radcheckgroup tables.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; DEFAULT&nbsp; Max-Daily-Session &gt; 3600, Auth-Type = Reject<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reply-Message = \"You've used up more than one hour today\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; sqlcounter dailycounter {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; counter-name = Daily-Session-Time<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check-name = Max-Daily-Session<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlmod-inst = sql<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key = User-Name<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reset = daily<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This query properly handles calls that span from the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # previous reset period into the current period but<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # involves more work for the SQL server than those<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # below<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # For mysql:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime - \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM radacct WHERE UserName='%{%k}' AND \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime &gt; '%b'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # For postgresql:<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime - \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GREATER((%b - AcctStartTime::ABSTIME::INT4), 0)) \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM radacct WHERE UserName='%{%k}' AND \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctStartTime::ABSTIME::INT4 + AcctSessionTime &gt; '%b'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This query ignores calls that started in a previous<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # reset period and continue into into this one. But it<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # is a little easier on the SQL server<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # For mysql:<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime) FROM radacct WHERE \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserName='%{%k}' AND AcctStartTime &gt; FROM_UNIXTIME('%b')\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # For postgresql:<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime) FROM radacct WHERE \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserName='%{%k}' AND AND AcctStartTime::ABSTIME::INT4 &gt; '%b'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This query is the same as above, but demonstrates an<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # additional counter parameter '%e' which is the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # timestamp for the end of the period<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # For mysql:<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime) FROM radacct \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE UserName='%{%k}' AND AcctStartTime BETWEEN \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # For postgresql:<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime) FROM radacct \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE UserName='%{%k}' AND AcctStartTime::ABSTIME::INT4 \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BETWEEN '%b' AND '%e'\"<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; sqlcounter monthlycounter {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; counter-name = Monthly-Session-Time<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check-name = Max-Monthly-Session<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlmod-inst = sql<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key = User-Name<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reset = monthly<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This query properly handles calls that span from the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # previous reset period into the current period but<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # involves more work for the SQL server than those<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # below<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The same notes above about the differences between mysql<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # versus postgres queries apply here.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime - \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM radacct WHERE UserName='%{%k}' AND \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime &gt; '%b'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This query ignores calls that started in a previous<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # reset period and continue into into this one. But it<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # is a little easier on the SQL server<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime) FROM radacct WHERE \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserName='%{%k}' AND AcctStartTime &gt; FROM_UNIXTIME('%b')\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This query is the same as above, but demonstrates an<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # additional counter parameter '%e' which is the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # timestamp for the end of the period<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query = \"SELECT SUM(AcctSessionTime) FROM radacct \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE UserName='%{%k}' AND AcctStartTime BETWEEN \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')\"<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # The \"always\" module is here for debugging purposes. Each<br \/>&nbsp;&nbsp;&nbsp; # instance simply returns the same result, always, without<br \/>&nbsp;&nbsp;&nbsp; # doing anything.<br \/>&nbsp;&nbsp;&nbsp; always fail {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rcode = fail<br \/>&nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; always reject {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rcode = reject<br \/>&nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; always ok {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rcode = ok<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simulcount = 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mpp = no<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'expression' module currently has no configuration.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module is useful only for 'xlat'.&nbsp; To use it,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; put 'exec' into the 'instantiate' section.&nbsp; You can then<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; do dynamic translation of attributes like:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The value of the attribute will be replaced with the output<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; of the program which is executed.&nbsp; Due to RADIUS protocol<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; limitations, any output over 253 bytes will be ignored.<br \/>&nbsp;&nbsp;&nbsp; expr {<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The 'digest' module currently has no configuration.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; \"Digest\" authentication against a Cisco SIP server.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See 'doc\/rfc\/draft-sterman-aaa-sip-00.txt' for details<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; on performing digest authentication for Cisco SIP servers.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; digest {<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Execute external programs<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module is useful only for 'xlat'.&nbsp; To use it,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; put 'exec' into the 'instantiate' section.&nbsp; You can then<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; do dynamic translation of attributes like:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Attribute-Name = `%{exec:\/path\/to\/program args}`<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The value of the attribute will be replaced with the output<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; of the program which is executed.&nbsp; Due to RADIUS protocol<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; limitations, any output over 253 bytes will be ignored.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The RADIUS attributes from the user request will be placed<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; into environment variables of the executed program, as<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; described in 'doc\/variables.txt'<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; exec {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait = yes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_pairs = request<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This is a more general example of the execute module.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This one is called \"echo\".<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Attribute-Name = `%{echo:\/path\/to\/program args}`<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you wish to execute an external program in more than<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; one section (e.g. 'authorize', 'pre_proxy', etc), then it<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is probably best to define a different instance of the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'exec' module for every section.&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp; exec echo {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Wait for the program to finish.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If we do NOT wait, then the program is \"fire and<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; forget\", and any output attributes from it are ignored.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; If we are looking for the program to output<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; attributes, and want to add those attributes to the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; request, then we MUST wait for the program to<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; finish, and therefore set 'wait=yes'<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # allowed values: {no, yes}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait = yes<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The name of the program to execute, and it's<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; arguments.&nbsp; Dynamic translation is done on this<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; field, so things like the following example will<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; work.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; program = \"\/bin\/echo %{User-Name}\"<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; The attributes which are placed into the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; environment variables for the program.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Allowed values are:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; request&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attributes from the request<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; config&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attributes from the configuration items list<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; reply&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attributes from the reply<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; proxy-request&nbsp;&nbsp;&nbsp; attributes from the proxy request<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; proxy-reply&nbsp;&nbsp;&nbsp; attributes from the proxy reply<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Note that some attributes may not exist at some<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; stages.&nbsp; e.g. There may be no proxy-reply<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; attributes if this module is used in the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; 'authorize' section.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_pairs = request<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Where to place the output attributes (if any) from<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the executed program.&nbsp; The values allowed, and the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; restrictions as to availability, are the same as<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; for the input_pairs.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output_pairs = reply<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; When to execute the program.&nbsp; If the packet<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; type does NOT match what's listed here, then<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the module does NOT execute the program.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; For a list of allowed packet types, see<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; the 'dictionary' file, and look for VALUEs<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; of the Packet-Type attribute.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; By default, the module executes on ANY packet.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; Un-comment out the following line to tell the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; module to execute only if an Access-Accept is<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; being sent to the NAS.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #packet_type = Access-Accept<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Do server side ip pool management. Should be added in post-auth and<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; accounting sections.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The module also requires the existance of the Pool-Name<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute. That way the administrator can add the Pool-Name<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute in the user profiles and use different pools<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; for different users. The Pool-Name attribute is a *check* item not<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; a reply item.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # Example:<br \/>&nbsp;&nbsp;&nbsp; # radiusd.conf: ippool students { [...] }<br \/>&nbsp;&nbsp;&nbsp; # users file&nbsp; : DEFAULT Group == students, Pool-Name := \"students\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********<br \/>&nbsp;&nbsp;&nbsp; # ********* THEN ERASE THE DB FILES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *********<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; ippool main_pool {<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; range-start,range-stop: The start and end ip<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; addresses for the ip pool<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range-start = 192.168.1.1<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range-stop = 192.168.3.254<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; netmask: The network mask used for the ip's<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netmask = 255.255.255.0<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; cache-size: The gdbm cache size for the db<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; files. Should be equal to the number of ip's<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; available in the ip pool<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache-size = 800<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # session-db: The main db file used to allocate ip's to clients<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session-db = ${raddbdir}\/db.ippool<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # ip-index: Helper db index file used in multilink<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ip-index = ${raddbdir}\/db.ipindex<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # override: Will this ippool override a Framed-IP-Address already set<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; override = no<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # maximum-timeout: If not zero specifies the maximum time in seconds an<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # entry may be active. Default: 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maximum-timeout = 0<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; # $INCLUDE&nbsp; ${confdir}\/sqlippool.conf<\/p>\n<p>&nbsp;&nbsp;&nbsp; # OTP token support.&nbsp; Not included by default.<br \/>&nbsp;&nbsp;&nbsp; # $INCLUDE&nbsp; ${confdir}\/otp.conf<\/p>\n<p>}<\/p>\n<p># Instantiation<br \/>#<br \/>#&nbsp; This section orders the loading of the modules.&nbsp; Modules<br \/>#&nbsp; listed here will get loaded BEFORE the later sections like<br \/>#&nbsp; authorize, authenticate, etc. get examined.<br \/>#<br \/>#&nbsp; This section is not strictly needed.&nbsp; When a section like<br \/>#&nbsp; authorize refers to a module, it's automatically loaded and<br \/>#&nbsp; initialized.&nbsp; However, some modules may not be listed in any<br \/>#&nbsp; of the following sections, so they can be listed here.<br \/>#<br \/>#&nbsp; Also, listing modules here ensures that you have control over<br \/>#&nbsp; the order in which they are initalized.&nbsp; If one module needs<br \/>#&nbsp; something defined by another module, you can list them in order<br \/>#&nbsp; here, and ensure that the configuration will be OK.<br \/>#<br \/>instantiate {<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Allows the execution of external scripts.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The entire command line (and output) must fit into 253 bytes.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; e.g. Framed-Pool = `%{exec:\/bin\/echo foo}`<br \/>&nbsp;&nbsp;&nbsp; exec<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The expression module doesn't do authorization,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; authentication, or accounting.&nbsp; It only does dynamic<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; translation, of the form:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; Session-Timeout = `%{expr:2 + 3}`<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; So the module needs to be instantiated, but CANNOT be<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; listed in any other section.&nbsp; See 'doc\/rlm_expr' for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; more information.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; expr<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # We add the counter module here so that it registers<br \/>&nbsp;&nbsp;&nbsp; # the check-name attribute before any module which sets<br \/>&nbsp;&nbsp;&nbsp; # it<br \/>#&nbsp;&nbsp;&nbsp; daily<br \/>}<\/p>\n<p>#&nbsp; Authorization. First preprocess (hints and huntgroups files),<br \/>#&nbsp; then realms, and finally look in the \"users\" file.<br \/>#<br \/>#&nbsp; The order of the realm modules will determine the order that<br \/>#&nbsp; we try to find a matching realm.<br \/>#<br \/>#&nbsp; Make *sure* that 'preprocess' comes before any realm if you <br \/>#&nbsp; need to setup hints for the remote radius server<br \/>authorize {<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The preprocess module takes care of sanitizing some bizarre<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attributes in the request, and turning them into attributes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; which are more standard.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It takes care of processing the 'raddb\/hints' and the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'raddb\/huntgroups' files.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It also adds the %{Client-IP-Address} attribute to the request.<br \/>&nbsp;&nbsp;&nbsp; preprocess<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you want to have a log of authentication requests,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; un-comment the following line, and the 'detail auth_log'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; section, above.<br \/>#&nbsp;&nbsp;&nbsp; auth_log<br \/>#&nbsp;&nbsp;&nbsp; attr_filter<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The chap module will set 'Auth-Type := CHAP' if we are<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; handling a CHAP request and Auth-Type has not already been set<br \/>&nbsp;&nbsp;&nbsp; chap<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If the users are logging in with an MS-CHAP-Challenge<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute for authentication, the mschap module will find<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; to the request, which will cause the server to then use<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the mschap module for authentication.<br \/>&nbsp;&nbsp;&nbsp; mschap<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you have a Cisco SIP server authenticating against<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; FreeRADIUS, uncomment the following line, and the 'digest'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; line in the 'authenticate' section.<br \/>#&nbsp;&nbsp;&nbsp; digest<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Look for IPASS style 'realm\/', and if not found, look for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; '@realm', and decide whether or not to proxy, based on<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; that.<br \/>#&nbsp;&nbsp;&nbsp; IPASS<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you are using multiple kinds of realms, you probably<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; want to set \"ignore_null = yes\" for all of them.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Otherwise, when the first style of realm doesn't match,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the other styles won't be checked.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; suffix<br \/>#&nbsp;&nbsp;&nbsp; ntdomain<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; authentication.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; It also sets the EAP-Type attribute in the request<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; attribute list to the EAP type from the packet.<br \/>&nbsp;&nbsp;&nbsp; eap<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Read the 'users' file<br \/>&nbsp;&nbsp;&nbsp; files<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Look in an SQL database.&nbsp; The schema of the database<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; is meant to mirror the \"users\" file.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See \"Authorization Queries\" in sql.conf<br \/>&nbsp;&nbsp;&nbsp; sql<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you are using \/etc\/smbpasswd, and are also doing<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; mschap authentication, the un-comment this line, and<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; configure the 'etc_smbpasswd' module, above.<br \/>#&nbsp;&nbsp;&nbsp; etc_smbpasswd<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; The ldap module will set Auth-Type to LDAP if it has not<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; already been set<br \/>#&nbsp;&nbsp;&nbsp; ldap<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Enforce daily limits on time spent logged in.<br \/>#&nbsp;&nbsp;&nbsp; daily<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # Use the checkval module<br \/>#&nbsp;&nbsp;&nbsp; checkval<br \/>}<\/p>\n<p>#&nbsp; Authentication.<br \/>#<br \/>#<br \/>#&nbsp; This section lists which modules are available for authentication.<br \/>#&nbsp; Note that it does NOT mean 'try each module in order'.&nbsp; It means<br \/>#&nbsp; that a module from the 'authorize' section adds a configuration<br \/>#&nbsp; attribute 'Auth-Type := FOO'.&nbsp; That authentication type is then<br \/>#&nbsp; used to pick the apropriate module from the list below.<br \/>#<\/p>\n<p>#&nbsp; In general, you SHOULD NOT set the Auth-Type attribute.&nbsp; The server<br \/>#&nbsp; will figure it out on its own, and will do the right thing.&nbsp; The<br \/>#&nbsp; most common side effect of erroneously setting the Auth-Type<br \/>#&nbsp; attribute is that one authentication method will work, but the<br \/>#&nbsp; others will not.<br \/>#<br \/>#&nbsp; The common reasons to set the Auth-Type attribute by hand<br \/>#&nbsp; is to either forcibly reject the user, or forcibly accept him.<br \/>#<br \/>authenticate {<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; PAP authentication, when a back-end database listed<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in the 'authorize' section supplies a password.&nbsp; The<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; password can be clear-text, or encrypted.<br \/>&nbsp;&nbsp;&nbsp; Auth-Type PAP {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pap<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Most people want CHAP authentication<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; A back-end database listed in the 'authorize' section<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; MUST supply a CLEAR TEXT password.&nbsp; Encrypted passwords<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; won't work.<br \/>&nbsp;&nbsp;&nbsp; Auth-Type CHAP {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chap<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; MSCHAP authentication.<br \/>&nbsp;&nbsp;&nbsp; Auth-Type MS-CHAP {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mschap<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you have a Cisco SIP server authenticating against<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; FreeRADIUS, uncomment the following line, and the 'digest'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; line in the 'authorize' section.<br \/>#&nbsp;&nbsp;&nbsp; digest<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Pluggable Authentication Modules.<br \/>#&nbsp;&nbsp;&nbsp; pam<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See 'man getpwent' for information on how the 'unix'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module checks the users password.&nbsp; Note that packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; containing CHAP-Password attributes CANNOT be authenticated<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; against \/etc\/passwd!&nbsp; See the FAQ for details.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; <br \/>&nbsp;&nbsp;&nbsp; unix<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Uncomment it if you want to use ldap for authentication<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # Note that this means \"check plain-text password against<br \/>&nbsp;&nbsp;&nbsp; # the ldap database\", which means that EAP won't work,<br \/>&nbsp;&nbsp;&nbsp; # as it does not supply a plain-text password.<br \/>#&nbsp;&nbsp;&nbsp; Auth-Type LDAP {<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ldap<br \/>#&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Allow EAP authentication.<br \/>&nbsp;&nbsp;&nbsp; eap<br \/>}<\/p>\n<p>#<br \/>#&nbsp; Pre-accounting.&nbsp; Decide which accounting type to use.<br \/>#<br \/>preacct {<br \/>&nbsp;&nbsp;&nbsp; preprocess<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Ensure that we have a semi-unique identifier for every<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; request, and many NAS boxes are broken.<br \/>&nbsp;&nbsp;&nbsp; acct_unique<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Look for IPASS-style 'realm\/', and if not found, look for<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; '@realm', and decide whether or not to proxy, based on<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; that.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Accounting requests are generally proxied to the same<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; home server as authentication requests.<br \/>#&nbsp;&nbsp;&nbsp; IPASS<br \/>&nbsp;&nbsp;&nbsp; suffix<br \/>#&nbsp;&nbsp;&nbsp; ntdomain<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Read the 'acct_users' file<br \/>&nbsp;&nbsp;&nbsp; files<br \/>}<\/p>\n<p>#<br \/>#&nbsp; Accounting.&nbsp; Log the accounting data.<br \/>#<br \/>accounting {<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Create a 'detail'ed log of the packets.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Note that accounting requests which are proxied<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; are also logged in the detail file.<br \/>&nbsp;&nbsp;&nbsp; detail<br \/>#&nbsp;&nbsp;&nbsp; daily<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Update the wtmp file<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you don't use \"radlast\", you can delete this line.<br \/>&nbsp;&nbsp;&nbsp; unix<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; For Simultaneous-Use tracking.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Due to packet losses in the network, the data here<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; may be incorrect.&nbsp; There is little we can do about it.<br \/>&nbsp;&nbsp;&nbsp; radutmp<br \/>#&nbsp;&nbsp;&nbsp; sradutmp<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Return an address to the IP Pool when we see a stop record.<br \/>#&nbsp;&nbsp;&nbsp; main_pool<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Log traffic to an SQL database.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See \"Accounting queries\" in sql.conf<br \/>&nbsp;&nbsp;&nbsp; sql<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Instead of sending the query to the SQL server,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; write it into a log file.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>#&nbsp;&nbsp;&nbsp; sql_log<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Cisco VoIP specific bulk accounting<br \/>#&nbsp;&nbsp;&nbsp; pgsql-voip<\/p>\n<p>}<\/p>\n<p>#&nbsp; Session database, used for checking Simultaneous-Use. Either the radutmp <br \/>#&nbsp; or rlm_sql module can handle this.<br \/>#&nbsp; The rlm_sql module is *much* faster<br \/>session {<br \/>&nbsp;&nbsp;&nbsp; radutmp<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See \"Simultaneous Use Checking Querie\" in sql.conf<br \/>&nbsp;&nbsp;&nbsp; sql<br \/>}<\/p>\n<p>#&nbsp; Post-Authentication<br \/>#&nbsp; Once we KNOW that the user has been authenticated, there are<br \/>#&nbsp; additional steps we can take.<br \/>post-auth {<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Get an address from the IP Pool.<br \/>#&nbsp;&nbsp;&nbsp; main_pool<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you want to have a log of authentication replies,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; un-comment the following line, and the 'detail reply_log'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; section, above.<br \/>#&nbsp;&nbsp;&nbsp; reply_log<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; After authenticating the user, do another SQL query.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; See \"Authentication Logging Queries\" in sql.conf<br \/>&nbsp;&nbsp;&nbsp; sql<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Instead of sending the query to the SQL server,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; write it into a log file.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>#&nbsp;&nbsp;&nbsp; sql_log<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Un-comment the following if you have set<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'edir_account_policy_check = yes' in the ldap module sub-section of<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; the 'modules' section.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>#&nbsp;&nbsp;&nbsp; ldap<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Access-Reject packets are sent through the REJECT sub-section of the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; post-auth section.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Uncomment the following and set the module name to the ldap instance<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; name if you have set 'edir_account_policy_check = yes' in the ldap<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module sub-section of the 'modules' section.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>#&nbsp;&nbsp;&nbsp; Post-Auth-Type REJECT {<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert-module-name-here<br \/>#&nbsp;&nbsp;&nbsp; }<\/p>\n<p>}<\/p>\n<p>#<br \/>#&nbsp; When the server decides to proxy a request to a home server,<br \/>#&nbsp; the proxied request is first passed through the pre-proxy<br \/>#&nbsp; stage.&nbsp; This stage can re-write the request, or decide to<br \/>#&nbsp; cancel the proxy.<br \/>#<br \/>#&nbsp; Only a few modules currently have this method.<br \/>#<br \/>pre-proxy {<br \/>#&nbsp;&nbsp;&nbsp; attr_rewrite<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Uncomment the following line if you want to change attributes<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; as defined in the preproxy_users file.<br \/>#&nbsp;&nbsp;&nbsp; files<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; If you want to have a log of packets proxied to a home<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; server, un-comment the following line, and the<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 'detail pre_proxy_log' section, above.<br \/>#&nbsp;&nbsp;&nbsp; pre_proxy_log<br \/>}<\/p>\n<p>#<br \/>#&nbsp; When the server receives a reply to a request it proxied<br \/>#&nbsp; to a home server, the request may be massaged here, in the<br \/>#&nbsp; post-proxy stage.<br \/>#<br \/>post-proxy {<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; If you want to have a log of replies from a home server,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; un-comment the following line, and the 'detail post_proxy_log'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; section, above.<br \/>#&nbsp;&nbsp;&nbsp; post_proxy_log<\/p>\n<p>#&nbsp;&nbsp;&nbsp; attr_rewrite<\/p>\n<p>&nbsp;&nbsp;&nbsp; #&nbsp; Uncomment the following line if you want to filter replies from<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; remote proxies based on the rules defined in the 'attrs' file.<\/p>\n<p>#&nbsp;&nbsp;&nbsp; attr_filter<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; If you are proxying LEAP, you MUST configure the EAP<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; module, and you MUST list it here, in the post-proxy<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; stage.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; You MUST also use the 'nostrip' option in the 'realm'<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; configuration.&nbsp; Otherwise, the User-Name attribute<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in the proxied request will not match the user name<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; hidden inside of the EAP packet, and the end server will<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; reject the EAP request.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; eap<br \/>}<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fee\u6539\/etc\/freeradius\/sql.conf<\/p>\n<p>\u5c06\u5982\u4e0b\u90e8\u5206\u5bf9\u5e94Mysql\u4e2d\u8bbe\u7f6e\u8fdb\u884c\u4fee\u6539.<\/p>\n<p># Connect info<br \/>&nbsp;&nbsp;&nbsp; server = \"localhost\"<br \/>&nbsp;&nbsp;&nbsp; login = \"root\"<br \/>&nbsp;&nbsp;&nbsp; password = \"u password \"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Database table configuration<br \/>&nbsp;&nbsp;&nbsp; radius_db = \"radius\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; <\/p>\n<p>vim \/etc\/freeradius\/sql.conf<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"599\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"597\">\n<p>#<br \/>#&nbsp; Configuration for the SQL module, when using MySQL.<br \/>#<br \/>#&nbsp; The database schema is available at:<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; doc\/examples\/mysql.sql<br \/>#<br \/>#&nbsp; If you are using PostgreSQL, please use 'postgresql.conf', instead.<br \/>#&nbsp; If you are using Oracle, please use 'oracle.conf', instead.<br \/>#&nbsp; If you are using MS-SQL, please use 'mssql.conf', instead.<br \/>#<br \/>#&nbsp; $Id: sql.conf,v 1.41.2.2.2.2 2006\/02\/04 14:13:03 nbk Exp $<br \/>#<br \/>sql {<br \/>&nbsp;&nbsp;&nbsp; # Database type<br \/>&nbsp;&nbsp;&nbsp; # Current supported are: rlm_sql_mysql, rlm_sql_postgresql,<br \/>&nbsp;&nbsp;&nbsp; # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds<br \/>&nbsp;&nbsp;&nbsp; driver = \"rlm_sql_mysql\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Connect info<br \/>&nbsp;&nbsp;&nbsp; server = \"localhost\"<br \/>&nbsp;&nbsp;&nbsp; login = \"root\"<br \/>&nbsp;&nbsp;&nbsp; password = \"u password \"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Database table configuration<br \/>&nbsp;&nbsp;&nbsp; radius_db = \"radius\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # If you want both stop and start records logged to the<br \/>&nbsp;&nbsp;&nbsp; # same SQL table, leave this as is.&nbsp; If you want them in<br \/>&nbsp;&nbsp;&nbsp; # different tables, put the start table in acct_table1<br \/>&nbsp;&nbsp;&nbsp; # and stop table in acct_table2<br \/>&nbsp;&nbsp;&nbsp; acct_table1 = \"radacct\"<br \/>&nbsp;&nbsp;&nbsp; acct_table2 = \"radacct\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Allow for storing data after authentication<br \/>&nbsp;&nbsp;&nbsp; postauth_table = \"radpostauth\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; authcheck_table = \"radcheck\"<br \/>&nbsp;&nbsp;&nbsp; authreply_table = \"radreply\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; groupcheck_table = \"radgroupcheck\"<br \/>&nbsp;&nbsp;&nbsp; groupreply_table = \"radgroupreply\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; usergroup_table = \"usergroup\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Table to keep radius client info<br \/>&nbsp;&nbsp;&nbsp; nas_table = \"nas\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Remove stale session if checkrad does not see a double login<br \/>&nbsp;&nbsp;&nbsp; deletestalesessions = yes<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Print all SQL statements when in debug mode (-x)<br \/>&nbsp;&nbsp;&nbsp; sqltrace = no<br \/>&nbsp;&nbsp;&nbsp; sqltracefile = ${logdir}\/sqltrace.sql<\/p>\n<p>&nbsp;&nbsp;&nbsp; # number of sql connections to make to server<br \/>&nbsp;&nbsp;&nbsp; num_sql_socks = 5<\/p>\n<p>&nbsp;&nbsp;&nbsp; # number of seconds to dely retrying on a failed database<br \/>&nbsp;&nbsp;&nbsp; # connection (per_socket)<br \/>&nbsp;&nbsp;&nbsp; connect_failure_retry_delay = 60<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Safe characters list for sql queries. Everything else is replaced<br \/>&nbsp;&nbsp;&nbsp; # with their mime-encoded equivalents.<br \/>&nbsp;&nbsp;&nbsp; # The default list should be ok<br \/>&nbsp;&nbsp;&nbsp; #safe-characters = \"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: \/\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Query config:&nbsp; Username<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # This is the username that will get substituted, escaped, and added<br \/>&nbsp;&nbsp;&nbsp; # as attribute 'SQL-User-Name'.&nbsp; '%{SQL-User-Name}' should be used below<br \/>&nbsp;&nbsp;&nbsp; # everywhere a username substitution is needed so you you can be sure<br \/>&nbsp;&nbsp;&nbsp; # the username passed from the client is escaped properly.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Uncomment the next line, if you want the sql_user_name to mean:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; Use Stripped-User-Name, if it's there.<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; Else use User-Name, if it's there,<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; Else use hard-coded string \"DEFAULT\" as the user name.<br \/>&nbsp;&nbsp;&nbsp; #sql_user_name = \"%{Stripped-User-Name:-%{User-Name:-DEFAULT}}\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; sql_user_name = \"%{User-Name}\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Default profile<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # This is the default profile. It is found in SQL by group membership.<br \/>&nbsp;&nbsp;&nbsp; # That means that this profile must be a member of at least one group<br \/>&nbsp;&nbsp;&nbsp; # which will contain the corresponding check and reply items.<br \/>&nbsp;&nbsp;&nbsp; # This profile will be queried in the authorize section for every user.<br \/>&nbsp;&nbsp;&nbsp; # The point is to assign all users a default profile without having to<br \/>&nbsp;&nbsp;&nbsp; # manually add each one to a group that will contain the profile.<br \/>&nbsp;&nbsp;&nbsp; # The SQL module will also honor the User-Profile attribute. This<br \/>&nbsp;&nbsp;&nbsp; # attribute can be set anywhere in the authorize section (ie the users<br \/>&nbsp;&nbsp;&nbsp; # file). It is found exactly as the default profile is found.<br \/>&nbsp;&nbsp;&nbsp; # If it is set then it will *overwrite* the default profile setting.<br \/>&nbsp;&nbsp;&nbsp; # The idea is to select profiles based on checks on the incoming packets,<br \/>&nbsp;&nbsp;&nbsp; # not on user group membership. For example:<br \/>&nbsp;&nbsp;&nbsp; # -- users file --<br \/>&nbsp;&nbsp;&nbsp; # DEFAULT&nbsp;&nbsp;&nbsp; Service-Type == Outbound-User, User-Profile := \"outbound\"<br \/>&nbsp;&nbsp;&nbsp; # DEFAULT&nbsp;&nbsp;&nbsp; Service-Type == Framed-User, User-Profile := \"framed\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # By default the default_user_profile is not set<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #default_user_profile = \"DEFAULT\"<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # Determines if we will query the default_user_profile or the User-Profile<br \/>&nbsp;&nbsp;&nbsp; # if the user is not found. If the profile is found then we consider the user<br \/>&nbsp;&nbsp;&nbsp; # found. By default this is set to 'no'.<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #query_on_not_found = no<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Authorization Queries<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; These queries compare the check items for the user<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; in ${authcheck_table} and setup the reply items in<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; ${authreply_table}.&nbsp; You can use any query\/tables<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; you want, but the return data for each row MUST<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; be in the&nbsp; following order:<br \/>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 0. Row ID (currently unused)<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 1. UserName\/GroupName<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 2. Item Attr Name<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 3. Item Attr Value<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; 4. Item Attr Operation<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # Use these for case sensitive usernames.<br \/>#&nbsp;&nbsp;&nbsp; authorize_check_query = \"SELECT id, UserName, Attribute, Value, op \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM ${authcheck_table} \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = BINARY '%{SQL-User-Name}' \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id\"<br \/>#&nbsp;&nbsp;&nbsp; authorize_reply_query = \"SELECT id, UserName, Attribute, Value, op \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM ${authreply_table} \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = BINARY '%{SQL-User-Name}' \\<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # The default queries are case insensitive. (for compatibility with<br \/>&nbsp;&nbsp;&nbsp; # older versions of FreeRADIUS)<br \/>&nbsp;&nbsp;&nbsp; authorize_check_query = \"SELECT id, UserName, Attribute, Value, op \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM ${authcheck_table} \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = '%{SQL-User-Name}' \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id\"<br \/>&nbsp;&nbsp;&nbsp; authorize_reply_query = \"SELECT id, UserName, Attribute, Value, op \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM ${authreply_table} \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = '%{SQL-User-Name}' \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Use these for case sensitive usernames.<br \/>#&nbsp;&nbsp;&nbsp; authorize_group_check_query = \"SELECT ${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Attribute,${groupcheck_table}.Value,${groupcheck_table}.op FROM ${groupcheck_table},${usergroup_table} WHERE ${usergroup_table}.Username = BINARY '%{SQL-User-Name}' AND ${usergroup_table}.GroupName = ${groupcheck_table}.GroupName ORDER BY ${groupcheck_table}.id\"<br \/>#&nbsp;&nbsp;&nbsp; authorize_group_reply_query = \"SELECT ${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Attribute,${groupreply_table}.Value,${groupreply_table}.op&nbsp; FROM ${groupreply_table},${usergroup_table} WHERE ${usergroup_table}.Username = BINARY '%{SQL-User-Name}' AND ${usergroup_table}.GroupName = ${groupreply_table}.GroupName ORDER BY ${groupreply_table}.id\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; authorize_group_check_query = \"SELECT ${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Attribute,${groupcheck_table}.Value,${groupcheck_table}.op&nbsp; FROM ${groupcheck_table},${usergroup_table} WHERE ${usergroup_table}.Username = '%{SQL-User-Name}' AND ${usergroup_table}.GroupName = ${groupcheck_table}.GroupName ORDER BY ${groupcheck_table}.id\"<br \/>&nbsp;&nbsp;&nbsp; authorize_group_reply_query = \"SELECT ${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Attribute,${groupreply_table}.Value,${groupreply_table}.op&nbsp; FROM ${groupreply_table},${usergroup_table} WHERE ${usergroup_table}.Username = '%{SQL-User-Name}' AND ${usergroup_table}.GroupName = ${groupreply_table}.GroupName ORDER BY ${groupreply_table}.id\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; #&nbsp; Accounting Queries<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # accounting_onoff_query&nbsp;&nbsp;&nbsp; - query for Accounting On\/Off packets<br \/>&nbsp;&nbsp;&nbsp; # accounting_update_query&nbsp;&nbsp;&nbsp; - query for Accounting update packets<br \/>&nbsp;&nbsp;&nbsp; # accounting_update_query_alt&nbsp;&nbsp;&nbsp; - query for Accounting update packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (alternate in case first query fails)<br \/>&nbsp;&nbsp;&nbsp; # accounting_start_query&nbsp;&nbsp;&nbsp; - query for Accounting start packets<br \/>&nbsp;&nbsp;&nbsp; # accounting_start_query_alt&nbsp;&nbsp;&nbsp; - query for Accounting start packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (alternate in case first query fails)<br \/>&nbsp;&nbsp;&nbsp; # accounting_stop_query&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - query for Accounting stop packets<br \/>&nbsp;&nbsp;&nbsp; # accounting_stop_query_alt&nbsp;&nbsp;&nbsp; - query for Accounting start packets<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (alternate in case first query doesn't<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; affect any existing rows in the table)<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; accounting_onoff_query = \"UPDATE ${acct_table1} SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime &lt;= '%S'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; accounting_update_query = \"UPDATE ${acct_table1} \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET FramedIPAddress = '%{Framed-IP-Address}', \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctSessionTime = '%{Acct-Session-Time}', \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctInputOctets = '%{Acct-Input-Octets}', \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctOutputOctets = '%{Acct-Output-Octets}' \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE AcctSessionId = '%{Acct-Session-Id}' \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND UserName = '%{SQL-User-Name}' \\<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND NASIPAddress= '%{NAS-IP-Address}'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; accounting_update_query_alt = \"INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; accounting_start_query = \"INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; accounting_start_query_alt&nbsp; = \"UPDATE ${acct_table1} SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; accounting_stop_query = \"UPDATE ${acct_table2} SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; accounting_stop_query_alt = \"INSERT into ${acct_table2} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # Simultaneous Use Checking Queries<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # simul_count_query&nbsp;&nbsp;&nbsp; - query for the number of current connections<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - If this is not defined, no simultaneouls use checking<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - will be performed by this module instance<br \/>&nbsp;&nbsp;&nbsp; # simul_verify_query&nbsp;&nbsp;&nbsp; - query to return details of current connections for verification<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Leave blank or commented out to disable verification step<br \/>&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Note that the returned field order should not be changed.<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<\/p>\n<p>&nbsp;&nbsp;&nbsp; # Uncomment simul_count_query to enable simultaneous use checking<br \/>&nbsp;&nbsp;&nbsp; # simul_count_query = \"SELECT COUNT(*) FROM ${acct_table1} WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0\"<br \/>&nbsp;&nbsp;&nbsp; simul_verify_query = \"SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM ${acct_table1} WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # Group Membership Queries<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # group_membership_query&nbsp;&nbsp;&nbsp; - Check user group membership<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<\/p>\n<p>&nbsp;&nbsp;&nbsp; group_membership_query = \"SELECT GroupName FROM ${usergroup_table} WHERE UserName='%{SQL-User-Name}'\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # Authentication Logging Queries<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<br \/>&nbsp;&nbsp;&nbsp; # postauth_query&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Insert some info after authentication<br \/>&nbsp;&nbsp;&nbsp; #######################################################################<\/p>\n<p>&nbsp;&nbsp;&nbsp; postauth_query = \"INSERT into ${postauth_table} (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())\"<\/p>\n<p>&nbsp;&nbsp;&nbsp; #<br \/>&nbsp;&nbsp;&nbsp; # Set to 'yes' to read radius clients from the database ('nas' table)&nbsp;&nbsp;&nbsp; readclients = yes<br \/>}<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fee\u6539\/etc\/freeradius\/users,<\/p>\n<p>\u5c06<br \/>DEFAULT Auth-Type = System<br \/>Fall-Through = 1<\/p>\n<p>\u7528#\u6ce8\u91ca\u4fdd\u5b58\u9000\u51fa.<\/p>\n<p>vim \/etc\/freeradius\/users<\/p>\n<p>&nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"400\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"398\">\n<p>#<br \/>#&nbsp;&nbsp;&nbsp; Please read the documentation file ..\/doc\/processing_users_file,<br \/>#&nbsp;&nbsp;&nbsp; or 'man 5 users' (after installing the server) for more information.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; This file contains authentication security and configuration<br \/>#&nbsp;&nbsp;&nbsp; information for each user.&nbsp; Accounting requests are NOT processed<br \/>#&nbsp;&nbsp;&nbsp; through this file.&nbsp; Instead, see 'acct_users', in this directory.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; The first field is the user's name and can be up to<br \/>#&nbsp;&nbsp;&nbsp; 253 characters in length.&nbsp; This is followed (on the same line) with<br \/>#&nbsp;&nbsp;&nbsp; the list of authentication requirements for that user.&nbsp; This can<br \/>#&nbsp;&nbsp;&nbsp; include password, comm server name, comm server port number, protocol<br \/>#&nbsp;&nbsp;&nbsp; type (perhaps set by the \"hints\" file), and huntgroup name (set by<br \/>#&nbsp;&nbsp;&nbsp; the \"huntgroups\" file).<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; If you are not sure why a particular reply is being sent by the<br \/>#&nbsp;&nbsp;&nbsp; server, then run the server in debugging mode (radiusd -X), and<br \/>#&nbsp;&nbsp;&nbsp; you will see which entries in this file are matched.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; When an authentication request is received from the comm server,<br \/>#&nbsp;&nbsp;&nbsp; these values are tested. Only the first match is used unless the<br \/>#&nbsp;&nbsp;&nbsp; \"Fall-Through\" variable is set to \"Yes\".<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; A special user named \"DEFAULT\" matches on all usernames.<br \/>#&nbsp;&nbsp;&nbsp; You can have several DEFAULT entries. All entries are processed<br \/>#&nbsp;&nbsp;&nbsp; in the order they appear in this file. The first entry that<br \/>#&nbsp;&nbsp;&nbsp; matches the login-request will stop processing unless you use<br \/>#&nbsp;&nbsp;&nbsp; the Fall-Through variable.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; If you use the database support to turn this file into a .db or .dbm<br \/>#&nbsp;&nbsp;&nbsp; file, the DEFAULT entries _have_ to be at the end of this file and<br \/>#&nbsp;&nbsp;&nbsp; you can't have multiple entries for one username.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; You don't need to specify a password if you set Auth-Type += System<br \/>#&nbsp;&nbsp;&nbsp; on the list of authentication requirements. The RADIUS server<br \/>#&nbsp;&nbsp;&nbsp; will then check the system password file.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; Indented (with the tab character) lines following the first<br \/>#&nbsp;&nbsp;&nbsp; line indicate the configuration values to be passed back to<br \/>#&nbsp;&nbsp;&nbsp; the comm server to allow the initiation of a user session.<br \/>#&nbsp;&nbsp;&nbsp; This can include things like the PPP configuration values<br \/>#&nbsp;&nbsp;&nbsp; or the host to log the user onto.<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; You can include another `users' file with `$INCLUDE users.other'<br \/>#<\/p>\n<p>#<br \/>#&nbsp;&nbsp;&nbsp; For a list of RADIUS attributes, and links to their definitions,<br \/>#&nbsp;&nbsp;&nbsp; see:<br \/>#<br \/>#&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/www.freeradius.org\/rfc\/attributes.html\">http:\/\/www.freeradius.org\/rfc\/attributes.html<\/a><br \/>#<\/p>\n<p>#<br \/># Deny access for a specific user.&nbsp; Note that this entry MUST<br \/># be before any other 'Auth-Type' attribute which results in the user<br \/># being authenticated.<br \/>#<br \/># Note that there is NO 'Fall-Through' attribute, so the user will not<br \/># be given any additional resources.<br \/>#<br \/>#lameuser&nbsp;&nbsp;&nbsp; Auth-Type := Reject<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reply-Message = \"Your account has been disabled.\"<\/p>\n<p>#<br \/># Deny access for a group of users.<br \/>#<br \/># Note that there is NO 'Fall-Through' attribute, so the user will not<br \/># be given any additional resources.<br \/>#<br \/>#DEFAULT&nbsp;&nbsp;&nbsp; Group == \"disabled\", Auth-Type := Reject<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reply-Message = \"Your account has been disabled.\"<br \/>#<\/p>\n<p>#<br \/># This is a complete entry for \"steve\". Note that there is no Fall-Through<br \/># entry so that no DEFAULT entry will be used, and the user will NOT<br \/># get any attributes in addition to the ones listed here.<br \/>#<br \/>#steve&nbsp;&nbsp;&nbsp; Auth-Type := Local, User-Password == \"testing\"<br \/>#&nbsp;&nbsp;&nbsp; Service-Type = Framed-User,<br \/>#&nbsp;&nbsp;&nbsp; Framed-Protocol = PPP,<br \/>#&nbsp;&nbsp;&nbsp; Framed-IP-Address = 172.16.3.33,<br \/>#&nbsp;&nbsp;&nbsp; Framed-IP-Netmask = 255.255.255.0,<br \/>#&nbsp;&nbsp;&nbsp; Framed-Routing = Broadcast-Listen,<br \/>#&nbsp;&nbsp;&nbsp; Framed-Filter-Id = \"std.ppp\",<br \/>#&nbsp;&nbsp;&nbsp; Framed-MTU = 1500,<br \/>#&nbsp;&nbsp;&nbsp; Framed-Compression = Van-Jacobsen-TCP-IP<\/p>\n<p>#<br \/># This is an entry for a user with a space in their name.<br \/># Note the double quotes surrounding the name.<br \/>#<br \/>#\"John Doe\"&nbsp;&nbsp;&nbsp; Auth-Type := Local, User-Password == \"hello\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reply-Message = \"Hello, %u\"<\/p>\n<p>#<br \/># Dial user back and telnet to the default host for that port<br \/>#<br \/>#Deg&nbsp;&nbsp;&nbsp; Auth-Type := Local, User-Password == \"ge55ged\"<br \/>#&nbsp;&nbsp;&nbsp; Service-Type = Callback-Login-User,<br \/>#&nbsp;&nbsp;&nbsp; Login-IP-Host = 0.0.0.0,<br \/>#&nbsp;&nbsp;&nbsp; Callback-Number = \"9,5551212\",<br \/>#&nbsp;&nbsp;&nbsp; Login-Service = Telnet,<br \/>#&nbsp;&nbsp;&nbsp; Login-TCP-Port = Telnet<\/p>\n<p>#<br \/># Another complete entry. After the user \"dialbk\" has logged in, the<br \/># connection will be broken and the user will be dialed back after which<br \/># he will get a connection to the host \"timeshare1\".<br \/>#<br \/>#dialbk&nbsp;&nbsp;&nbsp; Auth-Type := Local, User-Password == \"callme\"<br \/>#&nbsp;&nbsp;&nbsp; Service-Type = Callback-Login-User,<br \/>#&nbsp;&nbsp;&nbsp; Login-IP-Host = timeshare1,<br \/>#&nbsp;&nbsp;&nbsp; Login-Service = PortMaster,<br \/>#&nbsp;&nbsp;&nbsp; Callback-Number = \"9,1-800-555-1212\"<\/p>\n<p>#<br \/># user \"swilson\" will only get a static IP number if he logs in with<br \/># a framed protocol on a terminal server in Alphen (see the huntgroups file).<br \/>#<br \/># Note that by setting \"Fall-Through\", other attributes will be added from<br \/># the following DEFAULT entries<br \/>#<br \/>#swilson&nbsp;&nbsp;&nbsp; Service-Type == Framed-User, Huntgroup-Name == \"alphen\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Framed-IP-Address = 192.168.1.65,<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fall-Through = Yes<\/p>\n<p>#<br \/># If the user logs in as 'username.shell', then authenticate them<br \/># against the system database, give them shell access, and stop processing<br \/># the rest of the file.<br \/>#<br \/>#DEFAULT&nbsp;&nbsp;&nbsp; Suffix == \".shell\", Auth-Type := System<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Service-Type = Login-User,<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Login-Service = Telnet,<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Login-IP-Host = your.shell.machine<\/p>\n<p>#<br \/># The rest of this file contains the several DEFAULT entries.<br \/># DEFAULT entries match with all login names.<br \/># Note that DEFAULT entries can also Fall-Through (see first entry).<br \/># A name-value pair from a DEFAULT entry will _NEVER_ override<br \/># an already existing name-value pair.<br \/>#<\/p>\n<p>#<br \/># First setup all accounts to be checked against the UNIX \/etc\/passwd.<br \/># (Unless a password was already given earlier in this file).<br \/>#<br \/>#DEFAULT&nbsp;&nbsp;&nbsp; Auth-Type = System<br \/>#&nbsp;&nbsp;&nbsp; Fall-Through = 1<\/p>\n<p>#<br \/># Set up different IP address pools for the terminal servers.<br \/># Note that the \"+\" behind the IP address means that this is the \"base\"<br \/># IP address. The Port-Id (S0, S1 etc) will be added to it.<br \/>#<br \/>#DEFAULT&nbsp;&nbsp;&nbsp; Service-Type == Framed-User, Huntgroup-Name == \"alphen\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Framed-IP-Address = 192.168.1.32+,<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fall-Through = Yes<\/p>\n<p>#DEFAULT&nbsp;&nbsp;&nbsp; Service-Type == Framed-User, Huntgroup-Name == \"delft\"<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Framed-IP-Address = 192.168.2.32+,<br \/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fall-Through = Yes<\/p>\n<p>#<br \/># Defaults for all framed connections.<br \/>#<br \/>DEFAULT&nbsp;&nbsp;&nbsp; Service-Type == Framed-User<br \/>&nbsp;&nbsp;&nbsp; Framed-IP-Address = 255.255.255.254,<br \/>&nbsp;&nbsp;&nbsp; Framed-MTU = 576,<br \/>&nbsp;&nbsp;&nbsp; Service-Type = Framed-User,<br \/>&nbsp;&nbsp;&nbsp; Fall-Through = Yes<\/p>\n<p>#<br \/># Default for PPP: dynamic IP address, PPP mode, VJ-compression.<br \/># NOTE: we do not use Hint = \"PPP\", since PPP might also be auto-detected<br \/>#&nbsp;&nbsp;&nbsp; by the terminal server in which case there may not be a \"P\" suffix.<br \/>#&nbsp;&nbsp;&nbsp; The terminal server sends \"Framed-Protocol = PPP\" for auto PPP.<br \/>#<br \/>DEFAULT&nbsp;&nbsp;&nbsp; Framed-Protocol == PPP<br \/>&nbsp;&nbsp;&nbsp; Framed-Protocol = PPP,<br \/>&nbsp;&nbsp;&nbsp; Framed-Compression = Van-Jacobson-TCP-IP<\/p>\n<p>#<br \/># Default for CSLIP: dynamic IP address, SLIP mode, VJ-compression.<br \/>#<br \/>DEFAULT&nbsp;&nbsp;&nbsp; Hint == \"CSLIP\"<br \/>&nbsp;&nbsp;&nbsp; Framed-Protocol = SLIP,<br \/>&nbsp;&nbsp;&nbsp; Framed-Compression = Van-Jacobson-TCP-IP<\/p>\n<p>#<br \/># Default for SLIP: dynamic IP address, SLIP mode.<br \/>#<br \/>DEFAULT&nbsp;&nbsp;&nbsp; Hint == \"SLIP\"<br \/>&nbsp;&nbsp;&nbsp; Framed-Protocol = SLIP<\/p>\n<p>#<br \/># Last default: rlogin to our main server.<br \/>#<br \/>#DEFAULT<br \/>#&nbsp;&nbsp;&nbsp; Service-Type = Login-User,<br \/>#&nbsp;&nbsp;&nbsp; Login-Service = Rlogin,<br \/>#&nbsp;&nbsp;&nbsp; Login-IP-Host = shellbox.ispdomain.com<\/p>\n<p># #<br \/># # Last default: shell on the local terminal server.<br \/># #<br \/># DEFAULT<br \/>#&nbsp;&nbsp;&nbsp;&nbsp; Service-Type = Shell-User<\/p>\n<p># On no match, the user is denied access.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u542f\u52a8freeradius\u8c03\u8bd5\u6a21\u5f0f.<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"400\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"400\">freeradius -X<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"719\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"717\">\n<p>ThinkPad:\/etc\/freeradius# freeradius -X<br \/>Starting - reading configuration files ...<br \/>reread_config:&nbsp; reading radiusd.conf<br \/>Config:&nbsp;&nbsp; including file: \/etc\/freeradius\/proxy.conf<br \/>Config:&nbsp;&nbsp; including file: \/etc\/freeradius\/clients.conf<br \/>Config:&nbsp;&nbsp; including file: \/etc\/freeradius\/snmp.conf<br \/>Config:&nbsp;&nbsp; including file: \/etc\/freeradius\/eap.conf<br \/>Config:&nbsp;&nbsp; including file: \/etc\/freeradius\/sql.conf<br \/>main: prefix = \"\/usr\"<br \/>main: localstatedir = \"\/var\"<br \/>main: logdir = \"\/var\/log\/freeradius\"<br \/>main: libdir = \"\/usr\/lib\/freeradius\"<br \/>main: radacctdir = \"\/var\/log\/freeradius\/radacct\"<br \/>main: hostname_lookups = no<br \/>main: max_request_time = 30<br \/>main: cleanup_delay = 5<br \/>main: max_requests = 1024<br \/>main: delete_blocked_requests = 0<br \/>main: port = 0<br \/>main: allow_core_dumps = no<br \/>main: log_stripped_names = no<br \/>main: log_file = \"\/var\/log\/freeradius\/radius.log\"<br \/>main: log_auth = no<br \/>main: log_auth_badpass = no<br \/>main: log_auth_goodpass = no<br \/>main: pidfile = \"\/var\/run\/freeradius\/freeradius.pid\"<br \/>main: user = \"freerad\"<br \/>main: group = \"freerad\"<br \/>main: usercollide = no<br \/>main: lower_user = \"no\"<br \/>main: lower_pass = \"no\"<br \/>main: nospace_user = \"no\"<br \/>main: nospace_pass = \"no\"<br \/>main: checkrad = \"\/usr\/sbin\/checkrad\"<br \/>main: proxy_requests = yes<br \/>proxy: retry_delay = 5<br \/>proxy: retry_count = 3<br \/>proxy: synchronous = no<br \/>proxy: default_fallback = yes<br \/>proxy: dead_time = 120<br \/>proxy: post_proxy_authorize = no<br \/>proxy: wake_all_if_all_dead = no<br \/>security: max_attributes = 200<br \/>security: reject_delay = 1<br \/>security: status_server = no<br \/>main: debug_level = 0<br \/>read_config_files:&nbsp; reading dictionary<br \/>read_config_files:&nbsp; reading naslist<br \/>Using deprecated naslist file.&nbsp; Support for this will go away soon.<br \/>read_config_files:&nbsp; reading clients<br \/>read_config_files:&nbsp; reading realms<br \/>radiusd:&nbsp; entering modules setup<br \/>Module: Library search path is \/usr\/lib\/freeradius<br \/>Module: Loaded exec <br \/>exec: wait = yes<br \/>exec: program = \"(null)\"<br \/>exec: input_pairs = \"request\"<br \/>exec: output_pairs = \"(null)\"<br \/>exec: packet_type = \"(null)\"<br \/>rlm_exec: Wait=yes but no output defined. Did you mean output=none?<br \/>Module: Instantiated exec (exec) <br \/>Module: Loaded expr <br \/>Module: Instantiated expr (expr) <br \/>Module: Loaded PAP <br \/>pap: encryption_scheme = \"crypt\"<br \/>Module: Instantiated pap (pap) <br \/>Module: Loaded CHAP <br \/>Module: Instantiated chap (chap) <br \/>Module: Loaded MS-CHAP <br \/>mschap: use_mppe = yes<br \/>mschap: require_encryption = no<br \/>mschap: require_strong = no<br \/>mschap: with_ntdomain_hack = no<br \/>mschap: passwd = \"(null)\"<br \/>mschap: ntlm_auth = \"(null)\"<br \/>Module: Instantiated mschap (mschap) <br \/>Module: Loaded System <br \/>unix: cache = no<br \/>unix: passwd = \"(null)\"<br \/>unix: shadow = \"\/etc\/shadow\"<br \/>unix: group = \"(null)\"<br \/>unix: radwtmp = \"\/var\/log\/freeradius\/radwtmp\"<br \/>unix: usegroup = no<br \/>unix: cache_reload = 600<br \/>Module: Instantiated unix (unix) <br \/>Module: Loaded eap <br \/>eap: default_eap_type = \"md5\"<br \/>eap: timer_expire = 60<br \/>eap: ignore_unknown_eap_types = no<br \/>eap: cisco_accounting_username_bug = no<br \/>rlm_eap: Loaded and initialized type md5<br \/>rlm_eap: Loaded and initialized type leap<br \/>gtc: challenge = \"Password: \"<br \/>gtc: auth_type = \"PAP\"<br \/>rlm_eap: Loaded and initialized type gtc<br \/>mschapv2: with_ntdomain_hack = no<br \/>rlm_eap: Loaded and initialized type mschapv2<br \/>Module: Instantiated eap (eap) <br \/>Module: Loaded preprocess <br \/>preprocess: huntgroups = \"\/etc\/freeradius\/huntgroups\"<br \/>preprocess: hints = \"\/etc\/freeradius\/hints\"<br \/>preprocess: with_ascend_hack = no<br \/>preprocess: ascend_channels_per_line = 23<br \/>preprocess: with_ntdomain_hack = no<br \/>preprocess: with_specialix_jetstream_hack = no<br \/>preprocess: with_cisco_vsa_hack = no<br \/>preprocess: with_alvarion_vsa_hack = no<br \/>Module: Instantiated preprocess (preprocess) <br \/>Module: Loaded realm <br \/>realm: format = \"suffix\"<br \/>realm: delimiter = \"@\"<br \/>realm: ignore_default = no<br \/>realm: ignore_null = no<br \/>Module: Instantiated realm (suffix) <br \/>Module: Loaded files <br \/>files: usersfile = \"\/etc\/freeradius\/users\"<br \/>files: acctusersfile = \"\/etc\/freeradius\/acct_users\"<br \/>files: preproxy_usersfile = \"\/etc\/freeradius\/preproxy_users\"<br \/>files: compat = \"no\"<br \/>Module: Instantiated files (files) <br \/>Module: Loaded SQL <br \/>sql: driver = \"rlm_sql_mysql\"<br \/>sql: server = \"localhost\"<br \/>sql: port = \"\"<br \/>sql: login = \"root\"<br \/>sql: password = \"nishiwode\"<br \/>sql: radius_db = \"radius\"<br \/>sql: nas_table = \"nas\"<br \/>sql: sqltrace = no<br \/>sql: sqltracefile = \"\/var\/log\/freeradius\/sqltrace.sql\"<br \/>sql: readclients = no<br \/>sql: deletestalesessions = yes<br \/>sql: num_sql_socks = 5<br \/>sql: sql_user_name = \"%{User-Name}\"<br \/>sql: default_user_profile = \"\"<br \/>sql: query_on_not_found = no<br \/>sql: authorize_check_query = \"SELECT id, UserName, Attribute, Value, op&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM radcheck&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = '%{SQL-User-Name}'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id\"<br \/>sql: authorize_reply_query = \"SELECT id, UserName, Attribute, Value, op&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM radreply&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = '%{SQL-User-Name}'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id\"<br \/>sql: authorize_group_check_query = \"SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op&nbsp; FROM radgroupcheck,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id\"<br \/>sql: authorize_group_reply_query = \"SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op&nbsp; FROM radgroupreply,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id\"<br \/>sql: accounting_onoff_query = \"UPDATE radacct SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime &lt;= '%S'\"<br \/>sql: accounting_update_query = \"UPDATE radacct&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET FramedIPAddress = '%{Framed-IP-Address}',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctSessionTime = '%{Acct-Session-Time}',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctInputOctets = '%{Acct-Input-Octets}',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcctOutputOctets = '%{Acct-Output-Octets}'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE AcctSessionId = '%{Acct-Session-Id}'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND UserName = '%{SQL-User-Name}'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND NASIPAddress= '%{NAS-IP-Address}'\"<br \/>sql: accounting_update_query_alt = \"INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')\"<br \/>sql: accounting_start_query = \"INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')\"<br \/>sql: accounting_start_query_alt = \"UPDATE radacct SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'\"<br \/>sql: accounting_stop_query = \"UPDATE radacct SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'\"<br \/>sql: accounting_stop_query_alt = \"INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')\"<br \/>sql: group_membership_query = \"SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}'\"<br \/>sql: connect_failure_retry_delay = 60<br \/>sql: simul_count_query = \"\"<br \/>sql: simul_verify_query = \"SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM radacct WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0\"<br \/>sql: postauth_query = \"INSERT into radpostauth (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())\"<br \/>sql: safe-characters = \"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: \/\"<br \/>rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked<br \/>rlm_sql (sql): Attempting to connect to root@localhost:\/radius<br \/>rlm_sql (sql): starting 0<br \/>rlm_sql (sql): Attempting to connect rlm_sql_mysql #0<br \/>rlm_sql_mysql: Starting connect to MySQL server for #0<br \/>rlm_sql (sql): Connected new DB handle, #0<br \/>rlm_sql (sql): starting 1<br \/>rlm_sql (sql): Attempting to connect rlm_sql_mysql #1<br \/>rlm_sql_mysql: Starting connect to MySQL server for #1<br \/>rlm_sql (sql): Connected new DB handle, #1<br \/>rlm_sql (sql): starting 2<br \/>rlm_sql (sql): Attempting to connect rlm_sql_mysql #2<br \/>rlm_sql_mysql: Starting connect to MySQL server for #2<br \/>rlm_sql (sql): Connected new DB handle, #2<br \/>rlm_sql (sql): starting 3<br \/>rlm_sql (sql): Attempting to connect rlm_sql_mysql #3<br \/>rlm_sql_mysql: Starting connect to MySQL server for #3<br \/>rlm_sql (sql): Connected new DB handle, #3<br \/>rlm_sql (sql): starting 4<br \/>rlm_sql (sql): Attempting to connect rlm_sql_mysql #4<br \/>rlm_sql_mysql: Starting connect to MySQL server for #4<br \/>rlm_sql (sql): Connected new DB handle, #4<br \/>Module: Instantiated sql (sql) <br \/>Module: Loaded Acct-Unique-Session-Id <br \/>acct_unique: key = \"User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port\"<br \/>Module: Instantiated acct_unique (acct_unique) <br \/>Module: Loaded detail <br \/>detail: detailfile = \"\/var\/log\/freeradius\/radacct\/%{Client-IP-Address}\/detail-%Y%m%d\"<br \/>detail: detailperm = 384<br \/>detail: dirperm = 493<br \/>detail: locking = no<br \/>Module: Instantiated detail (detail) <br \/>Module: Loaded radutmp <br \/>radutmp: filename = \"\/var\/log\/freeradius\/radutmp\"<br \/>radutmp: username = \"%{User-Name}\"<br \/>radutmp: case_sensitive = yes<br \/>radutmp: check_with_nas = yes<br \/>radutmp: perm = 384<br \/>radutmp: callerid = yes<br \/>Module: Instantiated radutmp (radutmp) <br \/>Listening on authentication *:1812<br \/>Listening on accounting *:1813<br \/>Ready to process requests.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6d4b\u8bd5radius\u9a8c\u8bc1<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"400\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"400\">radtest test test localhost 0 artradiustest<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"714\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"712\">\n<p>ThinkPad:~# radtest test test localhost 0 artfreeradiustest<br \/>Sending Access-Request of id 196 to 127.0.0.1 port 1812<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User-Name = \"test\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User-Password = \"test\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAS-IP-Address = 255.255.255.255<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAS-Port = 0<br \/>rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=196, length=20<br \/>rad_verify: Received Access-Reject packet from client 127.0.0.1 port 1812 with invalid signature (err=2)!&nbsp; (Shared secret is incorrect.)<br \/>ThinkPad:~# radtest test test localhost 0 artradiustest<br \/>Sending Access-Request of id 219 to 127.0.0.1 port 1812<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User-Name = \"test\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User-Password = \"test\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAS-IP-Address = 255.255.255.255<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAS-Port = 0<br \/>rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=219, length=20<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fee\u6539\/etc\/freeradius-dialupadmin\/admin.conf<\/p>\n<p>(\u4fee\u6539\u7b26\u5408\u4f60Mysql\u7684\u7528\u6237\u8bbe\u7f6e<\/p>\n<p>sql_type: mysql<br \/>sql_server: localhost<br \/>sql_port: 3306<br \/>sql_username: root<br \/>sql_password: u password<br \/>sql_database: radius<br \/>sql_accounting_table: radacct<br \/>sql_badusers_table: badusers<br \/>sql_check_table: radcheck<br \/>sql_reply_table: radreply<br \/>sql_user_info_table: userinfo<br \/>sql_groupcheck_table: radgroupcheck<br \/>sql_groupreply_table: radgroupreply<br \/>sql_usergroup_table: usergroup<br \/>sql_total_accounting_table: totacct<br \/>sql_nas_table: nas<\/p>\n<p>\u66f4\u6539sql_debug: ture\u4e3a<\/p>\n<p>sql_debug: false<\/p>\n<p>\u53e6\u5916\u6ce8\u610f.\u7531\u4e8ewindows xp pppoe\u4e0d\u652f\u6301md5\u52a0\u5bc6.(\u672c\u4eba\u731c\u6d4b,\u9700\u4fee\u6539\u5ba2\u6237\u7aefxp pppoe\u7684\u5bc6\u7801\u9a8c\u8bc1\u90e8\u5206)<\/p>\n<p>\u6240\u4ee5\u5982\u679c\u9700\u8981\u5c06\/etc\/freeradius-dialupadmin\/admin.conf\u4e2d\u5173\u4e8e\u751f\u6210\u65b0\u7528\u6237\u5bc6\u7801\u90e8\u5206\u4fee\u6539\u4e3a\u660e\u6587.<\/p>\n<p>\u5177\u4f53\u5982\u4e0b:<\/p>\n<p>\u4fee\u6539general_encryption_method: crypt\u4e3a:<br \/>general_encryption_method: clear<br \/>==================================<\/p>\n<p>\u8fd9\u91cc\u63d0\u522b\u611f\u8c22zhaoboss\u5148\u751f\u7ed9\u4e0e\u7684\u63d0\u793a.<\/p>\n<p>==================================<\/p>\n<p>vim \/etc\/freeradius-dialupadmin\/admin.conf<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"488\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"486\">\n<p>#<br \/># Main Configuration File<br \/>#<br \/># it can be default or whatever language. Only greek are supported<br \/># from non latin alphabet languages<br \/># These attribute only apply for ldap not for sql<br \/>#<br \/>general_prefered_lang: en<br \/>general_prefered_lang_name: English<br \/>#<br \/># The charset which will be added as a meta tag in all pages<br \/>#<br \/>general_charset: iso-8859-1<br \/>#<br \/># Uncomment this if normal attributes (not the ;lang-xx ones) in ldap<br \/># are utf8 encoded.<br \/>#<br \/>#general_decode_normal_attributes: yes<br \/>#<br \/># The directory where dialupadmin is installed<br \/>#<br \/>general_base_dir: \/usr\/share\/freeradius-dialupadmin<br \/>#<br \/># The base directory of the freeradius radius installation<br \/>#<br \/>general_radiusd_base_dir: \/usr<br \/>general_domain: company.com<br \/>#<br \/># Set it to yes to use sessions and cache the various mappings<br \/># You can also set use_session = 1 in config.php3 to also cache<br \/># the admin.conf<br \/>#<br \/># ---- IMPORTANT -- IMPORTANT -- IMPORTANT ----<br \/>#Remember to use the 'Clear Cache' page if you use sessions and do any changes<br \/>#in any of the configuration files.<br \/>#<br \/>general_use_session: no<br \/>#<br \/># This is used by the failed logins page. It states the default back time<br \/># in minutes.<br \/>#<br \/>general_most_recent_fl: 30<\/p>\n<p>#<br \/># Realm setup<br \/>#<br \/># Set general_strip_realms to yes in order&nbsp; to stip realms from usernames.<br \/># By default realms are not striped<br \/>#general_strip_realms : yes<br \/>#<br \/># The delimiter used&nbsp; in realms. Default is @<br \/>#<br \/>general_realm_delimiter: @<br \/>#<br \/># The format of the realms. Can be either suffix (realm is after the username)<br \/># or prefix (realm is before the username). Default is suffix<br \/>#<br \/>general_realm_format: suffix<br \/>#<\/p>\n<p>#<br \/># Determines if the administrator will be able to see and change the user password through<br \/># the user edit page<br \/>general_show_user_password: yes<\/p>\n<p>general_raddb_dir: \/etc\/freeradius<br \/>general_ldap_attrmap: %{general_raddb_dir}\/ldap.attrmap<br \/># Need to fix admin.conf file parser<br \/>#general_clients_conf: %{general_raddb_dir}\/clients.conf<br \/>general_clients_conf: \/etc\/freeradius\/clients.conf<br \/>general_sql_attrmap: \/etc\/freeradius-dialupadmin\/sql.attrmap<br \/>general_accounting_attrs_file: \/etc\/freeradius-dialupadmin\/accounting.attrs<br \/>general_extra_ldap_attrmap: \/etc\/freeradius-dialupadmin\/extra.ldap-attrmap<br \/>#<br \/># it can be either ldap or sql<br \/># This affects the user base not accounting. Accounting is always in sql<br \/>#<br \/>general_lib_type: sql<br \/>#<br \/># Define which attributes will be visible in the user edit page<br \/>#<br \/>general_user_edit_attrs_file: \/etc\/freeradius-dialupadmin\/user_edit.attrs<br \/>#<br \/># Used by the Accounting Report Generator<br \/>#<br \/>general_sql_attrs_file: \/etc\/freeradius-dialupadmin\/sql.attrs<br \/>#<br \/># Set default values for various attributes<br \/>#<br \/>general_default_file: \/etc\/freeradius-dialupadmin\/default.vals<br \/>#general_ld_library_path: \/usr\/local\/snmpd\/lib<br \/>#<br \/># can be 'snmp' (for snmpfinger) or empty to query the radacct table without first<br \/># querying the nas<br \/># This is used by the online users page<br \/>#<br \/>general_finger_type: snmp<br \/>#<br \/># Defines the nas type. This is only used by snmpfinger<br \/># cisco and lucent are supported for now<br \/>#<br \/>general_nas_type: cisco<br \/>general_snmpfinger_bin: %{general_base_dir}\/bin\/snmpfinger<br \/>general_radclient_bin: %{general_radiusd_base_dir}\/bin\/radclient<br \/>#<br \/># this information is used from the server check page<br \/>#<br \/>general_test_account_login: test<br \/>general_test_account_password: testpass<br \/>#<br \/># These are used as default values for the user test page<br \/>#<br \/>general_radius_server: localhost<br \/>general_radius_server_port: 1812<br \/>#<br \/># can be either pap or chap<br \/>#<br \/>general_radius_server_auth_proto: pap<br \/>#<br \/># sorry, single valued for now. Should become something like<br \/># password[server-name]: xxxxx<br \/>#<br \/>general_radius_server_secret: XXXXXX<br \/>general_auth_request_file: \/etc\/freeradius-dialupadmin\/auth.request<br \/>#<br \/># can be one of crypt,md5,clear<br \/>#<br \/>general_encryption_method: clear<br \/>#<br \/># can be either asc (older dates first) or desc (recent dates first)<br \/># This is used in the user accounting and badusers pages<br \/>#<br \/>general_accounting_info_order: desc<br \/>#<br \/># Use the totacct table in the user statistics page instead of the radacct<br \/># table. That will make the page run quicker. totacct should have data for<br \/># this to work \ud83d\ude42<br \/>#<br \/>general_stats_use_totacct: no<br \/>#<br \/># If set to yes then we only allow each administrator to examine it's own entries<br \/># in the badusers table<br \/>#<br \/>general_restrict_badusers_access: no<\/p>\n<p>INCLUDE: \/etc\/freeradius-dialupadmin\/naslist.conf<\/p>\n<p>INCLUDE: \/etc\/freeradius-dialupadmin\/captions.conf<\/p>\n<p>#<br \/># The ldap server to connect to.<br \/># Both ldap_server and ldap_write_server can be a space-separated<br \/># list of ldap hostnames. In that case the library will try to connect<br \/># to the servers in the order that they appear. If the first host is down<br \/># ldap_connect will ask for the second ldap host and so on.<br \/>#<br \/>ldap_server: ldap.%{general_domain}<br \/>#<br \/># There are many cases where we have a small write master and<br \/># a lot of fast read only replicas. If that is the case uncomment<br \/># ldap_write_server and point it to the write master. It will be<br \/># used only when writing to the directory, not when reading<br \/>#<br \/>#ldap_write_server: master.%{general_domain}<br \/>ldap_base: dc=company,dc=com<br \/>ldap_binddn: cn=Directory Manager<br \/>ldap_bindpw: XXXXXXX<br \/>ldap_default_new_entry_suffix: ou=dialup,ou=guests,%{ldap_base}<br \/>ldap_default_dn: uid=default-dialup,%{ldap_base}<br \/>ldap_regular_profile_attr: dialupregularprofile<br \/>#<br \/># If set to yes then the HTTP credentials (http authentication)<br \/># will be used to bind to the ldap server instead of ldap_binddn<br \/># and ldap_bindpw. That way multiple admins with different rights<br \/># on the ldap database can connect through one dialup_admin interface.<br \/># The ldap_binddn and ldap_bindpw are still needed to find the DN<br \/># to bind with (http authentication will only provide us with a<br \/># username). As a result the ldap_binddn should be able to do a search<br \/># with a filter of (uid=&lt;username&gt;). Normally, the anonymous (empty DN)<br \/># user can do that.<br \/>#ldap_use_http_credentials: yes<br \/>#<br \/># If we are using http credentials we can map a specific username to the<br \/># directory manager (which usually does not correspond to a specific username)<br \/>#<br \/>#ldap_directory_manager: cn=Directory Manager<br \/>#ldap_map_to_directory_manager: admin<br \/>#<br \/># Uncomment to enable ldap debug<br \/>#<br \/>#ldap_debug: true<br \/>#<br \/># Allow for defining the ldap filter used when searching for a user<br \/># Variables supported:<br \/># %u: username<br \/># %U: username provided though http authentication<br \/># %mu: mappings for userdb<br \/># %ma: mappings for accounting<br \/>#<br \/># One use of this would be to restrict access to only the user's belonging to<br \/># a specific administrator like this:<br \/># ldap_filter: (&amp;(uid=%u)(manager=uid=%U,ou=admins,o=company,c=com))<br \/>#<br \/>#ldap_filter: (uid=%u)<br \/>#<br \/># If ldap_userdn is set then we use that for user dns, we don't perform an ldap<br \/># search. This can be somewhat faster. The variables supported for ldap_filter<br \/># are also supported here<br \/>#<br \/>#ldap_userdn: uid=%u,%{ldap_base}<\/p>\n<p>#<br \/># can be one of mysql,pg where:<br \/># mysq: MySQL database (port 3306)<br \/># pg: PostgreSQL database (port 5432)<br \/>#<br \/>sql_type: mysql<br \/>sql_server: localhost<br \/>sql_port: 3306<br \/>sql_username: root<br \/>sql_password: u Password<br \/>sql_database: radius<br \/>sql_accounting_table: radacct<br \/>sql_badusers_table: badusers<br \/>sql_check_table: radcheck<br \/>sql_reply_table: radreply<br \/>sql_user_info_table: userinfo<br \/>sql_groupcheck_table: radgroupcheck<br \/>sql_groupreply_table: radgroupreply<br \/>sql_usergroup_table: usergroup<br \/>sql_total_accounting_table: totacct<br \/>sql_nas_table: nas<br \/>#<br \/># This variable is used by the scripts in the bin folder<br \/># It should contain the path to the sql binary used to run<br \/># sql commands (mysql and psql are only supported for now)<br \/>sql_command: \/usr\/bin\/mysql<br \/>#<br \/># This variable is used by the scripts in the bin folder<br \/># It should contain the snmp type and&nbsp; path to the binary <br \/># used to run snmp commands. <br \/># (ucd = UCD-Snmp and net = Net-Snmp are only supported for now)<br \/>general_snmp_type: net<br \/>general_snmpwalk_command: \/usr\/bin\/snmpwalk<br \/>general_snmpget_command: \/usr\/bin\/snmpget<br \/>#<br \/># Uncomment to enable sql debug<br \/>#<br \/>sql_debug: false<br \/>#<br \/># If set to yes then the HTTP credentials (http authentication)<br \/># will be used to connect to the sql server instead of sql_username<br \/># and sql_password. That way multiple admins with different rights<br \/># on the sql database can connect through one dialup_admin interface.<br \/>#sql_use_http_credentials: yes<br \/>#<br \/># If set the query will be added to all of the queries on the accounting<br \/># table<br \/>#sql_accounting_extra_query: %ma<\/p>\n<p>#<br \/># true or false<br \/>#<br \/>sql_use_user_info_table: true<br \/>sql_use_operators: true<br \/>#<br \/># Set this to the value of the default_user_profile in your<br \/># sql.conf if that one is set. If it is not set leave blank<br \/># or commented out<br \/>#sql_default_user_profile: DEFAULT<br \/>#<br \/>#<br \/>sql_password_attribute: User-Password<br \/>sql_date_format: Y-m-d<br \/>sql_full_date_format: Y-m-d H:i:s<br \/>#<br \/># Used in the accounting report generator so that we<br \/># don't return too many results<br \/>#<br \/>sql_row_limit: 40<br \/>#<br \/># These options are used by the log_badlogins script and by the<br \/># mysql driver<br \/>#<br \/># Set the sql connect timeout (secs)<br \/>sql_connect_timeout: 3<br \/># Give a space separated list of extra mysql servers to connect to when<br \/># logging bad logins or adding users in the badusers table<br \/>#sql_extra_servers: sql2.company.com sql3.company.com<\/p>\n<p>#<br \/># Default values for the various user limits in case the counter module<br \/># is used to impose such limits.<br \/># The value should be the user limit in seconds or none for nothing<br \/>#<br \/>counter_default_daily: 14400<br \/>counter_default_weekly: 72000<br \/>counter_default_monthly: none<br \/>#<br \/># Since calculating monthly usage can be quite expensive we make<br \/># it configurable<br \/># This is not needed if the monthly limit is not none<br \/>#counter_monthly_calculate_usage: true<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>vim \/etc\/php4\/apache2\/php.ini<\/p>\n<p>\u53bb\u6389;extension=mysql.so\u7684\u6ce8\u91ca<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"400\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"398\">extension=mysql.so<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6700\u540e<\/p>\n<p>cp \/usr\/share\/freeradius-dialupadmin \/var\/www\/ -Rf<\/p>\n<p>cp \/etc\/freeradius-dialupadmin\/conf\/admin.conf \/var\/www\/freeradius-diaupadmin\/conf\/<\/p>\n<p>Routeros\u90e8\u5206\u6bd4\u8f83\u7b80\u5355.\u5927\u5bb6\u53ef\u4ee5\u81ea\u5df1\u641c\u7d22\u4e00\u4e0b\u8d44\u6599.<\/p>\n<p>&nbsp;<\/p>\n<p>\u6709\u4ec0\u4e48\u95ee\u9898\u53ef\u4ee5\u548c\u6211\u4ea4\u6d41<\/p>\n<p>MSN:liang@liangliang.org.cn<\/p>\n<p>Gtalk:gugong.j@gmail.com<\/p>\n<p>all ok..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u65b9\u4fbf\u5feb\u6377\u7684\u8f6f\u4ef6\u5b89\u88c5\u65b9\u5f0f.\u5373:apt-get. \u4f7f\u7528apt-get\u5b89\u88c5\u6211\u4eec\u6240\u9700\u8981\u7684\u7ec4\u4ef6. apt-get install freeradius-ldap freeradius-m&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-freeradius"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=210"}],"version-history":[{"count":0,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/210\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}