Dusty, Thanks for your fine input and the reminder on the index (I completely forgot about that). I'll give the ldap module filter a go with the attr_rewrite. I like keeping attributes with the user object, rather than spreading usernames around to various other objects. With this implementation, to me, the extra benefit is that I can just add a radiusGroupName attribute = X to each user object. BTW, on the attr_rewrite, can I use more advanced regex than just ................: ? It works and always will work, but it would be more clear in the config file if I could say "([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2}):" or something to that effect... I couldn't get ANY regex to work except the . Does that seem right? Stefan
Message: 4 Date: Mon, 19 Dec 2005 14:52:10 -0500 (EST) From: Dusty Doris <freeradius@mail.doris.cc> Subject: Re: Freeradius-Users Digest, Vol 8, Issue 82 To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Message-ID: <20051219143705.I21565@mail.doris.name> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Mon, 19 Dec 2005, Stefan Adams wrote:
Hey, guys! Thanks for the great replies!! I like what you suggested better than what I've come up with in the mean time. I think what I came up with will work, it just seems messy/wrong/inefficient. What do you think?
modules { ldap { : filter =
"(&(uid=%{Stripped-User-Name:-%{User-Name}}) (radiusGroupName=%{Called-Station-ID}))" : } attr_rewrite getssid { attribute = Called-Station-Id searchin = packet searchfor = ".................:" replacewith = "" ignore_case = yes new_attribute = no } }
authorize { # for WinXP, 802.1x, EAP-PEAP, MS-CHAPv2 preprocess eap getssid ldap }
This cuts off the first 17 bytes and then a colon of the Called-Station-ID (My AP transmits a dash separated MAC followed by a colon and then the SSID). Then it uses this rewritten Called-Station-ID and uses that as a filter in the LDAP search. Therefore, if the SSID a user tries to connect to is not listed as an attribute of the user's LDAP object, the user is denied.
Does that make sense?
That's a pretty neat idea. The benefit of that is if you had multiple ldap instances and wanted to implement fail-over within freeradius. To do it the traditional way, you would need this for fail-over with ldap-group checks if say you had two ldap instances.
DEFAULT Called-Station-Id =~ /studentregex/, ldap1-Ldap-Group == "students"
DEFAULT Called-Station-Id =~ /studentregex/, ldap2-Ldap-Group == "students"
That is so it will check with ldap1 instance first. If that fails, then check ldap2.
By doing it your way, you won't need to do that anymore. Instead a redundant block in authorize would get you what you need already since the radiusGroupname inside your search filter takes care of the Ldap-Group check.
I wonder if you could use regex matches of Called-Station-ID in the huntgroups file. You'll have to test this out, I doubt it would work, but its another interesting idea. I don't know if huntgroups excepts regex and if it can use things like Called-Station-Id
in huntgroups
students Called-Station-Id =~ /studentregex/ faculty Called-Station-Id =~ /facultyregex/
Then in users file.
DEFAULT Ldap-Group == %{Huntgroup-Name}
Or you're way.
(&(uid=%{Stripped-User-Name:-%{User-Name}})(radiusGroupName=%{Huntgroup-Name}))"
See doc/configurable_failover and doc/rlm_ldap to see what I'm talking about with the failover. If you have a load balancer in front of that ldap server, you won't need to worry about it. But if you don't and you want to add redundancy, then its something you'll need to think about some day. Freeradius can do the redundancy for you w/out a load balancer or shared IP using configurable failover. Actually in the upcoming 1.1 release it will also do load balancing for you in addition to failover inside your ldap blocks.
Hope I'm not too confusing. My point is I like your idea and if its working for you, it doesn't sound like a bad one to me. You might want to try hitting it hard to see if the rewrite slows anything down, but I would bet it doesn't.
I'd also make sure to add an eq index to radiusgroupname, since you'll be using that as part of your search filter.
Thanks for your fine input and the reminder on the index (I completely forgot about that). I'll give the ldap module filter a go with the attr_rewrite. I like keeping attributes with the user object, rather than spreading usernames around to various other objects. With this implementation, to me, the extra benefit is that I can just add a radiusGroupName attribute = X to each user object.
You can also use the ldap-group variable that I showed you before on the user level by defining the groupmembership_attribute. By default its radiusGroupname, so that should already work for you. So either way should work for you, personally, I like having it in the filter as your example showed. I am doing that now in a little different way. I'll write it up someday.
BTW, on the attr_rewrite, can I use more advanced regex than just ................: ? It works and always will work, but it would be more clear in the config file if I could say "([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2})-([A-F0-9]{2}):" or something to that effect... I couldn't get ANY regex to work except the . Does that seem right?
Stefan
Unfortunately, I don't know too much about attr_rewrite, but I'm sure some others on this list could help with that one. It looks about right to me.
I have an issue I want to ask for a little help with. We need our secondary to authenticate Propel users and I have made sure this is in my dictionary.propel file: ############################### VENDOR Propel 14895 BEGIN-VENDOR Propel ATTRIBUTE Propel-Accelerate 1 integer ATTRIBUTE Propel-Dialed-Digits 2 string ATTRIBUTE Propel-Client-IP-Address 3 ipaddr ATTRIBUTE Propel-Client-NAS-IP-Address 4 ipaddr ATTRIBUTE Propel-Client-Source-ID 5 integer ATTRIBUTE Propel-Content-Filter-ID 6 integer END-VENDOR Propel ############################### Also, the dictionary.propel is included correctly in the main dictionary file. I have added this line to my default user setup in the users file: ####### Propel-Accelerate = 1, ####### For some reason instead of getting this back when testing with my test client: ######### Propel-Accelerate = 1 ######### I get this: ######## unknown-vendor 14895, size 6 = " ######## Any idea why?
Just wanted to add to this that I find it strange that when I look at this at the debug console, it shows that it's sending the info correctly. The error appears only when testing from a remote client test utility called NT radping. #############Debug output############## Sending Access-Accept of id 0 to ##MyClientIPhere##:4117 Service-Type = Framed-User Framed-Protocol = PPP Session-Timeout = 86400 Idle-Timeout = 1200 Port-Limit = 2 Ascend-Data-Filter += "ip in forward tcp est" Ascend-Data-Filter += "ip in forward dstip ##MyMailIPrangeHere## 0" Ascend-Data-Filter += "ip in forward dstip ##MyMailIPrangeHere## 0" Ascend-Data-Filter += "ip in drop tcp dstport = 25" Ascend-Data-Filter += "ip in drop tcp srcport = 80" Ascend-Data-Filter += "ip in forward 0" Propel-Accelerate = 1 Finished request 0 Going to the next request #################################### ----- Original Message ----- From: "Mojo Jojo" <mylist@lightwavetech.com> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Monday, December 19, 2005 8:53 PM Subject: Propel - unknown-vendor 14895, size 6 = "
I have an issue I want to ask for a little help with.
We need our secondary to authenticate Propel users and I have made sure this is in my dictionary.propel file:
###############################
VENDOR Propel 14895
BEGIN-VENDOR Propel
ATTRIBUTE Propel-Accelerate 1 integer
ATTRIBUTE Propel-Dialed-Digits 2 string
ATTRIBUTE Propel-Client-IP-Address 3 ipaddr
ATTRIBUTE Propel-Client-NAS-IP-Address 4 ipaddr
ATTRIBUTE Propel-Client-Source-ID 5 integer
ATTRIBUTE Propel-Content-Filter-ID 6 integer
END-VENDOR Propel
###############################
Also, the dictionary.propel is included correctly in the main dictionary file.
I have added this line to my default user setup in the users file:
#######
Propel-Accelerate = 1,
#######
For some reason instead of getting this back when testing with my test client:
#########
Propel-Accelerate = 1
#########
I get this:
########
unknown-vendor 14895, size 6 = "
########
Any idea why?
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Mojo Jojo wrote:
Just wanted to add to this that I find it strange that when I look at this at the debug console, it shows that it's sending the info correctly. The error appears only when testing from a remote client test utility called NT radping.
I have been using the propel dictionary and propel clents in production for over a year with no difficulty and no special setup required for freeradius. -- Lewis Bergman Texas Communications 4309 Maple St. Abilene, TX 79602-8044 Off. 325-691-1301 Cell 325-439-0533 fax 325-695-6841
"Mojo Jojo" <mylist@lightwavetech.com> wrote:
For some reason instead of getting this back when testing with my test client: ... Propel-Accelerate = 1 ... I get this: ... unknown-vendor 14895, size 6 = "
Yes. You didn't add the Propel dictionary to the client. Please read the "man dictionary" page. It explains why this happens. Alan DeKok.
Whee can i define that freeradius should look at the ldap database for user accounts and not at the users list? Greetings Armin
Hi, you can adjust the LDAP section in radiusd.conf file to your LDAP server ( it's a directory rather than a database ;) ). When you have configured the connection between freeradius and LDAP, add ldap to autentication section and test it with radtest if you get an Access-Accept for an user from LDAP. Regards, Edvin Seferovic -----Original Message----- From: freeradius-users-bounces+edvin.seferovic=kolp.at@lists.freeradius.org [mailto:freeradius-users-bounces+edvin.seferovic=kolp.at@lists.freeradius.or g] On Behalf Of Armin Krämer Sent: Donnerstag, 19. Jänner 2006 15:50 To: 'FreeRadius users mailing list' Subject: Simple Question about LDAP Whee can i define that freeradius should look at the ldap database for user accounts and not at the users list? Greetings Armin - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Am Donnerstag, 19. Januar 2006 15:49 schrieb Armin Krämer:
Whee can i define that freeradius should look at the ldap database for user accounts and not at the users list?
Greetings
Armin
Read rlm_ldap in the doc directory. -- Dr. Michael Schwartzkopff MultiNET Services GmbH Bretonischer Ring 7 85630 Grasbrunn Tel: (+49 89) 456 911 - 0 Fax: (+49 89) 456 911 - 21 mob: (+49 174) 343 28 75 PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B Skype: misch42
participants (8)
-
Alan DeKok -
Armin Krämer -
Dusty Doris -
Lewis Bergman -
Michael Schwartzkopff -
Mojo Jojo -
Seferovic Edvin -
Stefan Adams