Install FreeRADIUS and Daloradius on Ubuntu 20.04/18.04/16.04
source link: https://computingforgeeks.com/how-to-install-freeradius-and-daloradius-on-ubuntu/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This guide is to help you install FreeRADIUS and Daloradius on Ubuntu 20.04/18.04/16.04 LTS servers. Our recent guide on FreeRADIUS was for how to Install FreeRADIUS and Daloradius on CentOS 7 and RHEL 7. FreeRADIUS is an open source, high-performance, modular, scalable and feature-rich RADIUS server. It ships with both server and radius client, development libraries and numerous additional RADIUS related utilities.
FreeRADIUS supports request proxying, with fail-over and load balancing, as well as the ability to access many types of back-end databases.
RADIUS, which stands for “Remote Authentication Dial-In User Service“, is a network protocol used for remote user authentication and accounting. It provides AAA services; namely Authorization, Authentication, and Accounting.
Features of FreeRADIUS
- Flexible Configuration through a wide range of methods to select user configurations.
- Complete support for RFC 2865 and RFC 2866 attributes.
- EAP with EAP-MD5, EAP-SIM, EAP-TLS, EAP-TTLS, EAP-PEAP, and Cisco LEAP EAP sub-types
- Vendor Specific Attributes for almost one hundred vendors, including BinTec, Foundry, Cisco, Juniper, Lucent/Ascend, HP ProCurve, Microsoft, USR/3Com, Acc/Newbridge and many more.
What is daloRADIUS?
On the other side, daloRADIUS is an advanced RADIUS web management platform written in PHP and JavaScript. It is mainly aimed at managing Hotspots and general-purpose ISP deployments powered by FreeRADIUS server. Some good features of daloRADIUS include:
- Has a database abstraction layer with support for many database systems – MySQL, SQLite, PostgreSQL, MsSQL and Oracle
- Advanced user management
- Powerful graphical reporting and accounting
- Integrates with GoogleMaps for geo-location
- Has a billing engine
How to install FreeRADIUS and Daloradius on Ubuntu 20.04/18.04/16.04
Start by updating your system packages to the latest version:
sudo apt update
sudo apt -y upgrade
Reboot system after doing an upgrade
sudo reboot
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.
Installing Apache on Ubuntu:
Install Apache web server by running:
sudo apt -y install apache2
For installation of PHP on Ubuntu 18.04 and Ubuntu 16.04, run:
sudo apt -y install php libapache2-mod-php php-{gd,common,mail,mail-mime,mysql,pear,db,mbstring,xml,curl}
Check the version of php installed:
$ php -v
PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.19-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend Technologies
Step 2: Install MariaDB and Create a database
Next is to install the MariaDB server and create a database for daloRADIUS:
sudo apt update
sudo apt install mariadb-server
sudo mysql_secure_installation
Once installed and running, create a database for FreeRADIUS, this will be used at a later stage.
database name: radius
database user: radius
database user password: Str0ngR@diusPass
If you have a dedicated database server, replace localhost with the IP of source FreeRADIUS Server.
$ sudo mysql -u root -p
CREATE DATABASE radius;
GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "Str0ngR@diusPass";
FLUSH PRIVILEGES;
QUIT
Step 3: Install and Configure FreeRADIUS on Ubuntu 20.04/18.04/16.04
You can view versions of freeradius available in your Ubuntu:
$ sudo apt policy freeradius
freeradius:
Installed: (none)
Candidate: 3.0.20+dfsg-3build1
Version table:
3.0.20+dfsg-3build1 500
500 http://nova.clouds.archive.ubuntu.com/ubuntu focal/main amd64 Packages
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.
Ubuntu 16.04
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.
sudo add-apt-repository ppa:freeradius/stable-3.0
sudo apt-get update
sudo apt-get install freeradius freeradius-mysql freeradius-utils
Import the freeradius MySQL database scheme:
sudo su -
mysql -u root -p radius < /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql
Check tables created:
$ sudo mysql -u root -p -e "use radius;show tables;"
Enter password:
+------------------+
| Tables_in_radius |
+------------------+
| nas |
| radacct |
| radcheck |
| radgroupcheck |
| radgroupreply |
| radpostauth |
| radreply |
| radusergroup |
+------------------+
Create a soft link for sql module under /etc/freeradius/3.0/mods-enabled/
sudo ln -s /etc/freeradius/3.0/mods-available/sql /etc/freeradius/3.0/mods-enabled/
Configure SQL module and change the database connection parameters to suit your environment.
sudo vim /etc/freeradius/3.0/mods-enabled/sql
Your sql section should look similar to below.
sql {
driver = "rlm_sql_mysql"
dialect = "mysql"
# Connection info:
server = "localhost"
port = 3306
login = "radius"
password = "Str0ngR@diusPass"
# Database table configuration for everything except Oracle
radius_db = "radius"
}
# Set to ‘yes’ to read radius clients from the database (‘nas’ table)
# Clients will ONLY be read on server startup.
read_clients = yes
# Table to keep radius client info
client_table = "nas"
Then change group right of /etc/freeradius/3.0/mods-enabled/sql
sudo chgrp -h freerad /etc/freeradius/3.0/mods-available/sql
sudo chown -R freerad:freerad /etc/freeradius/3.0/mods-enabled/sql
Restart freeradius service:
sudo systemctl restart freeradius.service
Install and Configure Daloradius on Ubuntu 20.04/18.04/16.04
We need to install Daloradius to get FreeRADIUS web administration interface.
sudo apt -y install wget unzip
wget https://github.com/lirantal/daloradius/archive/master.zip
unzip master.zip
mv daloradius-master daloradius
Change directory for configuration:
cd daloradius
Configuring daloradius
- Now import Daloradius mysql tables
sudo mysql -u root -p radius < contrib/db/fr2-mysql-daloradius-and-freeradius.sql
sudo mysql -u root -p radius < contrib/db/mysql-daloradius.sql
- Configure daloRADIUS database connection details:
cd ..
sudo mv daloradius /var/www/html/
Then change permissions for http folder and set the right permissions for the daloradius configuration file.
sudo mv /var/www/html/daloradius/library/daloradius.conf.php.sample /var/www/html/daloradius/library/daloradius.conf.php
sudo chown -R www-data:www-data /var/www/html/daloradius/
sudo chmod 664 /var/www/html/daloradius/library/daloradius.conf.php
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.
sudo vim /var/www/html/daloradius/library/daloradius.conf.php
Especially relevant variables to configure are:
$configValues['CONFIG_DB_HOST'] = 'localhost';
$configValues['CONFIG_DB_PORT'] = '3306';
$configValues['CONFIG_DB_USER'] = 'radius';
$configValues['CONFIG_DB_PASS'] = 'Str0ngR@diusPass';
$configValues['CONFIG_DB_NAME'] = 'radius';
To be sure everything works, restart freeradius and apache2
sudo systemctl restart freeradius.service apache2
Open Admin link using your system IP address or domain name:
http://ip-address/daloradius/login.php
A page like this will appear:
Default login details are:
Username: administrator
Password: radius
Change the password after first login.
Read more on daloRADIUS Configurations
Tags:
- install FreeRADIUS on Ubuntu 20.04/18.04 / Ubuntu 16.04
- install FreeRADIUS and Daloradius on Ubuntu 20.04/18.04
- Ubuntu 20.04/18.04 FreeRADIUS and Daloradius installation
Installation on other operating systems.
Recommend
-
95
README.md WHMCS Freeradius
-
32
Strongswan+freeradius+daloradius+ad认证实现ikev2接入服务一Centos7strongswan安装配置支持Windows7eap-machapv2模式实验时间:2018年8月6日-2018年8月6日环境:防火墙:USG2200服务器:Centos7IP地址192.168.20.29Strongswan-5.6.3客户端:Windows7自带客户端ep...
-
18
README.md The FreeRADIUS server
-
35
一、pre-installerldap1.1、实验环境系统:CentOS7Openldap:2.4.44Freeradius:3.0.13Ldapadmin:1.8.3(win64)Phpldapadmin:1.2.31.2、系统优化关闭防火墙:systemctlstopfirewalld.service&&systemctldisablefirewalld.service关闭Ne
-
9
2-factor-authentication with freeradius2-factor-authentication with freeradius Alan DeKok
-
9
How To Use FreeRADIUS With LinOTP 2 To Do Two Factor Authentication With One Time PasswordsThis howto will guide you to set up RADIUS authentication with the LinOTP 2 Community Edition. LinOTP is...
-
15
FreeRADIUS PAP Challenge Authentication using rlm...
-
8
Two Factor Authentication with Freeradius for Horizon View At work we were evaluating different options to enable two factor authentication for VMware Horizon View. They were all more than we were interested in paying and non...
-
4
Install FreeRADIUS and Daloradius on CentOS 7FreeRADIUS is a high performance, open source RADIUS server developed under the GNU General Public License. FreeRADIUS is the most used RADIUS server in the world. FreeRADIUS comes with web-based u...
-
25
审计啊审计,公司使用的华为防火墙需要配置双因子登录认证,这下麻烦了。 查了一下华为手册,支持 Radius 认证,那么没办法,最省钱的办法就是用 FreeIPA 和 FreeRadius 搭一套 OTP 双因子认证了。 系统是 CentOS 7 ,已关闭防火墙服务,方法如下:
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK