Freeradius with oracle support in addition to mysql and postgresql



  • Hi there.
    thanks for great product
    inf pfsense, freeradius module only supports Mysql and PostgreSQL to connect for SQL base databases..at least what i see in webgui.
    is there any way to use oracle as backend database to connect freeradius? from webgui or shell
    is there any plan to add this option in webgui in near future?
    Thanks



  • Hi,

    If you are ready to do some keyboard work, I guess it's possible :

    Enter console mode, and go to God mode (option 8).

    Goto the settings directory :

    cd /usr/local/etc/raddb/
    

    and ask if this  FreeRadius knows anything about 'oracle' :

    grep -R 'oracle' *
    
    

    You will see this :

    mods-available/sql:#  Where "DB" is mysql, mssql, oracle, or postgresql.
    mods-available/sql:     #    * rlm_sql_oracle
    mods-config/sql/ippool-dhcp/oracle/queries.conf:#  ippool-dhcp/oracle/queries.conf -- Oracle queries for dhcp-ippool
    mods-config/sql/ippool/oracle/queries.conf:#  ippool/oracle/queries.conf -- Oracle queries for rlm_sqlippool
    mods-config/sql/main/oracle/queries.conf:#  main/oracle/queries.conf -- Oracle configuration for default schema (schema.sql)
    
    

    The major part about how to set it up is there … but : FreeRadius needs a 'driver' that can talk to Oracle.
    The settings will learn you that the driver name of MySQL is "rlm_sql_mysql". For Oracle this would be  "rlm_sql_oracle" ...
    Check here :

    cd /usr/local/lib/freeradius-3.0.15
    ls -al
    

    Bad news : no Oracle driver in the FreeRadius 3.x package … (maybe you borrow a copy from an original FreeBSD 11.1 (current FreeBSD kernel used by pfSense) "FreeRadius" package ..