Server switch

Matthew Newton mcn4 at leicester.ac.uk
Tue Mar 26 11:23:47 CET 2013


On Tue, Mar 26, 2013 at 10:53:36AM +0100, Emmanuel BILLOT wrote:
> Considering request show lines like
> Called-Station-Id = "C0-8A-DE-3D-B4-09:TEST"
> or
> Called-Station-Id = "C0-8A-DE-3D-B4-09:WIFI"
> 
> where TEST and WIFI are the SSID concerned.
> 
> How can we route request to different ports of the server (so
> instances) by using this ?
> I mean when SSID is TEST, request is redirected to local instance on
> port 1820, and when SSID is WIFI, request is redirected to local
> instance on port 1821 ?

Set up proxy.conf with entries for the right ports, then you
should be able to do something like (example, untested):

authorize {

  if (Calling-Station-Id =~ /^.*:([a-zA-Z]+)$/) {
    update control {
      Tmp-String-0 := %{1}
    }
  }
  
  switch "%{Tmp-String-0}" {
    case 'TEST' {
       update control {
          Proxy-To-Realm := testproxy
       }
    }
    case 'WIFI' {
       update control {
          Proxy-To-Realm := wifiproxy
       }
    }
    ...
  }

}

This should work between different servers; I'm not sure if you'll
hit the "only one internal proxy" limit on one server.

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>


More information about the Freeradius-Users mailing list