On 07/30/2012 12:58 PM, Luke Liu wrote: > Dear Radiator Support,
Hello Luke, just a quick note about our lists: We do have a separate list for email support contract holders in addition to this public list. Please see http://www.open.com.au/mailing.html for more information > We use group column on subscriber table to diff static IP address and > Dynamic IP address for user > example > > table: subscriber > username password group > [email protected] <mailto:[email protected]> 1 0 > [email protected] <mailto:[email protected]> 1 1 > > user in group 0 will get static IP address, in group 1 is for dynamic IP > address. Please see below for an idea of using AuthBy GROUP to handle the two different allocation methods. > Now I can assign Dynamic IP on radiator with following > > <AddressAllocator SQL> > Identifier SQLAllocator > .......... > </AddressAllocator> > <Realm xxx.com> > AuthByPolicy ContinueWhileAccept > <AuthBy SQL> > .......... > #Authenticate the user with SQL > AuthSelect select password from subscriber where username= ? > AuthSelectParam %0 > ...... > > </AuthBy> > <AuthBy DYNADDRESS> > Identifier AllocateIPAddress > AddressAllocator SQLAllocator > PoolHint pool1 > MapAttribute yiaddr, Framed-IP-Address > StripFromReply PoolHint > </AuthBy> > </Realm> > > > However I do not know how to assign static IP for group 0 user? Can you > help me? You could consider AuthBy GROUP. Try something like this: <Realm xxx.com> AuthByPolicy ContinueWhileReject <AuthBy GROUP> AuthByPolicy ContinueWhileAccept # Your current AuthBy SQL with one change AuthSelect select password from subscriber where username=? and group=1 # Your current AuthBy DYNADDRESS </AuthBy> <AuthBy SQL> AuthSelect select password from subscriber where username=? and group=0 # Possibly pull the address with select too </AuthBy> </Realm> Thanks, Heikki -- Heikki Vatiainen <[email protected]> Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc. _______________________________________________ radiator mailing list [email protected] http://www.open.com.au/mailman/listinfo/radiator
