YFi Hotspot Manager Wiki
Brought to you by:
dvdwalt
This section will show which changes has to be made to FreeRADIUS for EAP-TTLS/PAP activation.
It assumes the standard install and set-up of YFi Hotspot Manager.
Ensure that the following dev package is installed BEFORE compiling FreeRADIUS from source:
sudo apt-get install libssl-dev
This will allow FreeRADIUS to compile the EAP-TTLS libraries required for our setup.
Activate the inner-tunnel site with the following command:
sudo ln -s /usr/local/etc/raddb/sites-available/inner-tunnel /usr/local/etc/raddb/sites-enabled/inner-tunnel
Edit /usr/local/etc/raddb/sites-available/inner-tunnel and change the following:
Original:
# # Read the 'users' file files # # Look in an SQL database. The schema of the database # is meant to mirror the "users" file.
Change To:
# # Read the 'users' file files perl if(ok){ update control { Auth-Type := perl } } # # Look in an SQL database. The schema of the database # is meant to mirror the "users" file.
Original:
authenticate { # # PAP authentication, when a back-end database listed
Change to:
authenticate { Auth-Type Perl { perl } # # PAP authentication, when a back-end database listed
Restart FreeRADIUS in debug mode and ensure it starts up OK
sudo /etc/init.d/radiusd stop sudo radiusd -X
Original:
# # Read the 'users' file files update control { Auth-Type := perl } #perl
Change to:
# # Read the 'users' file files perl #The perl module will return 'ok' if there is a 'User-Password' #else wil return noop if(ok){ update control { Auth-Type := perl } }
Original:
# Function to handle authorize sub authorize { return RLM_MODULE_OK; #return RLM_MODULE_HANDLED; }
Change to:
# Function to handle authorize sub authorize { #Check if the 'User-Name' has a '\' in it - typical of windows if(defined($RAD_REQUEST{'User-Name'})){ $RAD_REQUEST{'User-Name'} =~ s/\\\\/\\/g; #Removing troublesome characters in outer tunnel's username print($RAD_REQUEST{'User-Name'}); } #EAP CHECK if(exists($RAD_REQUEST{'User-Password'})){ #Prevent EAP tunnel-setup auth request failure return RLM_MODULE_OK }else{ return RLM_MODULE_NOOP } #END EAP CHECK #return RLM_MODULE_OK; #return RLM_MODULE_HANDLED; }