{"id":2013,"date":"2019-01-12T00:39:27","date_gmt":"2019-01-11T21:39:27","guid":{"rendered":"http:\/\/kifarunix.com\/?p=2013"},"modified":"2024-03-11T22:06:03","modified_gmt":"2024-03-11T19:06:03","slug":"install-and-configure-freeradius-with-daloradius-on-fedora-29-2","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-and-configure-freeradius-with-daloradius-on-fedora-29-2\/","title":{"rendered":"Install and Configure FreeRADIUS with daloRADIUS on Fedora 29"},"content":{"rendered":"\n
In this tutorial, we are going to learn how to install and configure FreeRADIUS with daloRADIUS on Fedora 29.<\/p>\n\n\n\n
FreeRADIUS is the most popular opensource, high performance and highly configurable multi-protocol RADIUS server across the globe. RADIUS stands for R<\/strong>emote A<\/strong>uthentication D<\/strong>ial In U<\/strong>ser S<\/strong>ervice. It provides centralized network authentication, authorization and accounting services for most tier 1 Internet Service Providers (ISPs), cellular network providers and corporate and educational networks. You can read more about FreeRADIUS on their documentation page.<\/p>\n\n\n\n daloRADIUS on the other hand is an advanced web management platform for RADIUS server. It provides graphical reporting, Access Control Lists, intergration with Google maps for geo-location, accounting, billing…<\/p>\n\n\n\n Before kicking off on how to installation FreeRADIUS with daloRADIUS on Fedora 29, it would be a good idea to disable SELinux or put it in permission mode unless you are comfortable managing it.<\/p>\n\n\n\n To disable SELinux, run the command below and reboot your server;<\/p>\n\n\n\n To put SELinux in a permissive mode, run the command below;<\/p>\n\n\n\n Also, ensure that you have LAMP stack on Fedora 29\/Fedora 28<\/a> up and running.<\/p>\n\n\n\n Install the following extra PHP extensions that might not have been installed on the LAMP stack guide above.<\/p>\n\n\n\n In this step, you are required to create the RADIUS database and user with all privileges on that database. Login to MySQL\/MariaDB as root and run the commands below to create a database called radius and a user called radius.<\/p>\n\n\n\n Next, run the command below to install FreeRADIUS on Fedora 29.<\/p>\n\n\n\n Once the installation is done, run the commands below to start and enable FreeRADIUS service to run on system reboot.<\/p>\n\n\n\n If firewalld is running, open access to RADIUS service.<\/p>\n\n\n\n Note that RADIUS server, To verify that RADIUS server is working fine, stop the service and run RADIUS server in debug mode as shown below;<\/p>\n\n\n\n You should be able to see that RADIUS server is Run the command below to import the RADIUS database located under Enable RADIUS SQL module by creating a symbolic link from the RADIUS available SQL modules;<\/p>\n\n\n\n Edit the enabled RADIUS SQL module and configure MySQL database connection parameters such that the configuration looks like;<\/p>\n\n\n\n Configure RADIUS server to read clients from the database by uncommenting the line, Save the file and quit.<\/p>\n\n\n\n Change the ownership group of the RADIUS SQL module symbolic link, Next, install the RADIUS web management tool, daloRADIUS. In this case, we will do the installation from source. Hence, to get the latest release of daloRADIUS, navigate to Sourceforge<\/a> and grab it. You can simply copy the link and use Extract the archive once the download is complete.<\/p>\n\n\n\n Move the extracted daloRADIUS archive your web server document root directory renaming it as follows;<\/p>\n\n\n\n Import daloRADIUS MySQL tables into FreeRADIUS database created above;<\/p>\n\n\n\n Set proper ownership and permission of the daloRADIUS configuration to apache web user and group<\/p>\n\n\n\n Set the permissions for the daloRADIUS configuration file as shown below;<\/p>\n\n\n\n Edit the daloRADIUS configuration file, Save the file and quit.<\/p>\n\n\n\n The configuration of both FreeRADIUS and daloRADIUS is done. Restart the Apache, RADIUS and MySQL database and access your daloRADIUS web user interface as shown below;<\/p>\n\n\n\n Access daloRADIUS web interface using the link, The default login credentials for daloRADIUS are, user: If you encounter the error, Install FreeRADIUS with daloRADIUS on Debian 11\/Debian 10<\/a><\/p>\n\n\n\n Install FreeRADIUS with daloRADIUS on Ubuntu 20.04<\/a><\/p>\n\n\n\nInstalling FreeRADIUS with daloRADIUS on Fedora 29<\/h2>\n\n\n\n
Install FreeRADIUS on Fedora 29<\/h3>\n\n\n\n
Prerequsites<\/h3>\n\n\n\n
sudo sed -i 's\/=enforcing\/=disabled\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n
sed -i 's\/=enforcing\/=permissive\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n
dnf install php-devel php-xml php-cli mod_php<\/code><\/pre>\n\n\n\n
Create FreeRADIUS Database<\/h3>\n\n\n\n
mysql -u root -p\ncreate database radius;\ngrant all privileges on radius.* to radius@localhost identified by 'P@SSWORD';\nflush privileges;\nquit<\/code><\/pre>\n\n\n\n
Install FreeRADIUS on Fedora 29<\/h3>\n\n\n\n
dnf install freeradius freeradius-utils freeradius-mysql<\/code><\/pre>\n\n\n\n
systemctl start radiusd.service\nsystemctl enable radiusd.service<\/code><\/pre>\n\n\n\n
firewall-cmd --add-service=radius --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n
radiusd<\/code>, is listening on UDP ports 1812 and 1813. To verify that the ports are opened, run the command below<\/p>\n\n\n\n
netstat -alunp4 | grep -E '1812|1813'\nudp 0 0 127.0.0.1:18120 0.0.0.0:* 17201\/radiusd \nudp 0 0 0.0.0.0:1812<\/strong> 0.0.0.0:* 17201\/radiusd \nudp 0 0 0.0.0.0:1813<\/strong> 0.0.0.0:* 17201\/radiusd<\/code><\/pre>\n\n\n\n
systemctl stop radiusd<\/code><\/pre>\n\n\n\n
radiusd -X<\/code><\/pre>\n\n\n\n
Ready to process requests<\/code>.<\/p>\n\n\n\n
...\nlisten {\ntype = \"auth\"\nipaddr = 127.0.0.1\nport = 18120\n}\nListening on auth address * port 1812 bound to server default\nListening on acct address * port 1813 bound to server default\nListening on auth address :: port 1812 bound to server default\nListening on acct address :: port 1813 bound to server default\nListening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel\nListening on proxy address * port 33637\nListening on proxy address :: port 37947\nReady to process requests<\/strong><\/code><\/pre>\n\n\n\n
Configure FreeRADIUS on Fedora 29<\/h3>\n\n\n\n
Create FreeRADIUS Database Schema<\/h4>\n\n\n\n
\/etc\/raddb\/mods-config\/sql\/main\/mysql\/schema.sql<\/code>, to the RADIUS database,
radius<\/code>, we created above.<\/p>\n\n\n\n
mysql -u root -p radius < \/etc\/raddb\/mods-config\/sql\/main\/mysql\/schema.sql<\/code><\/pre>\n\n\n\n
Configure RADIUS SQL<\/h4>\n\n\n\n
ln -s \/etc\/raddb\/mods-available\/sql \/etc\/raddb\/mods-enabled\/<\/code><\/pre>\n\n\n\n
...\n # The dialect of SQL you want to use, this should usually match\n # the driver you selected above.\n #\n # If you're using rlm_sql_null, then it should be the type of\n # database the logged queries are going to be executed against.\n #dialect = \"sqlite\"\n dialect = \"mysql\"<\/strong>\n\n # Connection info:\n #\n server = \"localhost\"<\/strong>\n port = 3306<\/strong>\n login = \"radius\"<\/strong>\n password = \"P@SSWORD\"<\/strong>\n\n # Database table configuration for everything except Oracle\n radius_db = \"radius\"<\/strong><\/code><\/pre>\n\n\n\n
# read_clients = yes<\/code>.<\/p>\n\n\n\n
...\n # Set to 'yes' to read radius clients from the database ('nas' table)\n # Clients will ONLY be read on server startup.\n read_clients = yes<\/strong>\n...<\/code><\/pre>\n\n\n\n
\/etc\/raddb\/mods-enabled\/sql<\/code>, to
radiusd<\/code> group as shown below;<\/p>\n\n\n\n
chgrp -h radiusd \/etc\/raddb\/mods-enabled\/sql<\/code><\/pre>\n\n\n\n
ls -alh \/etc\/raddb\/mods-enabled\/sql\nlrwxrwxrwx. 1 root radiusd<\/strong> 29 Jan 11 20:25 \/etc\/raddb\/mods-enabled\/sql -> \/etc\/raddb\/mods-available\/sql<\/code><\/pre>\n\n\n\n
Install and Configure daloRADIUS on Fedora 29<\/h2>\n\n\n\n
Install daloRADIUS on Fedora 29<\/h3>\n\n\n\n
wget<\/code> command to download it<\/p>\n\n\n\n
wget https:\/\/liquidtelecom.dl.sourceforge.net\/project\/daloradius\/daloradius\/daloradius0.9-9\/daloradius-0.9-9.tar.gz<\/code><\/pre>\n\n\n\n
tar -xzf daloradius-0.9-9.tar.gz<\/code><\/pre>\n\n\n\n
Configure daloRADIUS on Fedora 29<\/h3>\n\n\n\n
mv daloradius-0.9-9 \/var\/www\/html\/daloradius<\/code><\/pre>\n\n\n\n
mysql -u root -p radius < \/var\/www\/html\/daloradius\/contrib\/db\/fr2-mysql-daloradius-and-freeradius.sql\nmysql -u root -p radius < \/var\/www\/html\/daloradius\/contrib\/db\/mysql-daloradius.sql<\/code><\/pre>\n\n\n\n
chown -R apache.apache \/var\/www\/html\/daloradius\/<\/code><\/pre>\n\n\n\n
chown 664 \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n
\/var\/www\/html\/daloradius\/library\/daloradius.conf.ph<\/code>p, and set the MySQL connection parameters as shown below;<\/p>\n\n\n\n
vim \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n
$configValues['DALORADIUS_VERSION'] = '0.9-9';\n$configValues['FREERADIUS_VERSION'] = '2';\n$configValues['CONFIG_DB_ENGINE'] = 'mysql';\n$configValues['CONFIG_DB_HOST'] = 'localhost';\n$configValues['CONFIG_DB_PORT'] = '3306';\n$configValues['CONFIG_DB_USER'] = 'radius'; < set the RADIUS database user<\/strong>\n$configValues['CONFIG_DB_PASS'] = 'P@SSWORD'; < set user password<\/strong>\n$configValues['CONFIG_DB_NAME'] = 'radius'; < Set RADIUS database<\/strong><\/code><\/pre>\n\n\n\n
systemctl restart httpd radiusd mariadb<\/code><\/pre>\n\n\n\n
http:\/\/server_IP\/daloradius<\/code>. This should take you to the login page.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
administrator<\/code> and password:
radius<\/code>.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
Error Message: DB Error: extension not found<\/code>, while logging in, edit the daloRADIUS configuration file,
\/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code> and change the value of
$configValues['CONFIG_DB_ENGINE'] = 'mysql';<\/code> from
mysql<\/code> to
mysqli<\/code> such that the line looks like
$configValues['CONFIG_DB_ENGINE'] = 'mysqli';<\/code><\/p>\n\n\n\n
Other tutorials<\/h2>\n\n\n\n