Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu


http://linuxdrops.com/install-freeradius-with-web-based-management-daloradius-on-centosrhel-debian-ubuntu/

Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu

Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu

inShare10

Overview

FreeRADIUS is the most popular open source RADIUS server[2] and the most widely deployed RADIUS server in the world.[2] It supports all common authentication protocols, and the server comes with a PHP-based web user administration tool called dialupadmin . It is the basis for many commercial RADIUS products and services, such as embedded systems, RADIUS appliances that support Network Access Control, and WiMAX. It supplies the AAA needs of many Fortune-500 companies, telcos, and Tier 1 ISPs. It is also widely used in the academic community, including eduroam. The server is fast, feature-rich, modular, and scalable. The currently shipping stable version is 2.2.0.

Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu

On CentOS/RHEL 5


# yum install freeradius2 freeradius2-mysql freeradius2-utils mysql-server mysql php-mysql php

On CentOS/RHEL 6


# yum install freeradius freeradius-mysql freeradius-utils mysql-server mysql php-mysql php php-pear php-gd php-pear-DB

Ubuntu or Debian


# apt-get install freeradius freeradius-mysql freeradius-utils mysql-server mysql chkconfig php5 php5-mysql php5-db

Start the MySQL instance


# chkconfig mysqld on
# /etc/init.d/mysqld start

Next we need to create the radius database, so execute


# mysql -uroot -p

Next create the database and grant all privileges to user radius


mysql> CREATE DATABASE radius;
mysql> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radius@123";
mysql> flush privileges;
mysql> exit

Now we need to build the schema for radius database

On CentOS/RHEL


# mysql -uradius -p radius < /etc/raddb/sql/mysql/schema.sql

On Debian/Ubuntu


# mysql -uradius -p radius < /etc/freeradius/sql/mysql/schema.sql

Now edit the sql.conf file and populate the database credentials.

On CentOS/RHEL


# vi /etc/raddb/sql.conf

On Debian, Ubuntu


# vi /etc/freeradius/sql.conf

Enter your mysql database details you just created


# Connection info:
server = "localhost"
port = 3306
login = "radius"
password = "radius@123"
# Database table configuration for everything except Oracle
radius_db = "radius"

Next open /etc/raddb/radiusd.conf

On CentOS/RHEL


# vi /etc/raddb/radiusd.conf

On Debian, Ubuntu


# vi /etc/freeradius/radiusd.conf

Uncomment Line 700 to include sql.conf


$INCLUDE sql.conf

Next edit /etc/raddb/sites-available/default and uncomment the line 177 containing ‘sql’ under the authorize {} section and line 406 ‘sql’ under the accounting {} section, also uncomment ‘sql’ under session {} line 454.

On CentOS/RHEL


# vi /etc/raddb/sites-available/default

On Debian, Ubuntu


# vi /etc/freeradius/sites-available/default

Now, edit /etc/raddb/sites-available/inner-tunnel and uncomment the line 131 and line 255 containing ‘sql’ under authorize {} and under session {}.

On CentOS/RHEL


# vi /etc/raddb/sites-available/inner-tunnel

On Debian, Ubuntu


# vi /etc/freeradius/sites-available/inner-tunnel

Open up /etc/raddb/clients.conf

On CentOS/RHEL


# vi /etc/raddb/clients.conf

On Debian, Ubuntu


# vi /etc/freeradius/clients.conf

To add NAS clients that will use RADIUS server for AAA you have to add the following to the clients.conf file. Append a block such as this, replace 192.168.209.1 with the ip address of your NAS client that will use FreeRADIUS for AAA.


client 192.168.209.1 {
secret = 91982650d89
nastype = other
}

Restart FreeRADIUS for the new configuration to take effect.

On CentOS/RHEL


# service radiusd restart

On Ubuntu, Debian


# service freeradius restart

If you encounter any problems you can run FreeRADIUS in debug mode to find any authentication issues. To run FreeRADIUS in debug mode execute

On CentOS/RHEL


# radiusd -X

On Ubuntu, Debian


# freeradius -X

Update:

Radius use MySQL to store usernames and passwords. To manage radius server daloradius is a good choice. To install daloradius


# wget http://sourceforge.net/projects/daloradius/files/latest/download?source=files
# tar zxvf daloradius-0.9-9.tar.gz
# mysql -uradius -p radius < daloradius-0.9-9/contrib/db/fr2-mysql-daloradius-and-freeradius.sql

Next open the daloradius.conf.php


# vi daloradius-0.9-9/library/daloradius.conf.php

Add the database username, password and db name.


• $configValues['DALORADIUS_VERSION'] = '0.9-9';
• $configValues['FREERADIUS_VERSION'] = '2';
• $configValues['CONFIG_DB_ENGINE'] = 'mysql';
• $configValues['CONFIG_DB_HOST'] = 'localhost';
• $configValues['CONFIG_DB_USER'] = 'radius';
• $configValues['CONFIG_DB_PASS'] = 'radius@123';
• $configValues['CONFIG_DB_NAME'] = 'radius';

Move daloradius to the web root directory
On Debian, Ubuntu


# mv daloradius-0.9-9 /var/www/daloradius

On CentOS/RHEL


# mv daloradius-0.9-9 /var/www/html/daloradius

Point your browser to http://ip-address-or-hostname/daloradius

Login using

Username administrator
Password radius

You can add new groups and users to the database and manage the radius server.

daloradius 300x176 Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu

Advertisement

8 thoughts on “Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu

  1. Nice article,
    Sir , authentication is done using the above given steps.but accounting is done?? pls help me sir

    1. If you want to enable accounting, you need to edit /etc/raddb/sites-available/default on CentOS or /etc/raddb/sites-available/default on Debian or Ubuntu.
      You need to make sure “sql” under accounting{} is enabled on that file.
      I would recommend to enable “sql” on all sections.

  2. Hello
    will there be a update to your Information for installing Version 3.0.11 of Freeradius?
    or will it be the same?
    have a nice day
    vinc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s