Realms based on called-station-id

Alan DeKok aland at deployingradius.com
Fri Jul 25 14:21:26 CEST 2014


Tim King wrote:
> I am trying to direct users on the same nas to different realms based on
> the called-station-id I have tried the following wtihout success.  if
> ("%{Called-Station-Id}") == "6165551212" { update
> control{Proxy-To--Realm == myrealm}} Can anyone see what is wrong wtih
> the syntax in that?

  Formatting, for one.  The text you posted is NOT what's in your
configuration.  It's not appropriate to post random crap here, and hope
someone else figures it out.  You should instead post *exactly* what's
in your configuration file.

  For another, see the FAQ for "it doesn't work".  The debug output will
VERY OFTEN tell you exactly what's wrong.  But you need to (a) run the
server in debug mode, and (b) read it.

  And see "man unlang".  The "if" condition is unnecessarily
complicated.  The "update" section uses == instead of :=.

  This is documented.

  Try this:

	if (Called-Station-Id == "6165551212") {
		update control{
			Proxy-To--Realm := myrealm
		}
	}

  And read the debug output.  Really.  It helps.

  Alan DeKok.


More information about the Freeradius-Users mailing list