Created
March 7, 2019 13:34
-
-
Save launchdaemon/589e447d80d9fd66f13c0ffb3343fa75 to your computer and use it in GitHub Desktop.
Configuring Freeradius Daloradius on a Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Braindump of commands and notes setting up freeradius on a Raspberry Pi as tutorials I found were outdated, mostly taken from here: | |
| http://www.binaryheartbeat.net/2013/12/raspberry-pi-based-freeradius-server.html | |
| sudo apt-get install freeradius freeradius-mysql apache2 php libapache2-mod-php mysql-server mysql-client php-mysql php-pear php-gd php-db | |
| sudo mysqladmin -u root password NEWPASSWORD - if not prompted for password during setup | |
| sudo wget https://sourceforge.net/projects/daloradius/files/latest/download | |
| sudo mv download daloradius-0.9-9.tar.gz | |
| sudo tar zxvf daloradius-0.9-9.tar.gz -C /var/www/ | |
| sudo mv /var/www/daloradius-0.9-9/ /var/www/html/daloradius/ | |
| cd /var/www/html/daloradius/ | |
| sudo mysql -uroot -p - could use mysql root or system root credentials here? | |
| MariaDB [(none)]> create database radiusdb; | |
| exit | |
| sudo mysql -u root -p radiusdb < contrib/db/fr2-mysql-daloradius-and-freeradius.sql | |
| sudo mysql -u root -p | |
| CREATE USER 'radiususer'@'localhost'; | |
| SET PASSWORD FOR 'radiususer'@'localhost' = PASSWORD('radiuspass'); | |
| GRANT ALL ON radiusdb.* to 'radiususer'@'localhost'; | |
| exit | |
| sudo nano /var/www/daloradius/library/daloradius.conf.php | |
| $configValues['DALORADIUS_VERSION'] = '0.9-9'; | |
| $configValues['FREERADIUS_VERSION'] = '2'; | |
| $configValues['CONFIG_DB_ENGINE'] = 'mysql'; | |
| $configValues['CONFIG_DB_HOST'] = 'localhost'; | |
| $configValues['CONFIG_DB_PORT'] = '3306'; | |
| $configValues['CONFIG_DB_USER'] = 'radiususer'; | |
| $configValues['CONFIG_DB_PASS'] = 'radiuspass'; | |
| $configValues['CONFIG_DB_NAME'] = 'radiusdb'; | |
| nano /etc/freeradius/3.0/users | |
| bob Cleartext-Password := "hello" | |
| Reply-Message = "Hello, %{User-Name}" | |
| /etc/init.d/freeradius stop or service freeradius stop | |
| freeradius -XXX | |
| Info: Ready to process requests. | |
| ^c | |
| service freeradius start | |
| radtest bob hello 127.0.0.1 0 testing123 | |
| https://wiki.freeradius.org/guide/SQL-HOWTO-for-freeradius-3.x-on-Debian-Ubuntu | |
| nano 3.0/mods-available/sql with database type/ info etc | |
| cd /etc/freeradius/3.0/mods-enabled | |
| ln -s ../mods-available/sql sql | |
| in authorize{} and accounting{} sections sql was commented out but was prefixed with -. Deleted that as per the example the wiki gives. | |
| also removed - in post-auth{} to log all Authentication attempts to SQL | |
| couldn't then log into http://IP/daloradius | |
| Database connection error | |
| Error Message: DB Error: extension not found | |
| https://github.com/lirantal/daloradius/issues/5 | |
| apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-db | |
| Edit /etc/freeradius/clients.conf and update clients{} section to add subnet for different subnets etc. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment