Thanks a lot Brian, it worked perfect! For the record: I just moved the VLAN assigning code: if (LDAP-Group == 10000 ) { update reply { Service-Type = Framed-User Tunnel-Type = 13 Tunnel-Medium-Type = 6 Tunnel-Private-Group-ID = 20 } } if (LDAP-Group == 10001 ) { update reply { Service-Type = Framed-User Tunnel-Type = 13 Tunnel-Medium-Type = 6 Tunnel-Private-Group-ID = 40 } }
From the post-auth section at default site to post-auth section of inner-tunnel site. And changed the if (0) block code to if (1) in the inner-tunnel, after those 2 simple changes it worked as expected.
Thanks a lot again. Jaume. Missatge de Brian Julin <BJulin@clarku.edu> del dia dt., 31 de maig 2022 a les 20:02:
Jaume Obrador Vaquer <jobrador@lledoner.com> wrote:
Hi, we’ve set up freeradius 3.0 in order to authenticate users through an LDAP server, also users are assigned different VLAN depending on gidNumber ldap attribute. We have 2 enabled sites ‘default’ and ‘inner-tunnel’
You should be performing LDAP in the inner-tunnel server, not the default server, and use the EAP-PEAP copy_request_to_tunnel option to get stuff from the outer layer into the inner server, if you need it. Then use an update outer.session-state {} clause to get stuff back out to the outer (default) server as needed.
Alternatively you can do some LDAP post-auth lookup stuff after leaking the inner-tunnel username back into the outer session, but you definitely want to do the actual "authenticate" step in the inner tunnel, whether that be by AD or LDAP.
There should be a few examples of these configurations around by now.
Also, FWIW, windows clients will postpend your domain name on the value in the "identity privacy" field. So if the username is foo@test.com and they put "anon" in this feild, the outer identity will be "anon@test.com". JFYI. Most other clients let you set a different domain if you want, Windows won't. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- *Informació sobre protecció de dades: El responsable del tractament de les dades personals del destinatari és el remitent de la present comunicació. Aquestes dades són tractades per a la satisfacció del nostre interès legítim per a la gestió de contactes i el manteniment de comunicacions recíproques per qüestions derivades de la nostra activitat. Aquestes dades seran conservades mentre siguin útils per a la finalitat indicada, i, en tot cas, durant els terminis legals i per al temps necessari per atendre a possibles responsabilitats nascudes del tractament. Els interessats tenen dret a sol·licitar l'accés a les seves dades personals, la seva rectificació, supressió o portabilitat, la limitació del seu tractament, a oposar-se al tractament, així com a presentar una reclamació davant una autoritat de control.* _Aquest missatge i els seus documents adjunts són confidencials. Si vostè no és el destinatari, per favor posi-ho en coneixement del remitent i elimini aquesta comunicació i els documents adjunts del seu sistema, sense reproduir ni comunicar els seus continguts. La transmissió de correu electrònic no garanteix que sigui segur o lliure d'error, per la qual cosa, declinem qualsevol responsabilitat sobre aquest tema._