top of page

Working Mothers

Public·25 members

How To Install FreeRADIUS And DaloRADIUS On Ubuntu 18.04 LTS __HOT__



FreeRADIUS is a free and open-source client/server protocol that provides centralized network authentication on systems. It is a high-performance and feature-rich RADIUS server ships with both server and client, development libraries and RADIUS related utilities. RADIUS allows you to maintain user-profiles and track usage for billing from the central server. It provides support for various databases, including, OpenLDAP, MySQL, Redis, Microsoft AD, Apache Cassandra, PostgreSQL, etc.if(typeof ez_ad_units!='undefined')ez_ad_units.push([[728,90],'howtoforge_com-box-3','ezslot_9',106,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-box-3-0');daloRADIUS is a web-based application for managing RADIUS server. It is an advanced web-based application for managing hotspots and ISP deployments. It is written in PHP and JavaScript and supports MySQL, PostgreSQL, SQLite, MsSQL as a database backend. It comes with a rich set of features such as, Access Control Lists, graphical reporting, billing engine, graphical reporting, and accounting, create, delete and edit users, create, delete and edit HotSpot, Create, delete and edit NAS, and much more.FreeRADIUS works as the back-end while daloRADIUS works as the front-end.In this tutorial, I will explain step by step how to install FreeRADIUS server and Daloradius web client on Ubuntu 18.04 LTS.RequirementsA server running Ubuntu 18.04.A root password is set up on your server.Getting StartedFirst, update your system's package to the latest version with the following command:apt-get update -y apt-get upgrade -yOnce all the packages are updated, restart your system to apply all the configuration changes.(adsbygoogle=window.adsbygoogle[]).push();Install LAMP ServerFirst, you will need to install Apache, MariaDB, PHP and other required packages to your system. You can install all of them with the following command:apt-get install apache2 mariadb-server php libapache2-mod-php php-mail php-mail-mime php-mysql php-gd php-common php-pear php-db php-mbstring php-xml php-curl unzip wget -yOnce all the packages are installed, you can proceed to the next step.Configure Database for FreeRADIUSBy default, MariaDB is not secured. So you will need to secure it first. You can secure it with the following command:mysql_secure_installationAnswer all the questions as shown below:if(typeof ez_ad_units!='undefined')ez_ad_units.push([[728,90],'howtoforge_com-medrectangle-4','ezslot_2',108,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-medrectangle-4-0');Enter current password for root (enter for none): Just press the EnterSet root password? [Y/n]: YNew password: Enter passwordRe-enter new password: Repeat passwordRemove anonymous users? [Y/n]: YDisallow root login remotely? [Y/n]: YRemove test database and access to it? [Y/n]: YReload privilege tables now? [Y/n]: YNext, you will need to create a database and user for FreeRADIUS. To do so, log in to MariaDB shell with the following command:mysql -u root -pEnter your root password when prompt then create a database and user with the following command:MariaDB [(none)]> CREATE DATABASE radiusdb; MariaDB [(none)]> GRANT ALL ON radiusdb.* TO [email protected] IDENTIFIED BY "password";Next, flush the privileges and exit from the MariaDB shell with the following command:MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;Once you have finished, you can proceed to the next step.Install FreeRADIUSBy default, FreeRADIUS is available in the Ubuntu 18.04 default repository. You can install it with the following command:if(typeof ez_ad_units!='undefined')ez_ad_units.push([[580,400],'howtoforge_com-box-4','ezslot_8',110,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-box-4-0');apt-get install freeradius freeradius-mysql freeradius-utilsOnce installed, import the freeradius MySQL database schema with the following command:mysql -u root -p radiusdb use radiusdb;Next, list the created tables using the following command:MariaDB [radiusdb]> show tables;You should see the following output:+--------------------+ Tables_in_radiusdb +--------------------+ nas radacct radcheck radgroupcheck radgroupreply radpostauth radreply radusergroup +--------------------+Next, exit from the MariaDB shell with the following command:MariaDB [radiusdb]> EXIT;Next, you will need to define your database connection details in freeradius SQL module. You can do it by editing /etc/freeradius/3.0/mods-enabled/sql file:nano /etc/freeradius/3.0/mods-enabled/sqlMake the following changes as per your database:sql driver = "rlm_sql_mysql"dialect = "mysql"# Connection info:server = "localhost"port = 3306login = "radius"password = "password"# Database table configuration for everything except Oracleradius_db = "radiusdb"read_clients = yesclient_table = "nas"Save and close the file, when you are finished. Then, change the ownership of /etc/freeradius/3.0/mods-enabled/sql with the following command:chgrp -h freerad /etc/freeradius/3.0/mods-available/sql chown -R freerad:freerad /etc/freeradius/3.0/mods-enabled/sqlFinally, restart freeradius service to apply all the configuration changes:systemctl restart freeradiusYou can also verify the freeradius status with the following command:systemctl status freeradiusYou should see the following output:? freeradius.service - FreeRADIUS multi-protocol policy server Loaded: loaded (/lib/systemd/system/freeradius.service; disabled; vendor preset: enabled) Active: active (running) since Wed 2019-08-07 09:20:34 UTC; 14s ago Docs: man:radiusd(8) man:radiusd.conf(5) Process: 45159 ExecStart=/usr/sbin/freeradius $FREERADIUS_OPTIONS (code=exited, status=0/SUCCESS) Process: 45143 ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout (code=exited, status=0/SUCCESS) Main PID: 45161 (freeradius) Tasks: 6 (limit: 4650) CGroup: /system.slice/freeradius.service ??45161 /usr/sbin/freeradiusOnce you have finished, you can proceed to the next step.Install daloRADIUSNext, you will need to install daloRADIUS to manage FreeRADIUS from the web browser.First, download the latest version of daloRADIUS from the Git repository with the following command:wget downloaded, unzip the downloaded file with the following command:unzip master.zipNext, move the extracted directory to the Apache web root directory with the following command:mv daloradius-master /var/www/html/daloradiusNext, import daloRADIUS mysql tables to radiusdb with the following command:cd /var/www/html/daloradius mysql -u root -p radiusdb mysql -u root -p radiusdb chmod 664 /var/www/html/daloradius/library/daloradius.conf.phpNext, open daloradius.conf.php file and define the database connection details:nano /var/www/html/daloradius/library/daloradius.conf.phpMake the following changes that match your database:$configValues['DALORADIUS_VERSION'] = '1.1-1';$configValues['DALORADIUS_DATE'] = '28 Jul 2019';$configValues['FREERADIUS_VERSION'] = '2';$configValues['CONFIG_DB_ENGINE'] = 'mysqli';$configValues['CONFIG_DB_HOST'] = 'localhost';$configValues['CONFIG_DB_PORT'] = '3306';$configValues['CONFIG_DB_USER'] = 'radius';$configValues['CONFIG_DB_PASS'] = 'password';$configValues['CONFIG_DB_NAME'] = 'radiusdb';Save and close the file. Then, restart freeradius and apache service with the following command:systemctl restart freeradius systemctl restart apache2You can also check the status of Apache web service with the following command:systemctl status apache2You should see the following command:? apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d ??apache2-systemd.conf Active: active (running) since Wed 2019-08-07 09:25:56 UTC; 4min 25s ago Process: 45483 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS) Process: 45489 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 45505 (apache2) Tasks: 11 (limit: 4650) CGroup: /system.slice/apache2.service ??45505 /usr/sbin/apache2 -k start ??45510 /usr/sbin/apache2 -k start ??45511 /usr/sbin/apache2 -k start ??45512 /usr/sbin/apache2 -k start ??45513 /usr/sbin/apache2 -k start ??45517 /usr/sbin/apache2 -k start ??45519 /usr/sbin/apache2 -k start ??45520 /usr/sbin/apache2 -k start ??45521 /usr/sbin/apache2 -k start ??45527 /usr/sbin/apache2 -k start ??45528 /usr/sbin/apache2 -k startAug 07 09:25:55 openshift systemd[1]: Starting The Apache HTTP Server...Aug 07 09:25:56 openshift systemd[1]: Started The Apache HTTP Server.Once you have done, you can proceed to the next step.Access daloRADIUS Web InterfaceFreeRADIUS and daloRADIUS are now installed and configured. It's time to access daloRADIUS web interface. To access the web inetrface, open your web browser and type the URL -server-ip/daloradius/login.php. You will be redirected to the daloRADIUS login page:Now, provide default username and password as administrator / radius, and click on the Login button. You should see the daloRADIUS default dashboard in the following page:Congratulations! you have successfully installed and configured FreeRADIUS and daloRADIUS on your Ubuntu 18.04 server. For more information, you can visit the official documentation at Feel free to ask me if you have any questions. About Hitesh JethvaOver 8 years of experience as a Linux system administrator. My skills include a depth knowledge of Redhat/Centos, Ubuntu Nginx and Apache, Mysql, Subversion, Linux, Ubuntu, web hosting, web server, Squid proxy, NFS, FTP, DNS, Samba, LDAP, OpenVPN, Haproxy, Amazon web services, WHMCS, OpenStack Cloud, Postfix Mail Server, Security etc. view as pdf printShare this page:Suggested articles36 Comment(s)Add commentName *Email *tinymce.init(selector:"textarea#commentedit",theme:"modern",height:100,apply_source_formatting:true,remove_linebreaks:false,menubar:false,plugins:["link"],content_css:" ",toolbar:"undo redo );CommentsBy: jer.bee Reply Can't get passed here unfortunately: PERMISSION DENIED (sudo doesn't work either, probably related to the DB ownership)Once installed, import the freeradius MySQL database schema with the following command:mysql -u root -p radiusdb By: concept21 Reply very nice. Thank You.By: Norm Reply I am also stuck at the same location as jer.bee. Is there something missing?By: norman Reply I got passed the importing the schema . Now I am stuck at starting the freeradius service. Error is "failed to start freeradius multi-protocol policy server By: Mike Reply Hi Hitesh,Thanks for the detailed instructions; my goals were actually to set up:1. user's authentication via freeradius through LDAP ADC (NPS on Windos 16 is not working right);2. NAC for machines per MAC addresses.Is there a quick reference to howto that - in relation to this installation?Thanks!By: Leszek Reply Thanks. It works.Actually what kind of authentication does this provide ?By: Leszek Reply Freeradius and Apache on my server did not autostart. You might want to add:systemctl enable apache2systemctl enable freeradiussomewhere at the end of the tutorial.By: Fausto J. González Reply Nice Job!Congratulations an thanks you!one question: how can say to program "one user, one device only"?ThanksBy: lee Reply I followed the steps and everything looks right. but when login from GUI by using administrator/radius, then got this error:Database connection error Error Message: DB Error: connect failedany idea?thanks fLeeBy: Machkonti Reply to bypass permissions for db try to copy schema.sql to other locationm change ownership to user privileges and then run mysql import command:cp /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql /chown -R [user]:[usergrp] schema.sqlmysql -u root -p radiusdb schema.sql However, i have some issues with after config. Everithing going right till i try to login in daloradis panel.http://[serverip]/daloradius/login.php is working, but when i enter default user and pass [administrator/radius] i recieve http error 500, can't figure it out where is the problemBy: Steve Reply See -requests/57/By: BP Reply I also had a problem with the step schema import mysql -u root -p radiusdb By: Robert Reply Great guide! worked without any trouble.By: Anish Reply Getting Error while testing the radius with NTRadping tool"Ready to process requestsIgnoring request to auth address * port 1812 bound to server default from unknown client 192.168.1.2 port 49234 proto udp"By: Roshan Reply Please help me to fix the issue: sudo systemctl status freeradius? freeradius.service - FreeRADIUS multi-protocol policy server Loaded: loaded (/lib/systemd/system/freeradius.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2019-12-26 10:47:14 +0545; 1s ago Docs: man:radiusd(8) man:radiusd.conf(5) Process: 4412 ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout (code=exited, st ??????? 26 10:47:14 Moth3r systemd[1]: Failed to start FreeRADIUS multi-protocol policy server.lines 1-10/10 (END) By: X Reply I guess you have a typo here:




How to Install FreeRADIUS and daloRADIUS on Ubuntu 18.04 LTS


About

Welcome to the group! You can connect with other members, ge...
bottom of page