RE: NAS in sql and returning specific VSAs
Sorry, CTRL+Enter is not a good keyboard on Monday Morning ;) So, I return to the NAS some VSAs depending LDAP Group like this : if (Ldap-Group == "MyGroup") { update reply { # Rules for Cisco Routeurs Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15" # Rule for 3Com Access Service-Type += Login-User Login-Service += Telnet Login-Service += 3com-50 H3C-Exec_Privilege = 3 3Com-User-Access-Level = 3Com-Manager #AV-Pair for F5 BigIP LTM Access (see /usr/share/freeradius/dictionnary.f5) F5-LTM-User-Role = Manager F5-LTM-User-Info-1 = myGroup F5-LTM-User-Partition = Common F5-LTM-User-Shell = bpsh Etc . Is there any to check a NAS attribute to split replies, with sort of VSAs groups for each NAS type, in post-auth ? I have the following nas table : mysql> describe nas; +-------------+--------------+------+-----+---------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | nasname | varchar(128) | NO | MUL | NULL | | | shortname | varchar(32) | YES | | NULL | | | type | varchar(30) | YES | | other | | | ports | int(5) | YES | | NULL | | | secret | varchar(60) | NO | | secret | | | server | varchar(64) | YES | | NULL | | | community | varchar(50) | YES | | NULL | | | description | varchar(200) | YES | | RADIUS Client | | +-------------+--------------+------+-----+---------------+----------------+ Thanks in advance for your help ! Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits <mailto:fabien.vincent@coreye.fr> fabien.vincent@coreye.fr coreye Parc de la Haute Borne 22, rue Hergé 59650 Villeneuve d'Ascq <http://www.pictime.com/> www.pictime.com De : Vincent, Fabien Envoyé : lundi 7 novembre 2011 10:31 À : 'freeradius-users@lists.freeradius.org' Objet : NAS in sql and returning specific VSAs Hi all, I have one question about Free Radius and NAS in sql database. I return to the NAS some VSAs depending LDAP User-Group like this : Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits <mailto:fabien.vincent@coreye.fr> fabien.vincent@coreye.fr coreye Parc de la Haute Borne 22, rue Hergé 59650 Villeneuve d'Ascq <http://www.pictime.com/> www.pictime.com
Hi all, I just tried using if(%Client-Type == 'cisco'){ Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15" } In section post-auth or authorize but it doesnt work. I have the following message : "update" sections cannot have subsections Is there any way to update the Attribute sent by the radius server when authenticate on a specific NAS / Client ? Regards, Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits <mailto:fabien.vincent@coreye.fr> fabien.vincent@coreye.fr De : Vincent, Fabien Envoyé : lundi 7 novembre 2011 10:36 À : Vincent, Fabien; freeradius-users@lists.freeradius.org Objet : RE: NAS in sql and returning specific VSAs Sorry, CTRL+Enter is not a good keyboard on Monday Morning ;) So, I return to the NAS some VSAs depending LDAP Group like this : if (Ldap-Group == "MyGroup") { update reply { # Rules for Cisco Routeurs Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15" # Rule for 3Com Access Service-Type += Login-User Login-Service += Telnet Login-Service += 3com-50 H3C-Exec_Privilege = 3 3Com-User-Access-Level = 3Com-Manager #AV-Pair for F5 BigIP LTM Access (see /usr/share/freeradius/dictionnary.f5) F5-LTM-User-Role = Manager F5-LTM-User-Info-1 = myGroup F5-LTM-User-Partition = Common F5-LTM-User-Shell = bpsh Etc . Is there any to check a NAS attribute to split replies, with sort of VSAs groups for each NAS type, in post-auth ? I have the following nas table : mysql> describe nas; +-------------+--------------+------+-----+---------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | nasname | varchar(128) | NO | MUL | NULL | | | shortname | varchar(32) | YES | | NULL | | | type | varchar(30) | YES | | other | | | ports | int(5) | YES | | NULL | | | secret | varchar(60) | NO | | secret | | | server | varchar(64) | YES | | NULL | | | community | varchar(50) | YES | | NULL | | | description | varchar(200) | YES | | RADIUS Client | | +-------------+--------------+------+-----+---------------+----------------+ Thanks in advance for your help ! Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits <mailto:fabien.vincent@coreye.fr> fabien.vincent@coreye.fr De : Vincent, Fabien Envoyé : lundi 7 novembre 2011 10:31 À : 'freeradius-users@lists.freeradius.org' Objet : NAS in sql and returning specific VSAs Hi all, I have one question about Free Radius and NAS in sql database. I return to the NAS some VSAs depending LDAP User-Group like this : Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits <mailto:fabien.vincent@coreye.fr> fabien.vincent@coreye.fr
I just love it when people invent syntaxes... if(cisco-avpair){ update reply { Service-Type = NAS-Prompt-User Cisco-AVpair = "shell:priv-lvl=15" } } Should work... -Arran On 8 Nov 2011, at 18:28, Vincent, Fabien wrote:
Hi all,
I just tried using
if(%Client-Type == 'cisco'){ Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15" }
In section post-auth or authorize but it doesn’t work. I have the following message :
"update" sections cannot have subsections
Is there any way to update the Attribute sent by the radius server when authenticate on a specific NAS / Client ?
Regards,
Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits fabien.vincent@coreye.fr
De : Vincent, Fabien Envoyé : lundi 7 novembre 2011 10:36 À : Vincent, Fabien; freeradius-users@lists.freeradius.org Objet : RE: NAS in sql and returning specific VSAs
Sorry, CTRL+Enter is not a good keyboard on Monday Morning ;)
So, I return to the NAS some VSAs depending LDAP Group like this :
if (Ldap-Group == "MyGroup") { update reply { # Rules for Cisco Routeurs Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15"
# Rule for 3Com Access Service-Type += Login-User Login-Service += Telnet Login-Service += 3com-50 H3C-Exec_Privilege = 3 3Com-User-Access-Level = 3Com-Manager
#AV-Pair for F5 BigIP LTM Access (see /usr/share/freeradius/dictionnary.f5) F5-LTM-User-Role = Manager F5-LTM-User-Info-1 = myGroup F5-LTM-User-Partition = Common F5-LTM-User-Shell = bpsh
Etc ….
Is there any to check a NAS attribute to split replies, with sort of VSAs groups for each NAS type, in post-auth ?
I have the following nas table :
mysql> describe nas; +-------------+--------------+------+-----+---------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | nasname | varchar(128) | NO | MUL | NULL | | | shortname | varchar(32) | YES | | NULL | | | type | varchar(30) | YES | | other | | | ports | int(5) | YES | | NULL | | | secret | varchar(60) | NO | | secret | | | server | varchar(64) | YES | | NULL | | | community | varchar(50) | YES | | NULL | | | description | varchar(200) | YES | | RADIUS Client | | +-------------+--------------+------+-----+---------------+----------------+
Thanks in advance for your help !
Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits fabien.vincent@coreye.fr
De : Vincent, Fabien Envoyé : lundi 7 novembre 2011 10:31 À : 'freeradius-users@lists.freeradius.org' Objet : NAS in sql and returning specific VSAs
Hi all,
I have one question about Free Radius and NAS in sql database.
I return to the NAS some VSAs depending LDAP User-Group like this :
Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits fabien.vincent@coreye.fr
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Arran Cudbard-Bell a.cudbardb@networkradius.com Technical consultant and solutions architect 15 Ave. du Granier, Meylan, France +33 4 69 66 54 50
Hi,
Hi all,
I just tried using
if(%Client-Type == 'cisco'){
Service-Type = NAS-Prompt-User
cisco-avpair = "shell:priv-lvl=15"
}
if(%Client-Type == 'cisco'){ update reply { Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15" } } ? alan
For the solution, I did that : authorize { + update request { + FreeRADIUS-Client-NAS-Type = "%{sql:SELECT type FROM nas WHERE nasname='%{Packet-Src-IP-Address}'}" + } group { LDAP_COMPANY } And in the section post-auth, I did : + if ("%{FreeRADIUS-Client-NAS-Type}" == "cisco") { + update reply { + Service-Type = NAS-Prompt-User + cisco-avpair = "shell:priv-lvl=15" + } + } + elsif ("%{FreeRADIUS-Client-NAS-Type}" == "bigip-ltm") { + update reply { + F5-LTM-User-Role = Administrator + F5-LTM-User-Info-1 = myuserinfo + F5-LTM-User-Partition = Common + F5-LTM-User-Shell = bpsh + } + } And this works ... Thanks for your help !!! Fabien VINCENT Ingénieur Réseaux & Sécurité / ASSR Produits Niveau 3 - Infrastructure & Produits fabien.vincent@coreye.fr -----Message d'origine----- De : freeradius-users-bounces+fabien.vincent=coreye.fr@lists.freeradius.org [mailto:freeradius-users-bounces+fabien.vincent=coreye.fr@lists.freeradius.o rg] De la part de Alan Buxey Envoyé : mardi 8 novembre 2011 18:39 À : FreeRadius users mailing list Objet : Re: NAS in sql and returning specific VSAs Hi,
Hi all,
I just tried using
if(%Client-Type == 'cisco'){
Service-Type = NAS-Prompt-User
cisco-avpair = "shell:priv-lvl=15"
}
if(%Client-Type == 'cisco'){ update reply { Service-Type = NAS-Prompt-User cisco-avpair = "shell:priv-lvl=15" } } ? alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html -- Ce message a ete verifie par MailScanner.
participants (3)
-
Alan Buxey -
Arran Cudbard-Bell -
Vincent, Fabien