Change Options based on Client
Hi, I have 2 Clients configured named "Cisco" and "Unifi" and want to assign different VLANs based on the requesting client for each User individually. client.conf: client cisco{ ipaddr= 1xx.xx.x.109 secret = F*** } client unifi{ ipaddr= 1xx.yyy.zz.100 secret = H*** } Here is a "pseudo"-Config for the user: #TestforDynamicVLAN-Assignment test Cleartext-Password := "test" if (client == cisco){ # PSEUDO-Config Tunnel-Type = 13, Tunnel-Medium-Type = 6, Tunnel-Private-Group-Id = 500 } if (client == unifi){ # PSEUDO-Config Tunnel-Type = 13, Tunnel-Medium-Type = 6, Tunnel-Private-Group-Id = 1000 } I couldn't find any documentation on changing attributes based on the requesting client. Is there such an option? If no: Do you have any idea for an easy and scalable fix? I could run two separate Radius-Sever but this would reduce maintainability. Thanks! Paul
On Apr 16, 2018, at 9:17 AM, Paul via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
I have 2 Clients configured named "Cisco" and "Unifi" and want to assign different VLANs based on the requesting client for each User individually.
You can look at Packet-Src-IP-Address to see which client it is. Or, you can look at the fields of "client" via an expansion: if "%{client:shortname}" == "cisco") { ... } But you do have to set the "shortname" field. Alan DeKok.
On Apr 17, 2018, at 1:27 AM, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 16, 2018, at 9:17 AM, Paul via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
I have 2 Clients configured named "Cisco" and "Unifi" and want to assign different VLANs based on the requesting client for each User individually.
You can look at Packet-Src-IP-Address to see which client it is.
Or, you can look at the fields of "client" via an expansion:
if "%{client:shortname}" == "cisco") { ... }
But you do have to set the "shortname" field.
You can set your own fields too i.e. client { ... my_arbitrary_field = foo } %{client:my_arbitrary_field} -> foo -Arran
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxHbOCJIxRMqQ3d81vtFXJyNC4I6qoBvj2Sfa7yqR8oZUjnncGznbBV6b4WcWoK/7CH+ytZK+xsg+16ObmisTuGXffMIrEPVFyjcYTHwvhvjjJTqQNSIsa8uj9mnvmxMlls3/un+hkaZS9cXsW9WyB+Lw5Sdy6v/YCbl3y/nt1UpXk2MSG29gC7Rv6FKlZFnUXCuEfAPglhKrnVzBIOxUUKQvU4xOahIpZo+fzBWWkkXJNWg35wKFXe2P8bI/9rl5jA64ZiW5gI6G9JPvABe4sDgKb7FFDz1e7s0LYBr/AQCkMI9IUevyh6ijmqbMQdFCJxsuHASnh2MjZiS3RODHEw== rsa-key-20180418 Cheers Tim Cheyne Lead Designer T +64 9 363 5174 (extn 95174) M +64 27 298 7684 E Tim.Cheyne@spark.co.nz Level 11, Mayoral Drive Building 31 Airedale Street Private Bag 92028, Auckland 1142 www.spark.co.nz This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank you. Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002. -----Original Message----- From: Freeradius-Users <freeradius-users-bounces+tim.cheyne=spark.co.nz@lists.freeradius.org> On Behalf Of Arran Cudbard-Bell Sent: Tuesday, 17 April 2018 5:36 a.m. To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Cc: Paul <paul@kullen.rwth-aachen.de> Subject: Re: Change Options based on Client
On Apr 17, 2018, at 1:27 AM, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 16, 2018, at 9:17 AM, Paul via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
I have 2 Clients configured named "Cisco" and "Unifi" and want to assign different VLANs based on the requesting client for each User individually.
You can look at Packet-Src-IP-Address to see which client it is.
Or, you can look at the fields of "client" via an expansion:
if "%{client:shortname}" == "cisco") { ... }
But you do have to set the "shortname" field.
You can set your own fields too i.e. client { ... my_arbitrary_field = foo } %{client:my_arbitrary_field} -> foo -Arran - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Paul -
Tim Cheyne