How to store session info in external database?

Maciej Lew maciek at lanserver.pl
Tue Aug 6 13:04:14 CEST 2013


Hi, I would like to store freeradius session information like
Acct-Session-Id, Acct-Start-Time, Acct-Stop-Time, Acct-Input-Octets,
Acct-Output-Octets, Framed-IP-Address, NAS-IP-Address in external database.

We have our devices connected to databases which are readonly so we cannot
store those informations there. Also we have database where we want to
store session statistics from all devices.

Is that possible to achieve ?

Till now we tried setting up virtual host with Auth-Type rules redirecting
to script but we cannot receive Acct-Session-Id. Here is how our
/etc/freeradius/sites-avaliable/default looks like:

authorize {
    chap
    mschap
    sql
    update control {
    Auth-Type := `/etc/freeradius/bin/testradius '%{User-Name}'
'%{Calling-Station-Id}' '%{NAS-IP-Address}' '%{reply:Framed-IP-Address}'
'%{reply:Acct-Session-Id}' '%{reply:Acct-Unique-Session-Id}'`
    }
}
authenticate {
    Auth-Type PAP {
        pap
    }
    Auth-Type CHAP {
        chap
    }
    Auth-Type MS-CHAP {
        mschap
    }
}

preacct {
    acct_unique
}

accounting {
#   sql
}

session {
#   sql
}

post-auth {
#   sql
}

Sorry for any language mistakes :)


-- 
Pozdrawiam
Maciej Lew

tel. 883-376-062
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130806/42c784fe/attachment.html>


More information about the Freeradius-Users mailing list