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

Installing 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

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

sudo sed -i 's\/=enforcing\/=disabled\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n

To put SELinux in a permissive mode, run the command below;<\/p>\n\n\n\n

sed -i 's\/=enforcing\/=permissive\/' \/etc\/selinux\/config<\/code><\/pre>\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

dnf install php-devel php-xml php-cli mod_php<\/code><\/pre>\n\n\n\n

Create FreeRADIUS Database<\/h3>\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

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

Next, run the command below to install FreeRADIUS on Fedora 29.<\/p>\n\n\n\n

dnf install freeradius freeradius-utils freeradius-mysql<\/code><\/pre>\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

systemctl start radiusd.service\nsystemctl enable radiusd.service<\/code><\/pre>\n\n\n\n

If firewalld is running, open access to RADIUS service.<\/p>\n\n\n\n

firewall-cmd --add-service=radius --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n

Note that RADIUS server, 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

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

systemctl stop radiusd<\/code><\/pre>\n\n\n\n
radiusd -X<\/code><\/pre>\n\n\n\n

You should be able to see that RADIUS server is 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

Run the command below to import the RADIUS database located under \/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

Enable RADIUS SQL module by creating a symbolic link from the RADIUS available SQL modules;<\/p>\n\n\n\n

ln -s \/etc\/raddb\/mods-available\/sql \/etc\/raddb\/mods-enabled\/<\/code><\/pre>\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

...\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

Configure RADIUS server to read clients from the database by uncommenting the line, # 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

Save the file and quit.<\/p>\n\n\n\n

Change the ownership group of the RADIUS SQL module symbolic link, \/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

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

Extract the archive once the download is complete.<\/p>\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

Move the extracted daloRADIUS archive your web server document root directory renaming it as follows;<\/p>\n\n\n\n

mv daloradius-0.9-9 \/var\/www\/html\/daloradius<\/code><\/pre>\n\n\n\n

Import daloRADIUS MySQL tables into FreeRADIUS database created above;<\/p>\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

Set proper ownership and permission of the daloRADIUS configuration to apache web user and group<\/p>\n\n\n\n

chown -R apache.apache \/var\/www\/html\/daloradius\/<\/code><\/pre>\n\n\n\n

Set the permissions for the daloRADIUS configuration file as shown below;<\/p>\n\n\n\n

chown 664 \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n

Edit the daloRADIUS configuration file, \/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

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

systemctl restart httpd radiusd mariadb<\/code><\/pre>\n\n\n\n

Access daloRADIUS web interface using the link, http:\/\/server_IP\/daloradius<\/code>. This should take you to the login page.<\/p>\n\n\n\n

\"Install<\/figure>\n\n\n\n

The default login credentials for daloRADIUS are, user: administrator<\/code> and password: radius<\/code>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

If you encounter the error, 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

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\n

Install FreeRADIUS with daloRADIUS on Debian 9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

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}]}}