Radius Server: Difference between revisions
→DaloRadius
Line 63:
== DaloRadius ==
Source: [http://www.ubuntugeek.com/install-freeradius-on-ubuntu-15-04-server-and-manage-using-daloradius-freeradius-web-management-application.html ubuntugeek.com]
=== Installation ===
Prerequisites:
sudo apt-get install php5-common php5-gd php-pear php-db libapache2-mod-php5 php-mail
sudo apt-get install freeradius freeradius-mysql freeradius-utils
=== Database ===
Create Freeradius Database
sudo mysql -u root -p
mysql> create database radius;
mysql> grant all on radius.* to radius@localhost identified by "password";
Insert the freeradius database scheme:
sudo mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql
sudo mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql
Create new user for radius database
sudo mysql -u root -p
mysql> use radius;
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES (‘sqltest', ‘Password', ‘testpwd');
mysql> exit
=== Freeradius ===
You need to edit /etc/freeradius/sql.conf file
sudo nano /etc/freeradius/sql.conf
Make sure you have the following details
database = mysql
login = radius
password = password
Uncomment the following
readclients = yes
Now you need to edit the /etc/freeradius/sites-enabled/default file
sudo vi /etc/freeradius/sites-enabled/default
Uncomment the sql option in the following sections
<pre>
accounting
Line 166 ⟶ 126:
sql
</pre>
Now edit /etc/freeradius/radiusd.conf file
sudo nano /etc/freeradius/radiusd.conf
Uncomment the following option
$INCLUDE sql.conf
Restart freeradius server:
sudo /etc/init.d/freeradius stop
Run freeradius in debugging mode. If there is no error, you are ready to go.
sudo freeradius -X
Start the freeradius using the following command
sudo /etc/init.d/freeradius start
Test the radius server using the following command
sudo radtest sqltest testpwd localhost 18128 testing123
Output as follows
<pre>
Sending Access-Request of id 68 to 127.0.0.1 port 1812
User-Name = "sqltest"
Line 204 ⟶ 156:
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=68, length=20
</pre>
=== Daloradius Installation ===
wget https://downloads.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gz
tar xvfz daloradius-0.9-9.tar.gz
mv daloradius-0.9-9 daloradius
mv daloradius /var/www
Change Permissions
sudo chown www-data:www-data /var/www/daloradius -R
sudo chmod 644 /var/www/daloradius/library/daloradius.conf.php
Mysql database need to setup for daloradius by importing the daloradius scheme into 'radius' database.
cd
sudo mysql -u root
Configure the following daloradius setting:
sudo nano /var/www/daloradius/library/daloradius.conf.php
Change the database password
$configValues['CONFIG_DB_PASS'] = 'password';
Now you need to configure daloradius website under
sudo nano /etc/apache2/sites-available/daloradius.conf
add the following lines
<pre>
Alias /daloradius "/var/www/daloradius/"
<Directory
Options None
Order allow,deny
allow from all
</Directory>
</pre>
Enable and Activate daloradius website using the following command
sudo a2ensite daloradius
sudo service apache2 reload
Daloradius Web GUI
http://10.107.88.93/daloradius
Use the following login details
username: administrator
password: radius
|