add realm to user based on NAS-IP

Alexander V. Klepikov klepikov_a at
Mon Apr 2 08:31:17 CEST 2007

Hello, Alexander!
You wrote  on Sat, 31 Mar 2007 18:11:46 +0200:

AP> i wonder if it is possible to add a realm to a username based on the
AP> NAS-IP the request come from.
AP> For instance:
AP> - user "abc" logs on router

AP> - router asks a freeradius proxy for user "abc"

AP> - freeradius-proxy recognize the ip and add "@realm" to the username
AP> and
AP> proxy the request to another freeradius-server based on
AP> "realm"-entry
AP> in proxy.conf

I use following method for adding realm based on NAS-Identifier: user "abc" 
transforms to "abc at NAS-Identifier". This is made in hints:
DEFAULT Suffix !~ "@."
        Realm = "%{NAS-Identifier:-unknown}"

With best regards, Alexander V. Klepikov.  E-mail: klepikov_a at 

More information about the Freeradius-Users mailing list