dhcp server and logging
Бенджамин Томпсон
b.thompson at latera.ru
Wed Oct 24 15:19:03 CEST 2018
linelog linelog-pool {
filename = ${logdir}/linelog-pool.log
format = ""
reference = "%{%{control:Module-Success-Message[#]}:-0}"
0 = ""
1 = "%S %{control:Module-Success-Message}"
}
ср, 24 окт. 2018 г. в 12:54, BASSAGET Cédric <cedric.bassaget.ml at gmail.com>:
> Hello.
> I don't understand what is missing in my config to make freeradius (3.0.12)
> logging what is doing about DHCP queries / replies.
> I'm using module dhcp_sqlippool, which set things like :
>
> sqlippool_log_exists = "DHCP: Existing IP:
> %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli
> %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
>
> sqlippool_log_success = "DHCP: Allocated IP:
> %{reply:Framed-IP-Address} from %{control:Pool-Name} (did
> %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
> %{User-Name})"
>
> sqlippool_log_clear = "DHCP: Released IP %{Framed-IP-Address} (did
> %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
>
> sqlippool_log_failed = "DHCP: IP Allocation FAILED from
> %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id}
> port %{NAS-Port} user %{User-Name})"
>
> sqlippool_log_nopool = "DHCP: No Pool-Name defined (did
> %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
> %{User-Name})"
>
>
> But nothing is logged. And I can not find the good doc to learn how linelog
> works.I found this thread :
>
> http://freeradius.1045715.n5.nabble.com/DHCP-in-FreeRadius-3-and-logging-td5749707.html
>
>
>
I think you need something like this in mods-enabled/linelog
linelog linelog-pool {
filename = ${logdir}/linelog-pool.log
format = ""
reference = "%{%{control:Module-Success-Message[#]}:-0}"
0 = "No attribute Module-Success-Message"
1 = "%S %{control:Module-Success-Message}"
}
Then just call the linelog module by putting "linelog-pool" in your
sites-enabled/foo config file
More information about the Freeradius-Users
mailing list