Rewriting realms

Jamie Orzechowski jamie.orzechowski at gmail.com
Sat Jul 25 14:55:58 CEST 2015


Thanks that worked well.

One more quick Q

I have group of users coming in from a NAS-IP-Address with no realm in 
their username.
How do I rewrite anything from that NAS-IP-Address and append at realm.com ?


On 7/25/2015 7:58 AM, Alan DeKok wrote:
> On Jul 24, 2015, at 9:17 PM, Jamie Orzechowski <jamie.orzechowski at gmail.com> wrote:
>
>> I am a fresh convert from Radiator to FreeRadius.
>> How do I strip off everything after the @ in the received username and append @newrealm.com?
> $ man unlang
>
>    The simplest way is probably a regex:
>
>
> 	if (User-Name =~ /^([^@]+)@/) {
> 		update request {
> 			User-Name := "%{1}@newrealm.com"
> 		}
> 	}
>
>    That's the basic idea.  You'll have to customize it for any additional requirements.
>
>    Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list