Getting more info on radpostauth

classic Classic list List threaded Threaded
4 messages Options
| Threaded
Open this post in threaded view
|

Getting more info on radpostauth

Andrés Gómez
Hi Alan and dear list.

Currently I use freeradius 3 to authenticate wifi users using SQL module.
After each  authentication request I can see a new entry on radpostauth
table in my database.... Everything OK.

Radpostauth table has the information about username, pass, reply message
and authdate.

I need a record about the callingstationid parameter that is arriving in
each request. So, If I create a new row in that table, how can I modify the
SQL query in order to insert the callingstationid in that table?

Thanks a lot


--
*C. Andrés Gómez R.*
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Getting more info on radpostauth

Kristofer Hallin
Take a look at mods-config/sql/main/<SQL flavour>/queries.conf under the
post-auth section.

/K

On Tue, Sep 29, 2020 at 2:08 AM Andrés Gómez <[hidden email]>
wrote:

> Hi Alan and dear list.
>
> Currently I use freeradius 3 to authenticate wifi users using SQL module.
> After each  authentication request I can see a new entry on radpostauth
> table in my database.... Everything OK.
>
> Radpostauth table has the information about username, pass, reply message
> and authdate.
>
> I need a record about the callingstationid parameter that is arriving in
> each request. So, If I create a new row in that table, how can I modify the
> SQL query in order to insert the callingstationid in that table?
>
> Thanks a lot
>
>
> --
> *C. Andrés Gómez R.*
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Getting more info on radpostauth

Ibrahim AKSIT
In reply to this post by Andrés Gómez
Hello dear Andres Gomez and list members,

I have added additional fields like *ip*, *mac *into *radpostauth *table
and modified mysql queries as below accordingly
at  */etc/freeradius/mods-config/sql/main/mysql/queries.conf* file.


post-auth {
        query = "\
                INSERT INTO ${..postauth_table} \
                        (username, pass, reply, authdate, *ip*, *mac*) \
                VALUES ( \
                        '%{SQL-User-Name}', \
                        '%{%{User-Password}:-%{Chap-Password}}', \
                        '%{reply:Packet-Type}  - %{reply:Reply-Message}', \
                        '%S', \

*  '%{NAS-IP-Address}', \                        '%{Calling-Station-Id}' \*
            )"
}

I hope this is gonna help you and be informative.
Have a great day all folks.

İbrahim AKŞİT

Best Regards and Wishes
Yours Sincerely.


On Tue, Sep 29, 2020 at 3:09 AM Andrés Gómez <[hidden email]>
wrote:

> Hi Alan and dear list.
>
> Currently I use freeradius 3 to authenticate wifi users using SQL module.
> After each  authentication request I can see a new entry on radpostauth
> table in my database.... Everything OK.
>
> Radpostauth table has the information about username, pass, reply message
> and authdate.
>
> I need a record about the callingstationid parameter that is arriving in
> each request. So, If I create a new row in that table, how can I modify the
> SQL query in order to insert the callingstationid in that table?
>
> Thanks a lot
>
>
> --
> *C. Andrés Gómez R.*
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Getting more info on radpostauth

Andrés Gómez
Thanks a lot İbrahim and Kristofer.

I think that is what i was looking for!!!

Best regards

Em ter., 29 de set. de 2020 às 01:55, Ibrahim AKSIT <[hidden email]>
escreveu:

> Hello dear Andres Gomez and list members,
>
> I have added additional fields like *ip*, *mac *into *radpostauth *table
> and modified mysql queries as below accordingly
> at  */etc/freeradius/mods-config/sql/main/mysql/queries.conf* file.
>
>
> post-auth {
>         query = "\
>                 INSERT INTO ${..postauth_table} \
>                         (username, pass, reply, authdate, *ip*, *mac*) \
>                 VALUES ( \
>                         '%{SQL-User-Name}', \
>                         '%{%{User-Password}:-%{Chap-Password}}', \
>                         '%{reply:Packet-Type}  - %{reply:Reply-Message}', \
>                         '%S', \
>
> *  '%{NAS-IP-Address}', \                        '%{Calling-Station-Id}' \*
>             )"
> }
>
> I hope this is gonna help you and be informative.
> Have a great day all folks.
>
> İbrahim AKŞİT
>
> Best Regards and Wishes
> Yours Sincerely.
>
>
> On Tue, Sep 29, 2020 at 3:09 AM Andrés Gómez <[hidden email]>
> wrote:
>
> > Hi Alan and dear list.
> >
> > Currently I use freeradius 3 to authenticate wifi users using SQL module.
> > After each  authentication request I can see a new entry on radpostauth
> > table in my database.... Everything OK.
> >
> > Radpostauth table has the information about username, pass, reply message
> > and authdate.
> >
> > I need a record about the callingstationid parameter that is arriving in
> > each request. So, If I create a new row in that table, how can I modify
> the
> > SQL query in order to insert the callingstationid in that table?
> >
> > Thanks a lot
> >
> >
> > --
> > *C. Andrés Gómez R.*
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html



--
*C. Andrés Gómez R.*
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html