(RADIATOR) Maximun sessions

Hugh Irvine hugh at open.com.au
Wed Jul 24 19:16:52 CDT 2002


Hello Shaun -

There are two problems in what you show below.

The first is that MaxSessions will override any other simultaneous use 
checking, and the second is that Simultaneous-Use is a check item.

See below.

regards

Hugh


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>
            AcctLogFileName %L/detail


        WtmpFileName %L/wtmp


        PasswordLogFileName %L/password.log


      RejectHasReason
        AuthByPolicy    ContinueUntilAccept


        <AuthBy SQL>
                Identifier SQL
		DefaultSimultaneousUse 1
                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
		DefaultSimultaneousUse 1
                Filename        ./users
                        </AuthBy>


</Realm>


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"






On Wed, 24 Jul 2002 11:04, Shaun wrote:
> 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

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list