How to setup FreeRADIUS backend MySQL ?
-
My purpose is using pfSense as RADIUS authentication Server for hardware firewall user authentication, and MySQL is the RADIUS external database.
1. I had installed pfSense 2.1.5 and setup FreeRADIUS and enabled SQL support.
2. I setup a Windows MySQL and created a RADIUS database and created an user.
3. Searched Google, I imported the cui.sql/ippool.sql/nas.sql/wimax.sql into MySQL.
4. I can connect to RADIUS using RADIUS client tool without enable psSense SQL support, but once enabled SQL support, it can not be connected.
5. I'm not familiar with MySQL, is there a document or someone could explain in detail how to setup the user database in MySQL? and how to link both MySQL and FreeRADIUS? thanks! -
It's not immediately obvious how to run things on boot
I used the "ShellCMD" package to run
_/usr/local/etc/rc.d/mysql-server.sh start_
with the "early" optionNOTE:
_/usr/local/etc/rc.d/mysql-server.sh_
is not the same as_/usr/local/etc/rc.d/mysql-server_
I'm going to attempt to attach the mysql-server script I built.
I also added grant commands to the bottom of some of the *.sql files.
Ex:GRANT ALL on radius.radippool TO 'radius'@'localhost'; GRANT ALL on radius.radippool TO 'radius'@'127.0.0.1';
Consider carefully what these scripts do before agreeing to their course of action.
I'm still a PFSense / *BSD noob. -
Here is something else I found …. probably better than what I have ...
https://forum.pfsense.org/index.php?topic=57260.0
-
Also debugging my procedure … I noticed that the first time I run mysqld (for the root password setup, etc) I have to run /usr/local/etc/rc.d/mysql-server onestart
After the root password is setup, I can then run /usr/local/etc/rc.d/mysql-server.sh [start|stop]
:-[