IPPool not logging to radius.log on FreeRadius 3.0.12
Hello, I am running FreeRadius 3.0.12 compiled from source on Debian 8.6. The problem I am facing is that module ippool is not logging allocation, release, etc, to the syslog daemon. I have this in my log: Wed Oct 19 14:45:46 2016 : Auth: (0) Login OK: [teste-sql] (from client CSC-755-rt-01 port 15728697 cli E4:8D:8C:EC:90:A2) Wed Oct 19 14:45:55 2016 : Auth: (3) Login OK: [teste-sql] (from client CSC-755-rt-01 port 15728698 cli E4:8D:8C:EC:90:A2) When I run in debug mode (-Xx), I can see the module ippool sending the log message, I just can't see to where: Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: EXPAND UPDATE radippool SET nasipaddress = '%{NAS-IP-Address}', pool_key = '%{NAS-Port}', callingstationid = '%{Calling-Station-Id}', username = '%{User-Name}', expiry_time = NOW() + INTERVAL 1920 SECOND WHERE framedipaddress = '192.168.0.4' AND expiry_time IS NULL Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: --> UPDATE radippool SET nasipaddress = '187.19.96.40', pool_key = '15728701', callingstationid = 'E4:8D:8C:EC:90:A2', username = 'teste-sql', expiry_time = NOW() + INTERVAL 1920 SECOND WHERE framedipaddress = '192.168.0.4' AND expiry_time IS NULL Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: Executing query: UPDATE radippool SET nasipaddress = '187.19.96.40', pool_key = '15728701', callingstationid = 'E4:8D:8C:EC:90:A2', username = 'teste-sql', expiry_time = NOW() + INTERVAL 1920 SECOND WHERE framedipaddress = '192.168.0.4' AND expiry_time IS NULL Wed Oct 19 14:54:41 2016 : Debug: rlm_sql_mysql: Rows matched: 1 Changed: 1 Warnings: 0 Wed Oct 19 14:54:41 2016 : Debug: COMMIT Wed Oct 19 14:54:41 2016 : Debug: Parsed xlat tree: Wed Oct 19 14:54:41 2016 : Debug: literal --> COMMIT Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: EXPAND COMMIT Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: --> COMMIT Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: Executing query: COMMIT Wed Oct 19 14:54:41 2016 : Debug: rlm_sql (sql): Released connection (3) Wed Oct 19 14:54:41 2016 : Debug: Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name}) Wed Oct 19 14:54:41 2016 : Debug: Parsed xlat tree: Wed Oct 19 14:54:41 2016 : Debug: literal --> Allocated IP: Wed Oct 19 14:54:41 2016 : Debug: attribute --> Framed-IP-Address Wed Oct 19 14:54:41 2016 : Debug: literal --> from Wed Oct 19 14:54:41 2016 : Debug: attribute --> Pool-Name Wed Oct 19 14:54:41 2016 : Debug: literal --> (did Wed Oct 19 14:54:41 2016 : Debug: attribute --> Called-Station-Id Wed Oct 19 14:54:41 2016 : Debug: literal --> cli Wed Oct 19 14:54:41 2016 : Debug: attribute --> Calling-Station-Id Wed Oct 19 14:54:41 2016 : Debug: literal --> port Wed Oct 19 14:54:41 2016 : Debug: attribute --> NAS-Port Wed Oct 19 14:54:41 2016 : Debug: literal --> user Wed Oct 19 14:54:41 2016 : Debug: attribute --> User-Name Wed Oct 19 14:54:41 2016 : Debug: literal --> ) Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: 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}) Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: --> Allocated IP: 192.168.0.4 from main_pool (did CSC-755-rt-01 cli E4:8D:8C:EC:90:A2 port 15728701 user teste-sql) Wed Oct 19 14:54:41 2016 : Debug: (0) modsingle[post-auth]: returned from sqlippool (rlm_sqlippool) Wed Oct 19 14:54:41 2016 : Debug: (0) [sqlippool] = ok Wed Oct 19 14:54:41 2016 : Debug: (0) } # post-auth = ok Wed Oct 19 14:54:41 2016 : Auth: (0) Login OK: [teste-sql] (from client CSC-755-rt-01 port 15728701 cli E4:8D:8C:EC:90:A2) Wed Oct 19 14:54:41 2016 : Debug: (0) Sent Access-Accept Id 166 from 186.251.148.124:1812 to 187.19.96.40:44668 length 0 Wed Oct 19 14:54:41 2016 : Debug: (0) Mikrotik-Rate-Limit = "32k" Wed Oct 19 14:54:41 2016 : Debug: (0) Framed-IP-Address = 192.168.0.4 Wed Oct 19 14:54:41 2016 : Debug: (0) Finished request I can't see the reason that sqlippool is not seding the log to syslog: Allocated IP: 192.168.0.4 from main_pool (did CSC-755-rt-01 cli E4:8D:8C:EC:90:A2 port 15728701 user teste-sql) Atenciosamente, *Nataniel Klug* | nataniel.klug@gmail.com
On Oct 19, 2016, at 1:00 PM, Nataniel Klug <nataniel.klug@gmail.com> wrote:
I am running FreeRadius 3.0.12 compiled from source on Debian 8.6. The problem I am facing is that module ippool is not logging allocation, release, etc, to the syslog daemon.
What makes you think the ippool will log allocation etc. to syslog?
When I run in debug mode (-Xx), I can see the module ippool sending the log message, I just can't see to where:
Yes, you can see where it's being logged.
Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: --> Allocated IP: 192.168.0.4 from main_pool (did CSC-755-rt-01 cli E4:8D:8C:EC:90:A2 port 15728701 user testa-sql)
It's a *debug* message which is only shown in *debug* mode. If you want to log allocations, etc. to syslog, you ill need to configure a "linelog" module to do that. Alan DeKok.
Hello Alan, Thank you for your quick answer. I am still attached to version 2. In that version I had this log: root@CSC-radius-01:~# tail /var/log/freeradius/radius.log Wed Oct 19 15:35:22 2016 : Auth: Login incorrect: [ edsonverde@certto.com.br/d30m06] (from client TOO-auth-02 port 15785897 cli 00:1A:3F:69:A2:9B) Wed Oct 19 15:35:22 2016 : Auth: Login incorrect: [ daltron@certto.com.br/d02m04] (from client CSC-auth-07 port 15963333 cli FC:8B:97:05:C0:0C) Wed Oct 19 15:35:22 2016 : Auth: Login OK: [pzyo@certto.com.br] (from client TOO-auth-04 port 16003104 cli 6C:72:20:4E:1C:F3) Wed Oct 19 15:35:22 2016 : Auth: Login incorrect: [ cavagnollo@certto.com.br/d14m04] (from client CSC-auth-12 port 16085330 cli 00:1A:3F:D0:7E:98) Wed Oct 19 15:35:22 2016 : Auth: Login incorrect: [ viviane.santana@certto.com.br/d05m01] (from client CSC-auth-07 port 15963334 cli 00:1A:3F:E0:B9:72) Wed Oct 19 15:35:22 2016 : Info: Allocated IP: 170.150.167.249 from main_pool (did TOO-auth-04.C-industrial-a02 cli 6C:72:20:4E:1C:F3 port 16003104 user pzyo@certto.com.br) Wed Oct 19 15:35:23 2016 : Auth: Login incorrect: [ enjindistri@certto.com.br/d18m08] (from client CSC-auth-06 port 16155297 cli 58:10:8C:04:FC:AA) Wed Oct 19 15:35:23 2016 : Auth: Login incorrect: [ gaapasan@certto.com.br/d11m02] (from client TOO-auth-04 port 16003106 cli 00:1A:3F:66:B8:18) Wed Oct 19 15:35:23 2016 : Auth: Login incorrect: [ fipal_jl_jeep@certto.com.br/d26m02] (from client CSC-auth-12 port 16085331 cli 00:1A:3F:E3:F9:4E) Wed Oct 19 15:35:23 2016 : Info: Released IP 187.19.107.217 (did CSC-auth-11.C-Lindoeste-a01 cli 00:27:22:D8:E2:D8 user clodoaldomarcelo@certto.com.br) When I look into module sqlippool on version 3 it shows me the messages: sqlippool { sql_module_instance = "sql" dialect = "mysql" ippool_table = "radippool" lease_duration = 1920 pool_key = "%{NAS-Port}" messages { exists = "Existing IP: %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})" success = "Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})" clear = "Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})" failed = "IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})" nopool = "No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})" } $INCLUDE ${modconfdir}/sql/ippool/${dialect}/queries.conf } Can you point me in the direction to make a linelog module? Atenciosamente, *Nataniel Klug* | nataniel.klug@gmail.com 2016-10-19 15:30 GMT-02:00 Alan DeKok <aland@deployingradius.com>:
On Oct 19, 2016, at 1:00 PM, Nataniel Klug <nataniel.klug@gmail.com> wrote:
I am running FreeRadius 3.0.12 compiled from source on Debian 8.6. The problem I am facing is that module ippool is not logging allocation, release, etc, to the syslog daemon.
What makes you think the ippool will log allocation etc. to syslog?
When I run in debug mode (-Xx), I can see the module ippool sending the log message, I just can't see to where:
Yes, you can see where it's being logged.
Wed Oct 19 14:54:41 2016 : Debug: (0) sqlippool: --> Allocated IP: 192.168.0.4 from main_pool (did CSC-755-rt-01 cli E4:8D:8C:EC:90:A2 port 15728701 user testa-sql)
It's a *debug* message which is only shown in *debug* mode.
If you want to log allocations, etc. to syslog, you ill need to configure a "linelog" module to do that.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
On Oct 19, 2016, at 1:37 PM, Nataniel Klug <nataniel.klug@gmail.com> wrote:
Hello Alan,
Thank you for your quick answer. I am still attached to version 2. In that version I had this log:
root@CSC-radius-01:~# tail /var/log/freeradius/radius.log Wed Oct 19 15:35:22 2016 : Auth: Login incorrect: [ edsonverde@certto.com.br/d30m06] (from client TOO-auth-02 port 15785897 cli 00:1A:3F:69:A2:9B)
Then look at radiusd.conf, the "log" section. You can edit the authentication log messages there. Add whatever information you need.
When I look into module sqlippool on version 3 it shows me the messages:
Those messages are placed into the control list, in the Module-Success-Message attribute. Which is documented in the "sqlippool" module configuration. You can then use control:Module-Success-Message to log those messages anywhere.
Can you point me in the direction to make a linelog module?
Perhaps reading the "mods-available" directory would be useful here. The solution to your issues is documented. All you need to do is to read the documentation. Alan DeKok.
Thank you Alan! Atenciosamente, *Nataniel Klug* | nataniel.klug@gmail.com 2016-10-19 15:53 GMT-02:00 Alan DeKok <aland@deployingradius.com>:
On Oct 19, 2016, at 1:37 PM, Nataniel Klug <nataniel.klug@gmail.com> wrote:
Hello Alan,
Thank you for your quick answer. I am still attached to version 2. In
that
version I had this log:
root@CSC-radius-01:~# tail /var/log/freeradius/radius.log Wed Oct 19 15:35:22 2016 : Auth: Login incorrect: [ edsonverde@certto.com.br/d30m06] (from client TOO-auth-02 port 15785897 cli 00:1A:3F:69:A2:9B)
Then look at radiusd.conf, the "log" section. You can edit the authentication log messages there. Add whatever information you need.
When I look into module sqlippool on version 3 it shows me the messages:
Those messages are placed into the control list, in the Module-Success-Message attribute. Which is documented in the "sqlippool" module configuration.
You can then use control:Module-Success-Message to log those messages anywhere.
Can you point me in the direction to make a linelog module?
Perhaps reading the "mods-available" directory would be useful here.
The solution to your issues is documented. All you need to do is to read the documentation.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
participants (2)
-
Alan DeKok -
Nataniel Klug