{"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<p>In this tutorial, we are going to learn how to install and configure FreeRADIUS with daloRADIUS on Fedora 29.<\/p>\n\n\n\n<p>FreeRADIUS is the most popular opensource, high performance and highly configurable multi-protocol RADIUS server across the globe. RADIUS stands for <strong>R<\/strong>emote <strong>A<\/strong>uthentication <strong>D<\/strong>ial In <strong>U<\/strong>ser <strong>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<p>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&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing FreeRADIUS with daloRADIUS on Fedora 29<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install FreeRADIUS on Fedora 29<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequsites<\/h3>\n\n\n\n<p>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<p>To disable SELinux, run the command below and reboot your server;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo sed -i 's\/=enforcing\/=disabled\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n<p>To put SELinux in a permissive mode, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sed -i 's\/=enforcing\/=permissive\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n<p>Also, ensure that you have <a href=\"https:\/\/kifarunix.com\/how-to-install-lamp-linux-apache-mysql-php-stack-on-fedora-28-29\/\" target=\"_blank\" rel=\"noopener\">LAMP stack on Fedora 29\/Fedora 28<\/a> up and running.<\/p>\n\n\n\n<p>Install the following extra PHP extensions that might not have been installed on the LAMP stack guide above.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install php-devel php-xml php-cli mod_php<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create FreeRADIUS Database<\/h3>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>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<h3 class=\"wp-block-heading\">Install FreeRADIUS on Fedora 29<\/h3>\n\n\n\n<p>Next, run the command below to install FreeRADIUS on Fedora 29.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install freeradius freeradius-utils freeradius-mysql<\/code><\/pre>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>systemctl start radiusd.service\nsystemctl enable radiusd.service<\/code><\/pre>\n\n\n\n<p>If firewalld is running, open access to RADIUS service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>firewall-cmd --add-service=radius --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Note that RADIUS server, <code>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<pre class=\"wp-block-preformatted\"><code>netstat -alunp4 | grep -E '1812|1813'\nudp        0      0 127.0.0.1:18120         0.0.0.0:*                           17201\/radiusd       \nudp        0      <strong>0 0.0.0.0:1812<\/strong>            0.0.0.0:*                           17201\/radiusd       \nudp        0      <strong>0 0.0.0.0:1813<\/strong>            0.0.0.0:*                           17201\/radiusd<\/code><\/pre>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>systemctl stop radiusd<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>radiusd -X<\/code><\/pre>\n\n\n\n<p>You should be able to see that RADIUS server is <code>Ready to process requests<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\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\n<strong>Ready to process requests<\/strong><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure FreeRADIUS on Fedora 29<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Create FreeRADIUS Database Schema<\/h4>\n\n\n\n<p>Run the command below to import the RADIUS database located under <code>\/etc\/raddb\/mods-config\/sql\/main\/mysql\/schema.sql<\/code>, to the RADIUS database, <code>radius<\/code>, we created above.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p radius &lt; \/etc\/raddb\/mods-config\/sql\/main\/mysql\/schema.sql<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Configure RADIUS SQL<\/h4>\n\n\n\n<p>Enable RADIUS SQL module by creating a symbolic link from the RADIUS available SQL modules;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ln -s \/etc\/raddb\/mods-available\/sql \/etc\/raddb\/mods-enabled\/<\/code><\/pre>\n\n\n\n<p>Edit the enabled RADIUS SQL module and configure MySQL database connection parameters such that the configuration looks like;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\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        <strong>dialect = \"mysql\"<\/strong>\n\n        # Connection info:\n        #\n        <strong>server = \"localhost\"<\/strong>\n<strong>        port = 3306<\/strong>\n<strong>        login = \"radius\"<\/strong>\n<strong>        password = \"P@SSWORD\"<\/strong>\n\n        # Database table configuration for everything except Oracle\n        <strong>radius_db = \"radius\"<\/strong><\/code><\/pre>\n\n\n\n<p>Configure RADIUS server to read clients from the database by uncommenting the line, <code># read_clients = yes<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\n        # Set to 'yes' to read radius clients from the database ('nas' table)\n        # Clients will ONLY be read on server startup.\n        <strong>read_clients = yes<\/strong>\n...<\/code><\/pre>\n\n\n\n<p>Save the file and quit.<\/p>\n\n\n\n<p>Change the ownership group of the RADIUS SQL module symbolic link, <code>\/etc\/raddb\/mods-enabled\/sql<\/code>, to <code>radiusd<\/code> group as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chgrp -h radiusd \/etc\/raddb\/mods-enabled\/sql<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ls -alh \/etc\/raddb\/mods-enabled\/sql\nlrwxrwxrwx. 1 root <strong>radiusd<\/strong> 29 Jan 11 20:25 \/etc\/raddb\/mods-enabled\/sql -&gt; \/etc\/raddb\/mods-available\/sql<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install and Configure daloRADIUS on Fedora 29<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install daloRADIUS on Fedora 29<\/h3>\n\n\n\n<p>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 <a href=\"https:\/\/sourceforge.net\/projects\/daloradius\/\" target=\"_blank\" rel=\"noopener\">Sourceforge<\/a> and grab it. You can simply copy the link and use <code>wget<\/code> command to download it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/liquidtelecom.dl.sourceforge.net\/project\/daloradius\/daloradius\/daloradius0.9-9\/daloradius-0.9-9.tar.gz<\/code><\/pre>\n\n\n\n<p>Extract the archive once the download is complete.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar -xzf daloradius-0.9-9.tar.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure daloRADIUS on Fedora 29<\/h3>\n\n\n\n<p>Move the extracted daloRADIUS archive your web server document root directory renaming it as follows;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mv daloradius-0.9-9 \/var\/www\/html\/daloradius<\/code><\/pre>\n\n\n\n<p>Import daloRADIUS MySQL tables into FreeRADIUS database created above;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p radius &lt; \/var\/www\/html\/daloradius\/contrib\/db\/fr2-mysql-daloradius-and-freeradius.sql\nmysql -u root -p radius &lt; \/var\/www\/html\/daloradius\/contrib\/db\/mysql-daloradius.sql<\/code><\/pre>\n\n\n\n<p>Set proper ownership and permission of the daloRADIUS configuration to apache web user and group<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chown -R apache.apache \/var\/www\/html\/daloradius\/<\/code><\/pre>\n\n\n\n<p>Set the permissions for the daloRADIUS configuration file as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chown 664 \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n<p>Edit the daloRADIUS configuration file,<code>&nbsp;\/var\/www\/html\/daloradius\/library\/daloradius.conf.ph<\/code>p, and set the MySQL connection parameters as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$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'; <strong>&lt; set the RADIUS database user<\/strong>\n$configValues['CONFIG_DB_PASS'] = 'P@SSWORD'; <strong>&lt; set user password<\/strong>\n$configValues['CONFIG_DB_NAME'] = 'radius'; <strong>&lt; Set RADIUS database<\/strong><\/code><\/pre>\n\n\n\n<p>Save the file and quit.<\/p>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>systemctl restart httpd radiusd mariadb<\/code><\/pre>\n\n\n\n<p>Access daloRADIUS web interface using the link, <code>http:\/\/server_IP\/daloradius<\/code>. This should take you to the login page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"855\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/daloRADIUS-login.png\" alt=\"Install and Configure FreeRADIUS with daloRADIUS on Fedora 29\" class=\"wp-image-2009\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/daloRADIUS-login.png 856w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/daloRADIUS-login-768x767.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/figure>\n\n\n\n<p>The default login credentials for daloRADIUS are, user: <code>administrator<\/code> and password: <code>radius<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1871\" height=\"907\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/daloRADIUS-UI.png\" alt=\"\" class=\"wp-image-2010\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/daloRADIUS-UI.png 1871w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/daloRADIUS-UI-768x372.png 768w\" sizes=\"(max-width: 1871px) 100vw, 1871px\" \/><\/figure>\n\n\n\n<p>If you encounter the error, <code>Error Message: DB Error: extension not found<\/code>, while logging in, edit the daloRADIUS configuration file, <code>\/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code> and change the value of <code>$configValues['CONFIG_DB_ENGINE'] = 'mysql';<\/code> from <code>mysql<\/code> to <code>mysqli<\/code> such that the line looks like <code>$configValues['CONFIG_DB_ENGINE'] = 'mysqli';<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other tutorials<\/h2>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-freeradius-with-daloradius-on-debian-11-debian-10\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install FreeRADIUS with daloRADIUS on Debian 11\/Debian 10<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-freeradius-with-daloradius-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install FreeRADIUS with daloRADIUS on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-freeradius-with-daloradius-on-debian-9\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install FreeRADIUS with daloRADIUS on Debian 9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to learn how to install and configure FreeRADIUS with daloRADIUS on Fedora 29. FreeRADIUS is the most popular opensource,<\/p>\n","protected":false},"author":1,"featured_media":10647,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121],"tags":[296,4186,4185,297,4184],"class_list":["post-2013","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-daloradius","tag-daloradius-fedora","tag-fedora-freeradius","tag-freeradius","tag-install-freeradius-fedora","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2013"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2013"}],"version-history":[{"count":10,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2013\/revisions"}],"predecessor-version":[{"id":21099,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2013\/revisions\/21099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/10647"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}