<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 4 Oct 2011, at 13:32, Alejandro Gandara wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi list,<br><br>Im using freeradius 2.1.10 with ldap and I have a doubt. <br><br>Im testing radius with two NAS , first one an openvpn service and the other one is a switch Procurve. <br><br>My question is the following:<br>
<br> Can I configure the openvpn nas to read some attribute from the ldap ( as framedipaddress) and at the same time configure switch procurve to read the attribute pool-name from the radius?<br> How can I tell freeradius which attribute read for each nas?<br>
<br>For example: <br><br>User1 connect trhough openvpn so it will get the ip provided from framedipaddress attribute.<br>User 1 disconnect openvpn<br>User 1 connect with wired connection so it will get the IP provided for ippool after read poolname attribute from ldap.<br></blockquote><div><br></div><div>Sure...</div><div><br></div><div>sites-available/default</div><div><br></div><div>authorize {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if(Client-shortname == 'openvpn'){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>update reply {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Framed-IP-Address := "%{ldap:my ldap query}"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>else {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>update reply {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>My-Other-Attribute := "%{ldap:my ldap query}"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>}</div><div><br></div><div>clients.conf </div><div><br></div><div>client <foo ip> {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>shortname = openvpn</div><div>}</div><div><br></div><div><br></div></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Arran Cudbard-Bell<br><a href="mailto:a.cudbardb@freeradius.org">a.cudbardb@freeradius.org</a><br><br>Betelwiki, Betelwiki, Betelwiki....<span class="Apple-converted-space"> </span>http://wiki.freeradius.org/ !</div></span></div></span></span>
</div>
<br></body></html>