Hi, Is it possible to call multiple proxy files according to the source Ip Address/Range in the pre-proxy? 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** } } Regards, Pizu
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
Both VPN And Switches are going to use same realm as a name but the auth and accounting is different, is there a way to do it? Regards, Pizu On Fri, 9 Apr 2021 at 12:42, Matthew Newton <mcn@freeradius.org> wrote:
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 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Apr 9, 2021, at 8:58 AM, Pizu <pizpower@gmail.com> wrote:
Both VPN And Switches are going to use same realm as a name but the auth and accounting is different, is there a way to do it?
Please read raddb/proxy.conf. This is extensively documented. There are clear examples of how to set home servers for a realm, where the home servers are different for auth / acct. Alan DeKok.
Hi, So I managed to do it. My only concern is the below: (2) WARNING: You set Proxy-To-Realm = Realm_802Dot1x_Auth, but it is a LOCAL realm! Cancelling proxy request. Is it because the FreeRadius server is in the same realm? Regards, Pizu On Fri, 9 Apr 2021 at 15:02, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 9, 2021, at 8:58 AM, Pizu <pizpower@gmail.com> wrote:
Both VPN And Switches are going to use same realm as a name but the auth and accounting is different, is there a way to do it?
Please read raddb/proxy.conf. This is extensively documented.
There are clear examples of how to set home servers for a realm, where the home servers are different for auth / acct.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
Matthew Newton -
Pizu