{"id":2020,"date":"2019-01-12T13:22:31","date_gmt":"2019-01-12T10:22:31","guid":{"rendered":"http:\/\/kifarunix.com\/?p=2020"},"modified":"2024-03-11T22:04:44","modified_gmt":"2024-03-11T19:04:44","slug":"install-freeradius-with-daloradius-on-debian-9","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-freeradius-with-daloradius-on-debian-9\/","title":{"rendered":"Install FreeRADIUS with daloRADIUS on Debian 9"},"content":{"rendered":"\n
In this guide, we are going to learn how to Install FreeRADIUS with daloRADIUS on Debian 9 stretch. As you already know, FreeRADIUS is an opensource high performance and highly configurable RADIUS suite that provides centralized network authentication on systems such as 802.1x (WiFi), dialup, PPPoE, VPN’s, VoIP, etc. Among the database back-ends that it supports include OpenLDAP, MySQL, Redis, Microsoft AD, Apache Cassandra, PostgreSQL etc.<\/p>\n\n\n\n
daloRADIUS on the other hand is an advanced web application for managing FreeRADIUS server. It supports various database backends such as MySQL, Sqlite, PostgreSQL, MsSQL, MySQL. It provides features such as Access Control Lists, support integration with Google Maps for geo-location of hotspots\/access points, graphical reporting…<\/p>\n\n\n\n
Running Debian 10\/Debian 11? Use the link below instead;<\/p>\n\n\n\n
Install FreeRADIUS with daloRADIUS on Debian 11\/Debian 10<\/a><\/p>\n\n\n\n Prerequisites<\/p>\n\n\n\n You may also want to check our previous guide on how to install FreeRADIUS with daloRADIUS on Fedora 29<\/a>.<\/p>\n\n\n\n Update and upgrade your system packages;<\/p>\n\n\n\n FreeRADIUS packages are available on the default Debian 9 default repositories and thus can be installed by running the command below;<\/p>\n\n\n\n Once the installation is done, FreeRADIUS is running by default. Hence, run the command below to enable it run on system restart.<\/p>\n\n\n\n Open FreeRADIUS UDP port2 1812 and 1813 on UFW.<\/p>\n\n\n\n You can confirm port opening by running the command below;<\/p>\n\n\n\n Stop FreeRADIUS and run it on debugging mode to confirm that it is ready to process the requests.<\/p>\n\n\n\n If all is well, you should be able to see the sample output below;<\/p>\n\n\n\n Create FreeRADIUS database and database user. Be sure to grant the database user all the privileges on FreeRADIUS database.<\/p>\n\n\n\n Login to MySQL as root user.<\/p>\n\n\n\n Create the database and database user.<\/p>\n\n\n\n Reload the privileges tables to affect the changes.<\/p>\n\n\n\n After that, import the FreeRADIUS default database schema located under Enable FreeRADIUS SQL module by creating a symbolic link of the Open the enabled SQL module and configure the Locate the line, Save the changes and quit configuration file.<\/p>\n\n\n\n Change the ownership user and group of the enabled SQL module (symbolic link) to freerad as shown below.<\/p>\n\n\n\n Once that is done, restart the FreeRADIUS service,<\/p>\n\n\n\n To get the latest version of daloRADIUS, you would have to download the archive from the Sourceforge downloads page<\/a>.<\/p>\n\n\n\n Once you have downloaded the archive, run the command below to extract it.<\/p>\n\n\n\n Next, you need to move the extracted daloRADIUS folder to the root directory of your web server.<\/p>\n\n\n\n daloRADIUS ships with its default MySQL tables. You need to import these tables to the FreeRADIUS database we created above.<\/p>\n\n\n\n Configure ownership of the daloRADIUS web configuration files to Apache web user as shown below;<\/p>\n\n\n\n Configure the permissions of the daloRADIUS main configuration file to Open the daloRADIUS configuration file for editing and set the database connection parameters.<\/p>\n\n\n\n Be sure to change the value of Save the configuration file and restart FreeRADIUS.<\/p>\n\n\n\n daloRADIUS configuration is done. Now, navigate to the browser and access daloRADIUS using the address The defualt login password for the default Install FreeRADIUS with daloRADIUS on Debian 11\/Debian 10<\/a><\/p>\n\n\n\nInstalling FreeRADIUS with daloRADIUS on Debian 9<\/h2>\n\n\n\n
apt install php-mail php-mail-mime php-pear<\/code><\/pre>\n<\/li>
pear install DB<\/code><\/pre>\n<\/li><\/ul>\n\n\n\n
Install and Configure FreeRADIUS on Debian 9<\/h3>\n\n\n\n
apt update\napt upgrade<\/code><\/pre>\n\n\n\n
apt-get install freeradius freeradius-mysql freeradius-utils<\/code><\/pre>\n\n\n\n
systemctl enable freeradius<\/code><\/pre>\n\n\n\n
ufw allow to any port 1812 proto udp\nufw allow to any port 1813 proto udp<\/code><\/pre>\n\n\n\n
ss -alun4 | grep -E '1812|1813'<\/code><\/pre>\n\n\n\n
UNCONN 0 0 *:1812 *:* \nUNCONN 0 0 *:1813 *:* \nUNCONN 0 0 127.0.0.1:18120 *:*<\/code><\/pre>\n\n\n\n
systemctl stop freeradius<\/code><\/pre>\n\n\n\n
freeradius -X<\/code><\/pre>\n\n\n\n
...\nlisten {\n \ttype = \"acct\"\n \tipv6addr = ::\n \tport = 0\n limit {\n \tmax_connections = 16\n \tlifetime = 0\n \tidle_timeout = 30\n }\n}\nListening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel\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 proxy address * port 58656\nListening on proxy address :: port 48643\nReady to process requests<\/strong><\/code><\/pre>\n\n\n\n
mysql -u root -p<\/code><\/pre>\n\n\n\n
create database radius;\ngrant all privileges on radius.* to radius@localhost identified by 'P@ssWORD';<\/code><\/pre>\n\n\n\n
flush privileges;\nquit<\/code><\/pre>\n\n\n\n
\/etc\/freeradius\/3.0\/mods-config\/sql\/main\/mysql\/schema.sql<\/code> to the RADIUS database we created above.<\/p>\n\n\n\n
mysql -u root -p radius < \/etc\/freeradius\/3.0\/mods-config\/sql\/main\/mysql\/schema.sql<\/code><\/pre>\n\n\n\n
sql module<\/code> under
\/etc\/freeradius\/3.0\/mods-available\/<\/code> to
mods-enabled<\/code>.<\/p>\n\n\n\n
ln -s \/etc\/freeradius\/3.0\/mods-available\/sql \/etc\/freeradius\/3.0\/mods-enabled\/<\/code><\/pre>\n\n\n\n
radius<\/code> database connection details as shown below;<\/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
# read_clients = yes<\/code> and uncomment it to enable FreeRADIUS server read clients from database.<\/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
chown -h freerad.freerad \/etc\/freeradius\/3.0\/mods-enabled\/sql<\/code><\/pre>\n\n\n\n
systemctl restart freeradius<\/code><\/pre>\n\n\n\n
Install and Configure daloRADIUS on Debian 9<\/h3>\n\n\n\n
tar -xzf daloradius-0.9-9.tar.gz<\/code><\/pre>\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 www-data.www-data \/var\/www\/html\/daloradius\/<\/code><\/pre>\n\n\n\n
664<\/code> as shown below;<\/p>\n\n\n\n
chmod 664 \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n
vim \/var\/www\/html\/daloradius\/library\/daloradius.conf.php<\/code><\/pre>\n\n\n\n
...\n$configValues['DALORADIUS_VERSION'] = '0.9-9';\n$configValues['FREERADIUS_VERSION'] = '2';\n$configValues['CONFIG_DB_ENGINE'] = 'mysqli<\/strong>';\n$configValues['CONFIG_DB_HOST'] = 'localhost';\n$configValues['CONFIG_DB_PORT'] = '3306';\n$configValues['CONFIG_DB_USER'] = 'radius'; < RADIUS database user<\/strong>\n$configValues['CONFIG_DB_PASS'] = 'P@ssWORD'; < radius user password<\/strong>\n$configValues['CONFIG_DB_NAME'] = 'radius'; < RADIUS database\n...<\/strong><\/code><\/pre>\n\n\n\n
$configValues['CONFIG_DB_ENGINE'] = 'mysqli';<\/code> from
mysql<\/code> to
mysqli<\/strong><\/code> lest you get the error,
Error Message<\/b>: DB Error: extension not found<\/code>.<\/p>\n\n\n\n
systemctl restart freeradius<\/code><\/pre>\n\n\n\n
http:\/\/server_IP\/daloradius<\/code>. You should land on a login page.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
Administrator<\/code> user is
radius<\/code>.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
Other Tutorials<\/h2>\n\n\n\n