pfsense_radius_to_sql
This utility compensates for the fact that pfsense doesn't have a direct means in the webui configurator to authenticate for openvpn connections to a sql database. So I made a python script that would allow this to happen by acting as a radius server (since pfsense does allow this). Then python hands off the username and password to a mysql database and checks the expiration date.
Should be a good template for people to expand upon. Hope this helps someone!
Instructions:
-
cd pfsense_radius_to_mysql/pyrad-master #This bit is important. The pyrad original from github needed minor modification to make it work
-
python setup.py install
-
apt-get install python-dateutil
-
pip install pytz
-
pip install pymysql
-
Set mysql database info in the script and set a shared secret at the bottom
Run with "python server.py" (included a sample sql file for what this is looking for)