Proxy Config/File

Matthew Newton mcn at freeradius.org
Fri Apr 9 12:42:14 CEST 2021



On 09/04/2021 11:34, Pizu wrote:
> Is it possible to call multiple proxy files according to the source Ip
> Address/Range in the pre-proxy?

You can set which proxy to use by updating the Proxy-To-Realm control 
attribute in the authorize section.

> We would like to have the Switch with the 8021x calling a certain proxy
> file and if coming from VPN will call another.
> 
> Also if calling different files is not possible something similar to this..?
> 
>          if ((&NAS-IP-Address == 172.16.65.0/24) || (&NAS-IP-Address ==
> 172.16.193.0/24)) {
>                   **something here to use realm**
>                  }
> 
>          }
>          elsif (&NAS-IP-Address == 10.69.3.182) {
>                  **something here to use realm**
>                  }
>          }

Yes. Define your realms in proxy.conf, e.g.

home_server switch_realm {
   home_server = ...
   ...
}

home_server vpn_realm {
   home_server = ...
   ...
}

Then in authorize set Proxy-To-Realm as required, e.g.

if (...) {
   update control {
     Proxy-To-Realm := "switch_realm"
   }
}
else {
   update control {
     Proxy-To-Realm := "vpn_realm"
   }
}

-- 
Matthew


More information about the Freeradius-Users mailing list