From f5fc0527f73e1e07cc0e0fa156c7e0fc10b0f9f2 Mon Sep 17 00:00:00 2001 From: Nacht Falke Date: Mon, 19 Dec 2011 15:12:09 +0000 Subject: Added GUI for configuring sql.conf --- config/freeradius2/freeradius.inc | 99 ++++++++- config/freeradius2/freeradius.xml | 4 + config/freeradius2/freeradiusclients.xml | 4 + config/freeradius2/freeradiuseapconf.xml | 14 +- config/freeradius2/freeradiusinterfaces.xml | 4 + config/freeradius2/freeradiussettings.xml | 4 + config/freeradius2/freeradiussqlconf.xml | 309 ++++++++++++++++++++++++++++ 7 files changed, 434 insertions(+), 4 deletions(-) create mode 100644 config/freeradius2/freeradiussqlconf.xml diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index 38625494..0cf53eb8 100755 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -68,6 +68,13 @@ function freeradius_settings_resync() { $varsettingsmaxspareservers = $varsettings['varsettingsmaxspareservers']; $varsettingsmaxqueuesize = $varsettings['varsettingsmaxqueuesize']; $varsettingsmaxrequestsperserver = $varsettings['varsettingsmaxrequestsperserver']; + + // These lines are uncommented in fuction "freeradius_settings_resync" to INCLUDE / enable eap.conf + $sqlconf = $config['installedpackages']['freeradiussqlconf']['config'][0]; + $varsqlconfenable = $sqlconf['varsqlconfenable']; + $varsqlconfenablecounter = $sqlconf['varsqlconfenablecounter']; + + $conf = << \ No newline at end of file diff --git a/config/freeradius2/freeradius.xml b/config/freeradius2/freeradius.xml index b70b2713..0324bcb5 100644 --- a/config/freeradius2/freeradius.xml +++ b/config/freeradius2/freeradius.xml @@ -85,6 +85,10 @@ EAP /pkg_edit.php?xml=freeradiuseapconf.xml&id=0 + + SQL + /pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + diff --git a/config/freeradius2/freeradiusclients.xml b/config/freeradius2/freeradiusclients.xml index 62c37f3d..cf18458c 100644 --- a/config/freeradius2/freeradiusclients.xml +++ b/config/freeradius2/freeradiusclients.xml @@ -71,6 +71,10 @@ EAP /pkg_edit.php?xml=freeradiuseapconf.xml&id=0 + + SQL + /pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + diff --git a/config/freeradius2/freeradiuseapconf.xml b/config/freeradius2/freeradiuseapconf.xml index cff17c09..00aaf3bc 100644 --- a/config/freeradius2/freeradiuseapconf.xml +++ b/config/freeradius2/freeradiuseapconf.xml @@ -72,6 +72,10 @@ /pkg_edit.php?xml=freeradiuseapconf.xml&id=0 + + SQL + /pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + @@ -127,20 +131,20 @@ 4096 - EAP-TLS and EAP-TLS with OCSP support + EAP-TLS listtopic Private Key Password vareapconfprivatekeypassword - + password whatever Private Key File vareapconfprivatekeyfile - must in /usr/local/etc/raddb/certs/ (Default: server.pem)]]> + must be in /usr/local/etc/raddb/certs/ (Default: server.pem)]]> input server.pem @@ -179,6 +183,10 @@ input random + + EAP-TLS with OCSP support + listtopic + Enable OCSP vareapconfocspenable diff --git a/config/freeradius2/freeradiusinterfaces.xml b/config/freeradius2/freeradiusinterfaces.xml index 22f2b87e..cfc8cb14 100644 --- a/config/freeradius2/freeradiusinterfaces.xml +++ b/config/freeradius2/freeradiusinterfaces.xml @@ -71,6 +71,10 @@ EAP /pkg_edit.php?xml=freeradiuseapconf.xml&id=0 + + SQL + /pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + diff --git a/config/freeradius2/freeradiussettings.xml b/config/freeradius2/freeradiussettings.xml index a0b08ab4..2f4189fd 100644 --- a/config/freeradius2/freeradiussettings.xml +++ b/config/freeradius2/freeradiussettings.xml @@ -72,6 +72,10 @@ EAP /pkg_edit.php?xml=freeradiuseapconf.xml&id=0 + + SQL + /pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + diff --git a/config/freeradius2/freeradiussqlconf.xml b/config/freeradius2/freeradiussqlconf.xml new file mode 100644 index 00000000..8a53b923 --- /dev/null +++ b/config/freeradius2/freeradiussqlconf.xml @@ -0,0 +1,309 @@ + + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + + Describe your package requirements here + Currently there are no FAQ items provided. + freeradiussqlconf + none + FreeRADIUS: SQL + pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + /usr/local/pkg/freeradius.inc + + + Users + /pkg.php?xml=freeradius.xml + + + NAS / Clients + /pkg.php?xml=freeradiusclients.xml + + + Interfaces + /pkg.php?xml=freeradiusinterfaces.xml + + + Settings + /pkg_edit.php?xml=freeradiussettings.xml&id=0 + + + EAP + /pkg_edit.php?xml=freeradiuseapconf.xml&id=0 + + + SQL + /pkg_edit.php?xml=freeradiussqlconf.xml&id=0 + + + + + + Enable SQL Database + listtopic + + + Enable SQL Configuration + varsqlconfenable + + $INCLUDE sql.conf]]> + select + #\$INCLUDE sql.conf + + + + + + + Enable MySQL Counter + varsqlconfenablecounter + + $INCLUDE sql/mysql/counter.conf]]> + select + #\$INCLUDE sql/mysql/counter.conf + + + + + + + SQL Database Configuration + listtopic + + + Database Type + varsqlconfdatabase + + select + mysql + + + + + + + + + Server IP Address + varsqlconfserver + + input + localhost + + + Server Port Address + varsqlconfport + + input + 3306 + + + Database Username + varsqlconflogin + + input + radius + + + Database Password + varsqlconfpassword + + password + radpass + + + Database Table Configuration + varsqlconfradiusdb + + For all except Oracle choose: radius
+ For Oracle change and paste the following line according your environment:
+ (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))]]>
+ input + radius +
+ + Accounting Table 1 (Start) + varsqlconfaccttable1 + + input + radacct + + + Accounting Table 2 (Stop) + varsqlconfaccttable2 + + input + radacct + + + Post Auth Table + varsqlconfpostauthtable + + input + radpostauth + + + Auth Check Table + varsqlconfauthchecktable + + input + radcheck + + + Auth Reply Table + varsqlconfauthreplytable + + input + radreply + + + Group Check Table + varsqlconfgroupchecktable + + input + radgroupcheck + + + Group Reply Table + varsqlconfgroupreplytable + + input + radgroupreply + + + User Group Table + varsqlconfusergrouptable + + input + radusergroup + + + Read the Group Tables + varsqlconfreadgroups + yes (default) we read the group tables.
+ If set to no the user must have Fall-Through = Yes in the radreply table]]>
+ select + yes + + + + +
+ + Delete Stale Sessions + varsqlconfdeletestalesessions + + select + yes + + + + + + + Print all SQL Statements + varsqlconfsqltrace + + select + no + + + + + + + Number of SQL Connections + varsqlconfnumsqlsocks + + input + 5 + + + Failed Database Connection Delay + varsqlconfconnectfailureretrydelay + + input + 60 + + + SQL Socket Lifetime + varsqlconflifetime + + input + 0 + + + SQL Socket Maximum Queries + varsqlconfmaxqueries + + input + 0 + + + Read Clients from Database + varsqlconfreadclients + yes to read radius clients from the database ('nas' table). Clients will only be read on server startup. (Default: yes)]]> + select + yes + + + + + + + RADIUS Client Table + varsqlconfnastable + + input + nas + +
+ + freeradius_sqlconf_resync(); + freeradius_settings_resync(); + + + freeradius_sqlconf_resync(); + freeradius_settings_resync(); + +
\ No newline at end of file -- cgit v1.2.3