Radius On Ubuntu 14.04
Radius On Ubuntu 14.04
Radius On Ubuntu 14.04
1/7
FreeRADIUS is the world's most popular RADIUS server. It features various back-ends. Some include
LDAP and SQL.
FreeRADIUS is in version 2.2.x as of this writing.
RADIUSdesk is a front-end to the MySQL database used by FreeRADIUS.
We will compile the latest version of FreeRADIUS (2.2.5 as of this writing) from source code and
install it on a Ubuntu server.
Download the latest version 2.2.x.tar.gz file from this URL: http://freeradius.org/download.html
FreeRADIUS has a feature to use custom modules. RADIUSdesk will use a few small custom Perl
modules to enhance the default functionality of FreeRADIUS.
FreeRADIUS supply AAA (Authentication, Authorization and Accounting) services.
Compiling FreeRADIUS
This section has two options to chose from after you have installed the required software.
The recommended option is to apply a small patch which will include the rlm_raw FreeRADIUS
module.
The standard option is not to apply the patch and simply compile the source as is.
Before you compile the source code of FreeRADIUS, ensure the following packages are installed:
RADIUSdesk - http://www.radiusdesk.com/
getting_started:install_ubuntu_freeradius http://www.radiusdesk.com/getting_started/install_ubuntu_freeradius
#For Nginx
cp /usr/share/nginx/html/cake2/rd_cake/Setup/Radius/rlm_raw_patch ./
freeradius-server-2.2.5
#For Apache
cp /var/www/cake2/rd_cake/Setup/Radius/rlm_raw_patch ./
freeradius-server-2.2.5
cd freeradius-server-2.2.5
patch -p1 < rlm_raw_patch
If all goes according to plan the following output should show on your screen:
This simply means the last part of the patch did not happen. You can manually fix it by adding the
following to the bottom of the src/modules/stable file.
rlm_raw
This will cause FreeRADIUS to be build with the raw module since we tell it that rlm_raw is a stable
module.
Build and install FreeRADIUS as normal.
ls /usr/local/lib/rlm_raw.*
Setup FreeRADIUS
http://www.radiusdesk.com/
2014/10/09 10:57
3/7
The following commands will set-up FreeRADIUS to work optimal with RADIUSdesk that runs on
Nginx.
The following commands will set-up FreeRADIUS to work optimal with RADIUSdesk that runs on
Apache.
sudo su
cd /usr/local/etc/raddb/sites-enabled
ln -s ../sites-available/dynamic-clients ./
getting_started:install_ubuntu_freeradius http://www.radiusdesk.com/getting_started/install_ubuntu_freeradius
Chilli, but you can use any of the attributes inside the request.
#The mac is then added as the value of the Community optional field
in YFi to create a match
#rlm_raw: Called-Station-Id = 08-00-27-56-22-0B
#Test to see if our required raw attribute exists
if("%{raw:NAS-Identifier}"){
#Test to see if it is in the DB
if ("%{sql: select count(*) from nas where
nas.nasidentifier='%{raw:NAS-Identifier}'}" == 1) {
update control {
FreeRADIUS-Client-IP-Address =
"%{Packet-Src-IP-Address}"
FreeRADIUS-Client-Require-MA = no
FreeRADIUS-Client-Secret = "%{sql:
select nas.secret from nas where nas.nasidentifier='%{raw:NAS-Identifier}'}"
FreeRADIUS-Client-Shortname = "%{sql:
select nas.shortname from nas where
nas.nasidentifier='%{raw:NAS-Identifier}'}"
FreeRADIUS-Client-NAS-Type = "other"
#Optional Virtual server
#FreeRADIUS-Client-Virtual-Server =
"dynamic_server"
}
ok
}
}
}
}
raw {
}
Tell FreeRADIUS to instantiate the raw module upon start-up. Edit the
/usr/local/etc/raddb/radiusd.conf file and ensure raw is added to the instantiate section:
instantiate {
.....
raw
.....
}
http://www.radiusdesk.com/
2014/10/09 10:57
5/7
Setup FreeRADIUS
The following commands will set-up FreeRADIUS to work optimal with RADIUSdesk that runs on
Nginx.
The following commands will set-up FreeRADIUS to work optimal with RADIUSdesk that runs on
Apache.
Testing FreeRADIUS
By now you should have heard about the ssl Heartbleed
vulnerability. It seems Ubuntu 14.04 already included the
patch in their version of the OpenSSL libraries. Unfortunately
FreeRADIUS does not know if the complied version is patched
or not! So please add this part below the status_server =
yes line that is part of the security configuration in
/usr/local/etc/raddb/radiusd.conf
#
RADIUSdesk - http://www.radiusdesk.com/
getting_started:install_ubuntu_freeradius http://www.radiusdesk.com/getting_started/install_ubuntu_freeradius
sudo /usr/local/sbin/radiusd -X
Final testing
As a final test issue the following command and ensure no errors are present.
sudo /usr/local/sbin/radiusd -X
If there are no errors start the FreeRADIUS service through the start-up script.
To create the ability for the web server to exercise some control over FreeRADIUS, we will have a
custom script which is added to the sodoers file.
The correct wat to edit the sodoers file is by using:
http://www.radiusdesk.com/
2014/10/09 10:57
7/7
sudo visudo
This will allow the root user in RADIUSdesk to start and stop FreeRADIUS and also to do on-the-fly
activation of debug traces.
Next steps
From:
http://www.radiusdesk.com/ - RADIUSdesk
Permanent link:
http://www.radiusdesk.com/getting_started/install_ubuntu_freeradius
Last update: 2014/10/08 15:54
RADIUSdesk - http://www.radiusdesk.com/