Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to setup FreeRADIUS backend MySQL ?

    General pfSense Questions
    2
    4
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wowhsieh
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • S
        simply seth
        last edited by

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

        NOTE: _/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.

        INSTRUCTIONS.txt
        mysql-server.sh.txt
        my.cnf.txt

        1 Reply Last reply Reply Quote 0
        • S
          simply seth
          last edited by

          Here is something else I found …. probably better than what I have ...

          https://forum.pfsense.org/index.php?topic=57260.0

          1 Reply Last reply Reply Quote 0
          • S
            simply seth
            last edited by

            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]

            :-[

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.