Module sqlippool and logs

Rafael Ganascim rganascim at gmail.com
Tue Aug 27 18:56:41 CEST 2019


Em ter, 27 de ago de 2019 às 09:42, Alan DeKok
<aland at deployingradius.com> escreveu:
>
> On Aug 26, 2019, at 3:36 PM, Rafael Ganascim <rganascim at gmail.com> wrote:
> >
> > I'm using freeradius 3.0.19. I have three sqlippool modules configured
> > and working in my radius server (for ipv4, ipv6 and ipv6pd).
>
>   OK...
>
> > For now, I want to enable the logs via linelog for the three
> > instances, but I'm getting messages only from the first one, even when
> > I declare three linelog instances.
>
>   You can put the log module immediately after each ippool module:
>
>         if (a) {
>                 ippool_a
>                 linelog_a
>         }
>         elsif (b) {
>                 ippool_b
>                 linenlog_b
>         }
>
>           etc.
>

I can't use this approach because I need to process both the ippool modules:

       IPV4
        if (control:Module-Success-Message) {
                linelog
        }
        IPV6
        if (control:Module-Success-Message) {
                linelogv6
        }


>
> > Here is the debug:
> > From IPV4 module:
> > (67191) Mon Aug 26 16:27:43 2019: Debug: IPV4: EXPAND Released IP
> > %{Framed-IP-Address} (did %{Called-Station-Id} cli
> > %{Calling-Station-Id} user %{User-Name})
>
>   No, that is NOT the debug we want.  All of the documentation says to use "radiusd -X".
>
>   Why are you using something else?  Where do we need to put that documentation so that (a) you will read it, and (b) follow its instructions?
>

My radius server is in production, so I got the debug from raddebug,
to prevent impacting service availability. I'm sorry for that.

Here is from "radius -X"

IPv4 ippool module + linelog:

(134) IPV4: Executing query: COMMIT
rlm_sql (sql): Released connection (2)
(134) IPV4: EXPAND Allocated IP: %{reply:Framed-IP-Address} from
%{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name})
(134) IPV4:    --> Allocated IP: 187.x.x.x from SPF (did  cli
BRAS-31#1047721 port 771754200 user xxxxx at xxxxxx.xxx.xx)
(134)     [IPV4] = ok
(134)     if (control:Module-Success-Message) {
(134)     if (control:Module-Success-Message)  -> TRUE
(134)     if (control:Module-Success-Message)  {
(134) linelog: EXPAND %t %{control:Module-Success-Message}
(134) linelog:    --> Tue Aug 27 13:50:43 2019 Allocated IP: 187.x.x.x
from SPF (did  cli BRAS-31#1047721 port 771754200 user
xxxxx at xxxxxx.xxx.xx)
(134) linelog: EXPAND /var/log/radius/radius.log


IPv6  ippool module + linelogv6:

(134) IPV6: EXPAND Allocated IPv6PD: %{reply:Delegated-IPv6-Prefix}
from %{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name})
(134) IPV6:    --> Allocated IPv6PD: 2804:xxxxxxx/56 from SPF (did
cli BRAS-31#1047721 port 771754200 user xxxxx at xxxxxx.xxx.xx)
(134)     [IPV6] = ok
(134)     if (control:Module-Success-Message) {
(134)     if (control:Module-Success-Message)  -> TRUE
(134)     if (control:Module-Success-Message)  {
(134) linelogv6: EXPAND %t %{control:Module-Success-Message}
(134) linelogv6:    --> Tue Aug 27 13:50:43 2019 Allocated IP:
187.x.x.x from SPF (did  cli BRAS-31#1047721 port 771754200 user
xxxxx at xxxxxx.xxx.xx)
(134) linelogv6: EXPAND /var/log/radius/radius.log
(134) linelogv6:    --> /var/log/radius/radius.log
(134)       [linelogv6] = ok
(134)     } # if (control:Module-Success-Message)  = ok


>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list