(RADIATOR) Maximun sessions
Paul O'Shea
paul at level9.net
Tue Jul 23 22:20:47 CDT 2002
by only once I'm presuming you mean for the account not to be used more than once simultaneously... there is probably a better way, but maybe you could add an extra field "state" or something similar and use a postauthhook to set state to 1 once they login, then have a prehook to check state when users login, to ensure its set to zero... but then you might end with probs when you don't get 'stop' records to clear the state... anyway I'm sure Hugh has a much cleverer solution :-)
Paul
----- Original Message -----
From: Shaun
To: radiator at open.com.au
Sent: Wednesday, July 24, 2002 2:04 AM
Subject: (RADIATOR) Maximun sessions
Hello,
I'm using radiator for prepaid and post internet service. I have it set up so that for prepaid it grabs users from an informix database and substracts time and so forth. The problem that i'm having is that i only want users from this particular database to be able to log in only once. Post-paid users on the other hand authenticate from a flat users file an will have the privelege to be able to do multiple loggin sessions.I would like to know how to specify different "Maximum Sessions" for each. Here is an example of my config file
# more radius.cfg
Foreground
LogStdout
Trace 4
PidFile /tmp/radiusd.pid
LogDir .
DbDir .
LogFile %L/logfile
DictionaryFile %D/dictionary
<Client 206.27.238.242>
Secret ***********
</Client>
<Client 206.153.59.179>
Secret *********
</Client>
#DupInterval 0
<Realm DEFAULT>
MaxSessions 1
AcctLogFileName %L/detail
WtmpFileName %L/wtmp
PasswordLogFileName %L/password.log
RejectHasReason
AuthByPolicy ContinueUntilAccept
<AuthBy SQL>
Identifier SQL
DBSource dbi:Informix:tis
DBUsername informix
DBAuth l1gaw01
AuthSelect select password, balancetime from subscribers where (
username='%n' and balancetime > 0)
AuthColumnDef 0,Password,check
AuthColumnDef 1,Session-Timeout,reply
AddToReply Service-Type = Framed-User,Framed-Protocol = PPP
AcctSQLStatement update subscribers set balancetime=balancetime-0%{Acct-
Session-Time} where username='%n'
</AuthBy>
<AuthBy FILE>
Identifier File
Filename ./users
</AuthBy>
</Realm>
And here is an example of our users file:
prepaid Password = "prepaid"
Simultaneous-Use = 2,
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Netmask = 255.255.255.255,
Framed-Routing = None,
Framed-MTU = 1500,
Framed-Compression = Van-Jacobson-TCP-IP,
Session-Timeout = 300,
Primary-DNS-Server = 206.27.238.61,
Secondary-DNS-Server = 206.27.238.61,
Client-Assign-DNS = Yes,
cisco-avpair = "ip:dns-servers=206.27.238.61 206.27.238.61"
Could you tell me what i'm doing wrong?
Regards
Shaun Eck
Belize Telecom Ltd
Belize City, Belize
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20020724/0165f5d7/attachment.html>
More information about the radiator
mailing list