From 4cbda90d1f1ac5fc6bcf4795486497f8190fdbcc Mon Sep 17 00:00:00 2001 From: Nachtfalke Date: Tue, 10 Jan 2012 22:22:49 +0100 Subject: Update config/freeradius2/freeradius.inc --- config/freeradius2/freeradius.inc | 429 +++++++++++++++++++++++++++++++++++--- 1 file changed, 395 insertions(+), 34 deletions(-) (limited to 'config/freeradius2') diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index a15aba8e..3be0faa0 100644 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -170,17 +170,27 @@ function freeradius_settings_resync() { // For more details look at "freeradius_sqlconf_resync" $sqlconf = $config['installedpackages']['freeradiussqlconf']['config'][0]; - $varsqlconfincludeenable = ($sqlconf['varsqlconfincludeenable']?$sqlconf['varsqlconfincludeenable']:'Disable'); - // Dis-/Enable SQL in "instatiate" section in "freeradius_settings_resync" and radiusd.conf - if ($sqlconf['varsqlconfincludeenable'] == 'Enable') { + // Dis-/Enable SQL in "instatiate" section in "freeradius_settings_resync" and radiusd.conf SQL SERVER 2 + if ($sqlconf['varsqlconf2includeenable'] == 'on') { + $varsqlconf2instantiate = 'sql2'; + } + else { + $varsqlconf2instantiate = '### sql2 DISABLED ###'; + } + + $varsqlconf2failover = ($varsettings['varsqlconf2failover']?$varsettings['varsqlconf2failover']:'redundant'); + + // Dis-/Enable SQL in "instatiate" section in "freeradius_settings_resync" and radiusd.conf SQL SERVER 1 + if ($sqlconf['varsqlconfincludeenable'] == 'on') { $varsqlconfinclude = '$INCLUDE sql.conf'; $varsqlconfincludecounter = '$INCLUDE sql/mysql/counter.conf'; - $varsqlconfinstantiate = 'sql'; + $varsqlconfinstantiate = "$varsqlconf2failover {" . "\n\t\tsql" . "\n\t\t$varsqlconf2instantiate" . "\n\t}"; } else { $varsqlconfinclude = '#$INCLUDE sql.conf'; $varsqlconfincludecounter = '#$INCLUDE sql/mysql/counter.conf'; + $varsqlconf2failover = ''; $varsqlconfinstantiate = '#sql'; } @@ -799,7 +809,7 @@ function freeradius_sqlconf_resync() { $sqlconf = $config['installedpackages']['freeradiussqlconf']['config'][0]; - // Variables: SQL + // Variables: SQL DATABASE 1 $varsqlconfdatabase = ($sqlconf['varsqlconfdatabase']?$sqlconf['varsqlconfdatabase']:'mysql'); $varsqlconfserver = ($sqlconf['varsqlconfserver']?$sqlconf['varsqlconfserver']:'localhost'); $varsqlconfport = ($sqlconf['varsqlconfport']?$sqlconf['varsqlconfport']:'3306'); @@ -826,6 +836,34 @@ function freeradius_sqlconf_resync() { // Additional changes were made in "freeradius_settings_resync" + // Variables: SQL DATABASE 2 + $varsqlconf2database = ($sqlconf['varsqlconf2database']?$sqlconf['varsqlconf2database']:'mysql'); + $varsqlconf2server = ($sqlconf['varsqlconf2server']?$sqlconf['varsqlconf2server']:'localhost'); + $varsqlconf2port = ($sqlconf['varsqlconf2port']?$sqlconf['varsqlconf2port']:'3306'); + $varsqlconf2login = ($sqlconf['varsqlconf2login']?$sqlconf['varsqlconf2login']:'radius'); + $varsqlconf2password = ($sqlconf['varsqlconf2password']?$sqlconf['varsqlconf2password']:'radpass'); + $varsqlconf2radiusdb = ($sqlconf['varsqlconf2radiusdb']?$sqlconf['varsqlconf2radiusdb']:'radius'); + $varsqlconf2accttable1 = ($sqlconf['varsqlconf2accttable1']?$sqlconf['varsqlconf2accttable1']:'radacct'); + $varsqlconf2accttable2 = ($sqlconf['varsqlconf2accttable2']?$sqlconf['varsqlconf2accttable2']:'radacct'); + $varsqlconf2postauthtable = ($sqlconf['varsqlconf2postauthtable']?$sqlconf['varsqlconf2postauthtable']:'radpostauth'); + $varsqlconf2authchecktable = ($sqlconf['varsqlconf2authchecktable']?$sqlconf['varsqlconf2authchecktable']:'radcheck'); + $varsqlconf2authreplytable = ($sqlconf['varsqlconf2authreplytable']?$sqlconf['varsqlconf2authreplytable']:'radreply'); + $varsqlconf2groupchecktable = ($sqlconf['varsqlconf2groupchecktable']?$sqlconf['varsqlconf2groupchecktable']:'radgroupcheck'); + $varsqlconf2groupreplytable = ($sqlconf['varsqlconf2groupreplytable']?$sqlconf['varsqlconf2groupreplytable']:'radgroupreply'); + $varsqlconf2usergrouptable = ($sqlconf['varsqlconf2usergrouptable']?$sqlconf['varsqlconf2usergrouptable']:'radusergroup'); + $varsqlconf2readgroups = ($sqlconf['varsqlconf2readgroups']?$sqlconf['varsqlconf2readgroups']:'yes'); + $varsqlconf2deletestalesessions = ($sqlconf['varsqlconf2deletestalesessions']?$sqlconf['varsqlconf2deletestalesessions']:'yes'); + $varsqlconf2sqltrace = ($sqlconf['varsqlconf2sqltrace']?$sqlconf['varsqlconf2sqltrace']:'no'); + $varsqlconf2numsqlsocks = ($sqlconf['varsqlconf2numsqlsocks']?$sqlconf['varsqlconf2numsqlsocks']:'5'); + $varsqlconf2connectfailureretrydelay = ($sqlconf['varsqlconf2connectfailureretrydelay']?$sqlconf['varsqlconf2connectfailureretrydelay']:'60'); + $varsqlconf2lifetime = ($sqlconf['varsqlconf2lifetime']?$sqlconf['varsqlconf2lifetime']:'0'); + $varsqlconf2maxqueries = ($sqlconf['varsqlconf2maxqueries']?$sqlconf['varsqlconf2maxqueries']:'0'); + $varsqlconf2readclients = ($sqlconf['varsqlconf2readclients']?$sqlconf['varsqlconf2readclients']:'yes'); + $varsqlconf2nastable = ($sqlconf['varsqlconf2nastable']?$sqlconf['varsqlconf2nastable']:'nas'); + + // Additional changes were made in "freeradius_settings_resync" + + $conf .= << Date: Tue, 10 Jan 2012 22:23:20 +0100 Subject: Update config/freeradius2/freeradiussqlconf.xml --- config/freeradius2/freeradiussqlconf.xml | 284 +++++++++++++++++++++++++++++-- 1 file changed, 273 insertions(+), 11 deletions(-) (limited to 'config/freeradius2') diff --git a/config/freeradius2/freeradiussqlconf.xml b/config/freeradius2/freeradiussqlconf.xml index a5bc4d2e..6851711c 100644 --- a/config/freeradius2/freeradiussqlconf.xml +++ b/config/freeradius2/freeradiussqlconf.xml @@ -98,20 +98,16 @@ - Enable SQL Database + ENABLE SQL DATABASE - SERVER 1 listtopic Enable SQL Support varsqlconfincludeenable - + You must enable at least one of the following options: Authorization, Accounting, Session, Post-Auth.]]> - select - Disable - - - - + checkbox + varsqlconf2failover,varsqlconf2includeenable,varsqlconfenableauthorize,varsqlconfenableaccounting,varsqlconfenablesession,varsqlconfenablepostauth,varsqlconfdatabase,varsqlconfserver,varsqlconfport,varsqlconflogin,varsqlconfpassword,varsqlconfradiusdb,varsqlconfaccttable1,varsqlconfaccttable2,varsqlconfpostauthtable,varsqlconfauthchecktable,varsqlconfauthreplytable,varsqlconfgroupchecktable,varsqlconfgroupreplytable,varsqlconfusergrouptable,varsqlconfreadgroups,varsqlconfdeletestalesessions,varsqlconfsqltrace,varsqlconfnumsqlsocks,varsqlconfconnectfailureretrydelay,varsqlconflifetime,varsqlconfmaxqueries,varsqlconfreadclients,varsqlconfnastable Enable SQL Authorization @@ -162,7 +158,7 @@ - SQL Database Configuration + SQL DATABASE CONFIGURATION - SERVER 1 listtopic @@ -173,8 +169,6 @@ mysql - - @@ -352,6 +346,274 @@ input nas + + ENABLE REDUNDANT SQL DATABASE SUPPORT + listtopic + + + Choose Failover/Loadbalancing Mode + varsqlconf2failover +
+ redundant: If server 1 fails failover to server 2
+ load-balance: The load is balanced 50:50 to both databases
+ redundant-load-balance: The load is balanced 50:50 to both databases. If one is down the other does 100%.]]>
+ select + redundant + + + + + +
+ + ENABLE SQL DATABASE - SERVER 2 + listtopic + + + Enable SQL Support + varsqlconf2includeenable + + You must enable at least one of the following options: Authorization, Accounting, Session, Post-Auth.]]> + checkbox + varsqlconf2enableauthorize,varsqlconf2enableaccounting,varsqlconf2enablesession,varsqlconf2enablepostauth,varsqlconf2database,varsqlconf2server,varsqlconf2port,varsqlconf2login,varsqlconf2password,varsqlconf2radiusdb,varsqlconf2accttable1,varsqlconf2accttable2,varsqlconf2postauthtable,varsqlconf2authchecktable,varsqlconf2authreplytable,varsqlconf2groupchecktable,varsqlconf2groupreplytable,varsqlconf2usergrouptable,varsqlconf2readgroups,varsqlconf2deletestalesessions,varsqlconf2sqltrace,varsqlconf2numsqlsocks,varsqlconf2connectfailureretrydelay,varsqlconf2lifetime,varsqlconf2maxqueries,varsqlconf2readclients,varsqlconf2nastable + + + Enable SQL Authorization + varsqlconf2enableauthorize + + SQL support must be enabled for this to work. (Default: Disable)]]> + select + Disable + + + + + + + Enable SQL Accounting + varsqlconf2enableaccounting + + SQL support must be enabled for this to work. (Default: Disable)]]> + select + Disable + + + + + + + Enable SQL Session + varsqlconf2enablesession + + SQL support must be enabled for this to work. (Default: Disable)]]> + select + Disable + + + + + + + Enable SQL Post-Auth + varsqlconf2enablepostauth + + SQL support must be enabled for this to work. (Default: Disable)]]> + select + Disable + + + + + + + SQL DATABASE CONFIGURATION - SERVER 2 + listtopic + + + Database Type + varsqlconf2database + + select + mysql + + + + + + + Server IP Address + varsqlconf2server + + input + localhost + + + Server Port Address + varsqlconf2port + + input + 3306 + + + Database Username + varsqlconf2login + + input + radius + + + Database Password + varsqlconf2password + + password + radpass + + + Database Table Configuration + varsqlconf2radiusdb + + 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) + varsqlconf2accttable1 + + input + radacct + + + Accounting Table 2 (Stop) + varsqlconf2accttable2 + + input + radacct + + + Post Auth Table + varsqlconf2postauthtable + + input + radpostauth + + + Auth Check Table + varsqlconf2authchecktable + + input + radcheck + + + Auth Reply Table + varsqlconf2authreplytable + + input + radreply + + + Group Check Table + varsqlconf2groupchecktable + + input + radgroupcheck + + + Group Reply Table + varsqlconf2groupreplytable + + input + radgroupreply + + + User Group Table + varsqlconf2usergrouptable + + input + radusergroup + + + Read the Group Tables + varsqlconf2readgroups + 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 + varsqlconf2deletestalesessions + + select + yes + + + + + + + Print all SQL Statements + varsqlconf2sqltrace + + select + no + + + + + + + Number of SQL Connections + varsqlconf2numsqlsocks + + input + 5 + + + Failed Database Connection Delay + varsqlconf2connectfailureretrydelay + + input + 60 + + + SQL Socket Lifetime + varsqlconf2lifetime + + input + 0 + + + SQL Socket Maximum Queries + varsqlconf2maxqueries + + input + 0 + + + Read Clients from Database + varsqlconf2readclients + 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 + varsqlconf2nastable + + input + nas +
freeradius_sqlconf_resync(); -- cgit v1.2.3 From 2f70074833769eac35d0e349fac6bb83271bc929 Mon Sep 17 00:00:00 2001 From: Nachtfalke Date: Tue, 10 Jan 2012 22:23:43 +0100 Subject: Update config/freeradius2/freeradiusmodulesldap.xml --- config/freeradius2/freeradiusmodulesldap.xml | 277 ++++++++++++++++++++++++++- 1 file changed, 271 insertions(+), 6 deletions(-) (limited to 'config/freeradius2') diff --git a/config/freeradius2/freeradiusmodulesldap.xml b/config/freeradius2/freeradiusmodulesldap.xml index 06a990e7..cf7f5b33 100644 --- a/config/freeradius2/freeradiusmodulesldap.xml +++ b/config/freeradius2/freeradiusmodulesldap.xml @@ -98,7 +98,7 @@ - ENABLE LDAP SUPPORT + ENABLE LDAP SUPPORT - SERVER 1 listtopic @@ -106,6 +106,7 @@ varmodulesldapenableauthorize checkbox + varmodulesldap2enableauthenticate,varmodulesldapkeepaliveinterval,varmodulesldapkeepaliveprobes,varmodulesldapkeepaliveidle,varmodulesldapmsadcompatibilityenable,varmodulesldapnettimeout,varmodulesldaptimelimit,varmodulesldaptimeout,varmodulesldapldapconnectionsnumber,varmodulesldapbasefilter,varmodulesldapfilter,varmodulesldapbasedn,varmodulesldappassword,varmodulesldapidentity,varmodulesldapserver,varmodulesldap2enableauthorize,varmodulesldap2enableauthenticate,varmodulesldap2server,varmodulesldap2identity,varmodulesldap2password,varmodulesldap2basedn,varmodulesldap2filter,varmodulesldap2basefilter,varmodulesldap2ldapconnectionsnumber,varmodulesldap2timeout,varmodulesldap2timelimit,varmodulesldap2nettimeout,varmodulesldap2msadcompatibilityenable,varmodulesldap2dmiscenable,varmodulesldap2groupenable,varmodulesldap2keepaliveidle,varmodulesldap2keepaliveprobes,varmodulesldap2keepaliveinterval Enable LDAP For Authentication @@ -114,7 +115,7 @@ checkbox - GENERAL CONFIGURATION + GENERAL CONFIGURATION - SERVER 1 listtopic @@ -198,7 +199,7 @@ 1 - MISCELLANEOUS CONFIGURATION + MISCELLANEOUS CONFIGURATION - SERVER 1 listtopic @@ -213,7 +214,7 @@ - Enable Misc Configuration + Enable Misc Configuration - SERVER 1 varmodulesldapdmiscenable checkbox @@ -244,7 +245,7 @@ dialupAccess - Group Membership Options + Group Membership Options - SERVER 1 listtopic @@ -312,7 +313,7 @@ - KEEPALIVE CONFIGURATION + KEEPALIVE CONFIGURATION - SERVER 1 listtopic @@ -339,6 +340,270 @@ 80 3 + + + + ENABLE REDUNDANT LDAP SERVER SUPPORT + listtopic + + + Choose Failover/Loadbalancing Mode + varmodulesldap2failover +
+ redundant: If server 1 fails failover to server 2
+ load-balance: The load is balanced 50:50 to both servers
+ redundant-load-balance: The load is balanced 50:50 to both servers. If one is down the other does 100%.]]>
+ select + redundant + + + + + +
+ + ENABLE LDAP SUPPORT - SERVER 2 + listtopic + + + Enable LDAP For Authorization + varmodulesldap2enableauthorize + + checkbox + varmodulesldap2enableauthenticate,varmodulesldap2server,varmodulesldap2identity,varmodulesldap2password,varmodulesldap2basedn,varmodulesldap2filter,varmodulesldap2basefilter,varmodulesldap2ldapconnectionsnumber,varmodulesldap2timeout,varmodulesldap2timelimit,varmodulesldap2nettimeout,varmodulesldap2msadcompatibilityenable,varmodulesldap2dmiscenable,varmodulesldap2groupenable,varmodulesldap2keepaliveidle,varmodulesldap2keepaliveprobes,varmodulesldap2keepaliveinterval + + + Enable LDAP For Authentication + varmodulesldap2enableauthenticate + + checkbox + + + GENERAL CONFIGURATION - SERVER 2 + listtopic + + + Server + varmodulesldap2server + + input + 80 + ldap.your.domain + + + Identity + varmodulesldap2identity + + input + 80 + + + + Password + varmodulesldap2password + + password + 80 + mypass + + + Basedn + varmodulesldap2basedn + + input + 80 + + + + Filter + varmodulesldap2filter + + input + 80 + + + + Base Filter + varmodulesldap2basefilter + + input + 80 + + + + LDAP Connections Number + varmodulesldap2ldapconnectionsnumber + + input + 80 + 5 + + + Timeout + varmodulesldap2timeout + + input + 80 + 4 + + + Timelimit + varmodulesldap2timelimit + + input + 80 + 3 + + + Net Timeout + varmodulesldap2nettimeout + + input + 80 + 1 + + + MISCELLANEOUS CONFIGURATION - SERVER 2 + listtopic + + + Active Directory Compatibility + varmodulesldap2msadcompatibilityenable + + select + Disable + + + + + + + Enable Misc Configuration + varmodulesldap2dmiscenable + + checkbox + varmodulesldap2defaultprofile,varmodulesldap2profileattribute,varmodulesldap2accessattr + + + Default Profile + varmodulesldap2defaultprofile + + input + 80 + + + + Profile Attribute + varmodulesldap2profileattribute + + input + 80 + radiusProfileDn + + + Access Attribute + varmodulesldap2accessattr + + input + 80 + dialupAccess + + + Group Membership Options - SERVER 2 + listtopic + + + Enable Group Membership Options + varmodulesldap2groupenable + + checkbox + varmodulesldap2accessattrusedforallow,varmodulesldap2doxlat,varmodulesldap2comparecheckitems,varmodulesldap2groupmembershipattribute,varmodulesldap2groupmembershipfilter,varmodulesldap2groupnameattribute + + + Groupname Attribute + varmodulesldap2groupnameattribute + + input + 80 + cn + + + Groupmembership Filter + varmodulesldap2groupmembershipfilter + + input + 80 + + + + Groupmembership Attribute + varmodulesldap2groupmembershipattribute + + input + 80 + radiusGroupName + + + Compare Check Items + varmodulesldap2comparecheckitems + + select + Yes + + + + + + + Do XLAT + varmodulesldap2doxlat + + select + Yes + + + + + + + Access Attribute Used For Allow + varmodulesldap2accessattrusedforallow + + select + Yes + + + + + + + KEEPALIVE CONFIGURATION - SERVER 2 + listtopic + + + LDAP OPT X KEEPALIVE IDLE + varmodulesldap2keepaliveidle + + input + 80 + 60 + + + LDAP OPT X KEEPALIVE PROBES + varmodulesldap2keepaliveprobes + + input + 80 + 3 + + + LDAP OPT X KEEPALIVE INTERVAL + varmodulesldap2keepaliveinterval + + input + 80 + 3 +
freeradius_modulesldap_resync(); -- cgit v1.2.3