How to use rewrite.called_station_id IN dynamic clients authorize section

Herwin Weststrate herwin at
Thu Mar 26 09:45:14 CET 2015

On 26-03-15 09:35, James Wood wrote:
> Hi,
> We use dynamic clients + sql for our authentication of NAS devices.
> We also use rlm_raw because we cannot auth on the IP Address (because
> of not knowing all the dynamic IP's clients are coming from), so we
> auth on the Called-Station-Id value.
> In normal circumstances this works beautifully, but when we have a
> NAS that sends the Called-Station-Id value as AABBCCDDEEFF with no
> colon or hyphen, auth fails, because in our SQL database we store the
> MAC like AA-BB-CC-DD-EE-FF. I already use SQL to replace colon with
> hyphen, but I am struggling with if it has no delimiter at all. For
> this particular NAS client, there is no way to change the format of
> the Called-Station-Id value it is sending so I need something on the
> FreeRadius side.

I don't know what database you're using, but postgresql has a macaddr
datatype, which fixes these kind of issues.

Herwin Weststrate

More information about the Freeradius-Users mailing list