Need a little regex help

Commonn Systems admin at commonn.com
Sat Sep 17 03:50:47 CEST 2011


I guess all the regex gurus will laugh at my request .... I figured it 
out, for others, looks like this works: .*:SSID_ABC !


On 9/16/2011 6:22 PM, Commonn Systems wrote:
> Hello list!
>
> After reading the list pretty much everyday for a month now, going 
> through the docs, manuals and a lot of googling (which always brought 
> me back to the list anyway), I have finally decided which way to go to 
> filter access to two SSIDs, for 2 groups.
> I am using FR 2.1.11 on Debian squeeze, against an AD domain with LDAP 
> membership lookup. I have 5 AP registered with FR, they each have 2 
> SSIDs that show in the request as MACADDRESS:SSID_ABC.
> Based on Phil Mayers  on this post, 
> http://freeradius.1045715.n5.nabble.com/How-do-I-have-one-Freeradius-server-hosting-multiple-ldap-instances-and-associate-each-SSID-with-pare-td2847210.html#a2850433 
> ,
> I would like to match the last 8 characters of the Called-Station-Id, 
> "SSID_ABC"
>
> authorize {
>    if (Called-Sation-Id == SOMEREGEX:SSID_ABC) {
>      update request {
>        Tmp-String-0 = "Staff"
>      }
>    }
>    elsif (Called-Sation-Id == SOMEREGEX:SSID_DEF) {
>      update request {
>        Tmp-String-0 = "Students"
>      }
>    }
> }
>
> Everything is working great, this is the last piece of the puzzle to 
> finalize the project.
> I understand, this does not have anything to do with the wonderful 
> software that freeradius is, but from what I have read, lots of people 
> on this list are very skilled with regex. Thank you so much for all 
> the work and help you put in here.
>
>
> Tossi
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html
>




More information about the Freeradius-Users mailing list