Install FreeRadius PgSQL on Debian or Ubuntu

Remote Authentication Dial-In User Service (RADIUS) is a networking protocol,

Install FreeRadius PgSQL 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 PostgreSQL

sudo apt install freeradius freeradius-utils freeradius-postgresql

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

sudo -u postgres psql -c "CREATE DATABASE radius;"
sudo -u postgres psql radius < /etc/freeradius/3.0/mods-config/sql/main/postgresql/schema.sql

Edit FreeRadius connection

sudo nano /etc/freeradius/3.0/mods-available/sql
driver = "rlm_sql_postgresql"
dialect = "postgresql"
server = "localhost"
port = 5432
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

Related Post

Enable SQLCounter FreeRadius
Install PostgreSQL on Debian or Ubuntu
Install Webserver on Debian or Ubuntu
Install MariaDB on Debian or Ubuntu
Install FreeRadius MySQL on Debian or Ubuntu

Comments

There are 0 comments on this post

Leave A Comment