0% found this document useful (0 votes)
177 views10 pages

Manual de Freradius - Radius - Dalo 2020

FreeRADIUS and Daloradius are installed and configured on Ubuntu 18.04. Key steps include: 1. Installing MariaDB and creating a radius database. 2. Installing FreeRADIUS and configuring it to connect to the radius database. 3. Downloading and configuring Daloradius to manage users via a web interface, connecting it to the same radius database. 4. Creating a test user via the Daloradius interface and verifying authentication works via the radtest command.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views10 pages

Manual de Freradius - Radius - Dalo 2020

FreeRADIUS and Daloradius are installed and configured on Ubuntu 18.04. Key steps include: 1. Installing MariaDB and creating a radius database. 2. Installing FreeRADIUS and configuring it to connect to the radius database. 3. Downloading and configuring Daloradius to manage users via a web interface, connecting it to the same radius database. 4. Creating a test user via the Daloradius interface and verifying authentication works via the radtest command.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

FreeRADIUS y Daloradius en Ubuntu 18.

04

# apt update

# apt -y upgrade

# reboot

Paso 1 Instalar Servidor Apache y PHP


# apt -y install apache2 php libapache2-mod-php php-{gd,common,mail,mail-mime,mysql,pear,db,mbstring,xml,curl} unzip wget

Paso 2 Instalar MariaDB y crear base de datos

Instalar software-properties-common

# apt-get install software-properties-common

Importar MariaDB gpg key

# apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

Agregar los repositorios

# add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.4/ubuntu $(lsb_release -cs) main"


Instalar MariaDB

# apt update
# apt -y install mariadb-server mariadb-client

# mysql_secure_installation

Enter current password for root (enter for none):

Switch to unix_socket authentication [Y/n] n

Change the root password? [Y/n] Y


New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!

Remove anonymous users? [Y/n] Y


Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Instalar y Configurar FreeRADIUS

# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE radius;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radius";
Query OK, 0 rows affected (0.114 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> quit
Bye

Puede ver las versiones de freeradius disponibles en su Ubuntu.


# apt policy freeradius

Instalar los paquetes FreeRadius desde el repositorio oficial de APT de Ubuntu


# apt -y install freeradius freeradius-mysql freeradius-utils

Crear un enlace símbolico para el módulo sql en /etc/freeradius/3.0/mods-enabled/


# ln -s /etc/freeradius/3.0/mods-available/sql /etc/freeradius/3.0/mods-enabled/
Configure el módulo SQL y cambiar los parámetros de conexión de la base de datos para adaptarse a su entorno.
# nano /etc/freeradius/3.0/mods-enabled/sql

sql {
driver = "rlm_sql_mysql"

dialect = "mysql"

# Connection info:
server = "localhost"
port = 3306
login = "radius"
password = "radius"

# 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"

# chgrp -h freerad /etc/freeradius/3.0/mods-available/sql


# chown -R freerad:freerad /etc/freeradius/3.0/mods-enabled/sql

# systemctl restart freeradius.service


Instalar y configurar Daloradius en Ubuntu 18.04
Bajar y descomprimir daloradius
# wget https://github.com/lirantal/daloradius/archive/master.zip
# unzip master.zip
Renombrar carpeta
# mv daloradius-master daloradius
# cd daloradius
Importar tablas mysql de Daloradius
# mysql -u root -p radius < contrib/db/fr2-mysql-daloradius-and-freeradius.sql
# mysql -u root -p radius < contrib/db/mysql-daloradius.sql
# cd ..
Cambiar los permisos para la carpeta http y establecer los permisos para el archivo de configuración de daloradius
# mv daloradius /var/www/html/
# chown -R www-data:www-data /var/www/html/daloradius/
# chmod 664 /var/www/html/daloradius/library/daloradius.conf.php
Ajustar la información de la base de datos MySQL
# nano /var/www/html/daloradius/library/daloradius.conf.php
$configValues['CONFIG_DB_ENGINE'] = 'mysqli';
$configValues['CONFIG_DB_HOST'] = 'localhost';
$configValues['CONFIG_DB_PORT'] = '3306';
$configValues['CONFIG_DB_USER'] = 'radius';
$configValues['CONFIG_DB_PASS'] = 'radius';
$configValues['CONFIG_DB_NAME'] = 'radius';
# systemctl restart freeradius.service apache2
Verificar el servicio
# journalctl -xe

Ingresar a el servidor por el navegador


Usuario: administrator contraseña:radius
Dar de alta usuario

Ahora se crea un usuario de prueba que será jrubio password 123


Verificar servicio de usuario

Ir a la opción de Management y List Users.


Dar click en el usuario, ejemplo: jrubio y Edit User.

Dar click en Test Connectivity y después Perform Test:

Resultado correcto:
Resultado correcto en modo comando:
Ahora que se tiene el usuario se realiza un test de conexión desde la consola. Para ello se ejecuta el comando como root y si devuelve
Access-Accept es que todo ha ido bien:

#radtest jrubio 123 127.0.0.1 1581 testing123


Sent Access-Request Id 146 from 0.0.0.0:35221 to 127.0.0.1:1812 length 76
User-Name = "jrubio"
User-Password = "123"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1581
Message-Authenticator = 0x00
Cleartext-Password = "123"
Received Access-Accept Id 146 from 127.0.0.1:1812 to 0.0.0.0:0 length 20

You might also like