Logging attributes to the regular log

Frank Bulk - iNAME frnkblk at iname.com
Sat Jul 19 19:05:16 CEST 2008


Alan:

I'll do my best to explain.

Currently our NAS is returning the NAS-Port and FreeRADIUS is logging it
like this:
	Fri Jul 18 13:09:52 2008 : Auth: Login OK: [khj] (from client dslam
port 1073873726)
	Fri Jul 18 13:09:55 2008 : Auth: Login OK: [dfsands6] (from client
dslam port 1073873388)
	Fri Jul 18 13:10:37 2008 : Auth: Login OK: [s44] (from client dslam
port 1073742057)

According to my NAS' documentation, that longish number is a
bit-representation of an interface.  Rather than figure out how to call some
external module to re-write that value into something that looks like "port
#/#/VP/VC", which seems to be more complex, I would like to print the value
of "NAS-Port-Id(87) which contains the same information.

So, I would like the above output to look like this:
	Fri Jul 18 13:09:52 2008 : Auth: Login OK: [khj] (from client dslam
NAS-Port-ID 2/0/12/313)
	Fri Jul 18 13:09:55 2008 : Auth: Login OK: [dfsands6] (from client
dslam NAS-Port-ID 4/0/6/141)
	Fri Jul 18 13:10:37 2008 : Auth: Login OK: [s44] (from client dslam
port NAS-Port ID 4/0/2/22)
The last field is directly from the contents of NAS-Port-Id(87), without any
manipulation.  

ISC's DHCP is very powerful -- in the configuration file you can define what
is logged.  See:
	http://marc.info/?l=dhcp-users&m=121369168201304&w=2
for an example.

Any ideas?

Frank 

-----Original Message-----
From: Alan DeKok [mailto:aland at deployingradius.com] 
Sent: Saturday, July 19, 2008 1:42 AM
To: frnkblk at iname.com; FreeRadius users mailing list
Subject: Re: Logging attributes to the regular log

Frank Bulk wrote:
> I scoured online and in the archives but I haven't found a solution to my
> question: is there a way to log additional attributes, not unlike what's
> done in ISC's DHCP logging?

  What do you mean by that?

>  I know that 'detail' logging is possible, but
> those are stored in a separate file for each connection.

  The detail log doesn't store it's logs in a separate file for each
connection.  If you want that to happen, just configure it in the
"detail" module.  Make the file name depend on a per-connection attribute.

>  I just want to add
> another parameter that the NAS sends to FreeRADIUS.

  Is that request related to the previous sentences?

  Alan DeKok.




More information about the Freeradius-Users mailing list