Add client IP address to log messages
Drew Weaver
drew.weaver at thenap.com
Tue Nov 23 14:34:44 CET 2021
----
> I am not sure why or even how radiusd could think that the auth request is coming from itself but the requests are not sourced from the radius server to the radius server.
Because you defined all the clients in the "localhost" section in clients.conf, so it calls them all "localhost".
Give each client its own section and its own name, and it'll write the correct name in the log.
---
Is this something that you can define in the SQL module? That would probably be way easier than maintaining a clients.conf that is essentially 200 entries of exactly the same thing except for the name of the NAS.
Alternatively is there a way to "meta define" them under the single localhost entry so that it uses the actual NAS/client information instead of just using the name of the entry in clients.conf?
Since all of the config is essentially exactly the same except for the IPs that seems like a lot of lines of configuration to maintain.
> The sources are all on different IP addresses.
You could also use this in the log section
msg_badpass = "IP:%{Packet-Src-IP-Address}"
---
That just makes it log this: (from client localhost port 0) IP:127.0.0.1
So I guess I will have to just create 200 entries in clients.conf unless there is some way to just tell clients.conf to use this :%{Packet-Src-IP-Address} instead of it's own IP address in logging.
More information about the Freeradius-Users
mailing list