[RADIATOR] AddToReply with condition

Nuno Marques nmarques at ubi.pt
Tue Apr 9 05:49:57 CDT 2013


Hello everyone,

After good authentication I want to check if the the user exists in a DB (BlackList) and, if yes, put him in a specific VLAN. Made some research and the <Handler , , , > seemed to be the solution but it doesn’t support attributes that are queries to DB, am I correct?. Can you aid me on this? Thanks in advance.

Best regards,
Nuno Marques


<Handler Realm=/^ubi.pt$/i>
AuthByPolicy ContinueAlways
AuthBy SQLAccounting
AuthBy PEAP_IAS

AuthBy BlackList

AuthLog localusers
</Handler>

<Authby SQL>
Identifier BlackList
DBSource dbi:mysql:BLACKLIST
DBUsername xxx
                DBAuth xxx
                Timeout 600
                SQLRetries 4
                FailureBackoffTime 10

                If  (AuthSelect SELECT username from BLACKLIST where username=%0) != NULL then

AddToReply Tunnel-Type=1:VLAN,Tunnel-Medium-Type=1:Ether_802,Tunnel-Private-Group-ID=3002


</AuthBy>



________________________________

UBI amiga do ambiente: Antes de imprimir este e-mail pense bem se tem mesmo que o fazer. As árvores são um bem imprescindível.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20130409/59b8231e/attachment.html 


More information about the radiator mailing list