Install FreeRadius MySQL on Debian or Ubuntu
Remote Authentication Dial-In User Service (RADIUS) is a networking protocol, operating on port 1812, that provides centralized Authentication, Authorization, and Accounting (AAA or Triple A) management for users who connect and use a network service. RADIUS was developed by Livingston Enterprises, Inc. in 1991 as an access server authentication and accounting protocol and later brought into the Internet Engineering Task Force (IETF) standards. Wikipedia
Open Terminal / Login SSH Account
sudo apt update && upgrade -y
Install FreeRadius 3.0 MySQL
sudo apt install freeradius freeradius-utils freeradius-mysql
Enable SQL Connection
sudo cd /etc/freeradius/3.0/mods-enabled
sudo ln -s ../mods-available/sql sql
Delete -sql and #sql code on sites default
sudo nano /etc/freeradius/3.0/sites-available/default
Delete -sql and #sql code on sites inner-tunnel
sudo nano /etc/freeradius/3.0/sites-available/inner-tunnel
Create and Import Schema
mysql -u root -p -e "CREATE DATABASE radius;"
mysql -u root -p radius < /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql
Edit FreeRadius connection
sudo nano /etc/freeradius/3.0/mods-available/sql
driver = "rlm_sql_mysql"
dialect = "mysql"
server = "localhost"
port = 3306
login = "radius"
password = "radpass"
radius_db = "radius"
read_clients = yes
client_table = "nas"
Enable FreeRadius Service
sudo systemctl start freeradius
sudo systemctl enable freeradius
sudo systemctl status freeradius
Check FreeRadius configuration
freeradius -X
Open your phpMyAdmin and create user on database radius
INSERT INTO radcheck VALUES (1, 'demo', 'Cleartext-Password', ':=', '12345');
INSERT INTO radcheck VALUES (2, 'test', 'Cleartext-Password', ':=', '54321');
Check user
sudo radtest demo 12345 localhost 10 testing123
sudo radtest test 54321 localhost 10 testing123
Video Tutorial
Dharmesh Chauhan
MangoSpot
Cakra