Logging based on port request came in on
Phil Mayers
p.mayers at imperial.ac.uk
Wed Feb 28 20:35:48 CET 2007
Walt Reynolds wrote:
> Hello,
>
> I have freeradius 1.1.2 set up to listen on both ports 1812/1813 and
> 1645/1646. This is simply to separate user and admin login. What I
> would like to do is to add logging based on the port. I could add
> %{NAS-Port-Type} to the Detail such as:
>
> detailfile = ${radacctdir}/%{NAS-Port-Type}/auth-detail-%Y%m%d
>
> The problem with doing this as it uses the string "Wireless-802.11" or
> "Virtual". I would instead like to use the port the request came in on
NAS-Port-Type is, as you've discovered, the port type of the session
being authenticated/accounted
> (1812 or 1645) or even modify that string value. I tried to add the
> string %(request:Packet-Dst-Port) (from the
> dictionary.freeradius.internal) in the detailfile, but comes back blank.
You'll need a sufficiently recent version of the server for that to
work, and IIRC the "preprocess" module needs to be run (you should
always run it)
>
> Am I misreading this in some way. I assume that internally freeradius
> knows what port the request came in on.
What version are you running?
More information about the Freeradius-Users
mailing list