Install Free Radius Ubuntu 16.04 Server

Sponsored Link
  1. Install Free Radius Ubuntu 16.04 Server Download
  2. Install Free Radius Ubuntu 16.04 Server Windows 10
  3. Install Free Radius Ubuntu 16.04 Server Ip
  4. Install Free Radius Ubuntu 16.04 Servers
  5. Install Freeradius Ubuntu Server 16.04
RADIUS, which stands for “Remote Authentication Dial In User Service”, is a network protocol -- a system that defines rules and conventions for communication between network devices -- for remote user authentication and accounting. Commonly used by Internet Service Providers (ISPs), cellular network providers, and corporate and educational networks, the RADIUS protocol serves three primary functions:

Install FreeRadius packages from official Ubuntu APT repository with the commands below: sudo apt -y install freeradius freeradius-mysql freeradius-utils. Among the packages installed are mysql module and utils package. For Ubuntu 16.04 system, version 2.x is the package available from the official repository. CD images for Ubuntu 16.04.7 LTS (Xenial Xerus) 64-bit PC (AMD64) server install image. Choose this if you have a computer based on the AMD64 or EM64T architecture (e.g.


• Authenticates users or devices before allowing them access to a network

• Authorizes those users or devices for specific network services

• Accounts for and tracks the usage of those services

Freeradius Features

• An open and scalable solution

• Broad support by a large vendor base

• Easy modification

• Separation of security and communication processes

• Adaptable to most security systems

• Workable with any communication device that supports RADIUS client protocol

daloRADIUS is an advanced RADIUS web platform aimed at managing Hotspots and general-purpose ISP deployments. It features rich user management, graphical reporting, accounting, and integrates with GoogleMaps for geo-locating (GIS). daloRADIUS is written in PHP and JavaScript and utilizes a database abstraction layer which means that it supports many database systems, among them the popular MySQL, PostgreSQL, Sqlite, MsSQL, and many others.

It is based on a FreeRADIUS deployment with a database server serving as the backend. Among other features it implements ACLs, GoogleMaps integration for locating hotspots/access points visually and many more features. daloRADIUS is essentially a web application to manage a radius server so theoretically it can manage any radius server but specifically it manages FreeRADIUS and it's database structure. Since version 0.9-3 daloRADIUS has introduced an application-wide database abstraction layer based on PHP's PEAR::DB package which support a range of database servers.

Before Installing make sure you have Ubuntu 16.04 LAMP server installed and ready for freeradius.

Preparing your system

Open the terminal and run the following command

sudo apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-db php-mysql

Install freeradius using the following command

sudo apt-get install freeradius freeradius-mysql freeradius-utils

Create Freeradius Database

You can use the following command to create freeradius database

sudo mysql -u root -p

Enter password:

mysql> create database radius;

mysql> grant all on radius.* to [email protected] identified by 'password';

Query OK, 0 rows affected (0.00 sec)

Insert the freeradius database scheme using the following commands

sudo mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql

Enter password:

sudo mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql

Enter password:

Create new user for radius database

sudo mysql -u root -p

mysql> use radius;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES (‘sqltest', ‘Password', ‘testpwd');

Query OK, 1 row affected (0.04 sec)

mysql> exit

Bye

Freeradius Configuration

You need to edit /etc/freeradius/sql.conf file

Install Free Radius Ubuntu 16.04 Server Download

sudo vi /etc/freeradius/sql.conf

Make sure you have the following details

database = mysql
login = radius
password = password

Uncomment the following

readclients = yes

Save and Exit the file

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

accounting

# See “Authorization Queries” in sql.conf

sql

session

# See “Authorization Queries” in sql.conf

sql

Post-Auth-Type

Windows

# See “Authorization Queries” in sql.conf

sql

Save and Exit the file

Now edit /etc/freeradius/radiusd.conf file

sudo vi /etc/freeradius/radiusd.conf

#Uncomment the following option

$INCLUDE sql.conf

Save and exit the file

Now you can stop the free radius server using the following command

sudo /etc/init.d/freeradius stop

Run freeradius in debugging mode. If there is no error, you are ready to go.

Install Free Radius Ubuntu 16.04 Server Windows 10

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

Ouput as follows

Sending Access-Request of id 68 to 127.0.0.1 port 1812
User-Name = 'sqltest'
User-Password = 'testpwd'
NAS-IP-Address = 127.0.1.1
NAS-Port = 18128
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=68, length=20

Daloradius Installation

You can download the Daloradius latest version from here

Once you downloaded the daloradius-0.9-9.tar.gz file you need to extract using the following command

$ tar xvfz daloradius-0.9-9.tar.gz

$ mv daloradius-0.9-9 daloradius

$ mv daloradius /var/www/html

Change Permissions

sudo chown www-data:www-data /var/www/html/daloradius -R

sudo chmod 644 /var/www/html/daloradius/library/daloradius.conf.php

Mysql database need to setup for daloradius.We need to do is to import the daloradius scheme into our existing radius database.

$ cd /var/www/html/daloradius/contrib/db

sudo mysql -u root -p radius < mysql-daloradius.sql
configure the following daloradius setting.
sudo vi /var/www/html/daloradius/library/daloradius.conf.php
Change the database password
$configValues[‘CONFIG_DB_PASS'] = ‘password';
Save and exit the file
Now you need to configure daloradius website under /etc/apache2/sites-available

sudo vi /etc/apache2/sites-available/daloradius.conf

add the following lines

Alias /daloradius '/var/www/html/daloradius/'

<Directory /var/www/html/daloradius/>
Options None
Order allow,deny
allow from all
</Directory>

Save and exit the file

Enable daloradius website using the following command

sudo a2ensite daloradius

Enabling site daloradius.

Download

To activate the new configuration, you need to run:

sudo service apache2 reload

Daloradius Web GUI

you can access daloradius GUI using http://server-ip/daloradius and the login screen as follows

Use the following login details

username: administrator
password: radius

If you are running PHP 7 then you might see the following error

Database connection error
Error Message: DB Error: extension not found

To fix the above error you need to do the following changes Credit goes here

Changing file library/daloradius.conf.php

It's required to update daloRADIUS's database connection code so that it identifies the MySQL server using the new and improved mysqli driver:

Open for editing the file library/daloradius.conf.php and locate the configuration variable CONFIG_DB_ENGINE and change it to the value of mysqli (it is now probably set to mysql, notice the extra i). It should end up looking as follows: $configValues[‘CONFIG_DB_ENGINE'] = ‘mysqli';
Changing file library/opendb.php

Open for editing the file library/opendb.php

At the very end of the file just add this new line of code: $dbSocket->query('SET GLOBAL sql_mode = ';'); which makes the MySQL version work with less strict SQL syntax

Once you logged in you should see similar to the following screen


Sponsored Link

Related posts

  • Zentyal – Linux Small Business Server based on ubuntu 10.04 (4)
  • zBackup – A versatile deduplicating backup tool (0)
  • Webmin Installation and Configuration in Ubuntu Linux (22)
  • Webalizer – Apache web server log file analysis Tool (15)
  • Web-based centralized console for tripwire (0)
  • VNSTAT – Console-based network traffic monitor (0)
  • Vesta – Simple & Clever Hosting Control Panel (1)

Configure a WPA2 Enterprise with FreeRADIUS and AD integration on Ubuntu16.04 + Daloradius

1. Install samba, winbind, krb5-user:

2. Config samba by editing:

3. Restart samba service:

4. Join domain (MYNTDOMAIN)

5. Test samba AD authentication:

a. Using winbind:

You will get the following message if everything is correct:

or

b. Using ntlm_auth:

Success message:

6. Install freeradius 3.0.X:

7. Generate and config the server certificates with easy-rsa, remember to enter your server’s FQDN as common name when asked:

a. Generate the certs
b. Config FreeRADIUS to use those new certs:

8. Grant permission for freerad user on winbind’s socket:

9. Tell FreeRADIUS to use ntlm_auth for MSCHAP by editing:

a.
b.

c.

10. Configure RADIUS client, /etc/freeradius/clients.conf. For example:

11. Restart FreeRADIUS:

12. Test FreeRADIUS and MSCHAP:

The results will be like:

13. Configure your Access Point (172.25.1.10) to use the FreeRADIUS server at 172.100.99.100 or any other IPs your network/s use.

EXTRA DALORADIUS

Start by updating your system packages to the latest version:

Reboot system after doing an upgrade

Once the system is up, begin the installation FreeRADIUS and Daloradius on your Ubuntu 18.04 / Ubuntu 16.04 system.

Step 1: Install Apache Web Server and PHP

Daloradius will require php and Apache web server to be installed on the host system.

Install Apache web server by running:

For installation of PHP on Ubuntu 18.04 and Ubuntu 16.04, run:

Check the version of php installed:

Step 2: Install MariaDB and Create a database

Next is to install the MariaDB server and create a database for daloRADIUS. We have a comprehensive guide for installing MariaDB 10.x on Ubuntu

Once installed and running, create a database for FreeRADIUS, this will be used at a later stage.

If you have a dedicated database server, replace localhost with the IP of source FreeRadius Server.

Step 3: Configure FreeRADIUS

As of this writing, the default version of FreeRADIUS installed on Ubuntu 18.04 is v3.0. Install if from official Ubuntu apt repository using:

Among the packages installed are mysql module and utils package.

For Ubuntu 16.04 system, version 2.x is the package available from the official repository. To install version 3.0, add the Personal Package Archive (PPA) for the version 3 of FreeRADIUS.

Install the following FreeRADIUS packages.

Import the freeradius MySQL database scheme:

Check tables created:

Create a soft link for sql module under /etc/freeradius/3.0/mods-enabled/

Configure SQL module and change the database connection parameters to suit your environment.

Your sql section should look similar to below.

Then change group right of /etc/freeradius/3.0/mods-enabled/sql

Restart freeradius service:

Installing and Configuring Daloradius on Ubuntu 18.04 / Ubuntu 16.04

We need to install Daloradius to get FreeRADIUS web administration interface.

Change directory for configuration

Configuring daloradius
  • Now import Daloradius mysql tables

Install Free Radius Ubuntu 16.04 Server Ip

  • Configure daloRADIUS database connection details:
Free

Then change permissions for http folder and set the right permissions for the daloradius configuration file.

Install Free Radius Ubuntu 16.04 Servers

You should now modify the filedaloradius.conf.php to adjust the MySQL database information. Open the daloradius.conf.php and add the database username, password and db name.

Especially relevant variables to configure are:

To be sure everything works, restart freeradius and apache2

Install Freeradius Ubuntu Server 16.04

Open Admin link using your system IP address or domain name:

A page like this will appear:

Default login details are:
Username: administrator
Password: radius

in Linux Tutorial