Re: (RADIATOR) Re: IPASS accouting

2003-01-23 Thread Ayotunde Itayemi
Hi Hugh,

As always you have been a Hugh help :-)

BTW I was trying to customise the AcctSQLStatement and get the
Acct-Session-Time to be logged
in minutes rather than seconds. I have tried various ways of dividing the
Acct-Session-Time by 60 but
with no luck (e.g., %{Acct-Session-Time}/60 :-)
Finally, I just implemented the division in the cgi script I wrote to fetch
rows from the IPASS accounting
table. The cgi scripts divides the Acct-Session-Time's column's content by
60 before displaying the result
in a webpage. My problem (now) is that I would like to know if it is
possible to restrict the number of decimal
digits in a webpage to say 1,2 or 3. The output at the moment on my HTML
pages have anything between
1 and 16 decimals digits! So Please if there is any HTML guru on the list,
help out!
Alternatively, I could go back to altering that AcctSQLStatement and putting
in the code to generate results
in 2 decimals places to start with :-)

Thanks.
"Radiator looks radiant!"

Regards,
Tunde Itayemi.

- Original Message -
From: "Hugh Irvine" <[EMAIL PROTECTED]>
To: "Ayotunde Itayemi" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 1:36 AM
Subject: (RADIATOR) Re: IPASS accouting


>
> Hello Tunde -
>
> The radius accounting stop records should already contain an
> "Acct-Session-Time" attribute containing the duration of the session.
>
> So you just need to add the corresponding column to your database and
> alter the AcctColumnDef's accordingly.
>
> 
>  Identifier IPASSSQLAccounting
>   DBSource dbi:Oracle:radius00
>   DBUsername radiusgold
>   DBAuth radiusgold
>   HandleAcctStatusTypes Start, Stop
>   AuthSelect
>  AccountingTable IPASSACCOUNTING
>  AcctColumnDef USERNAME, User-Name
>  AcctColumnDef ACCTSTATUSTYPE, Acct-Status-Type
>  AcctColumnDef TIME, Timestamp, integer-date
>  AcctColumnDef NASIDENTIFIER, NAS-Identifier
>  AcctColumnDef FRAMEDIPADDRESS, Framed-IP-Address
>  AcctColumnDef TIMESTAMP, Timestamp
>  AcctColumnDef SESSIONTIME, Acct-Session-Time
> 
>
>
> regards
>
> Hugh
>
>
> On Tuesday, Jan 21, 2003, at 19:57 Australia/Melbourne, Ayotunde
> Itayemi wrote:
>
> > Hi Hugh,
> >
> > Thanks for your help.
> > I have a table that looks like (below) now.
> >
> > USERNAME   ACCTSTYPETIME
> > NAS-IDENTIFIERFRAMED-IP-ADDRESSTIMESTAMP
> > [EMAIL PROTECTED] Start
> > Jan
> > 21, 2003 07:02 viruse180.247.158.69
> > 1043136137
> > [EMAIL PROTECTED] Stop
> > Jan 21,
> > 2003 08:51 viruse180.247.158.69
> > 1043142670
> > [EMAIL PROTECTED] StartJan
> > 16,
> > 2003 22:58 viruse180.247.158.68
> > 1042761506
> > [EMAIL PROTECTED] StopJan
> > 16, 2003
> > 23:12 viruse180.247.158.68
> > 1042762372
> >
> > Now, is there a way I can generate accounting records that show how
> > long the
> > particular IPASS user was logged on? I guess such a
> > record would have to be logged when the accounting stop packet is sent
> > to
> > radiator. So that I have a table such as:
> >
> > USERNAME   ACCTSTYPETIME
> > NAS-IDENTIFIERFRAMED-IP-ADDRESS
> > [EMAIL PROTECTED] Stop
> > 30:00
> > viruse180.247.158.69
> > [EMAIL PROTECTED] Stop
> > 15:00
> > viruse180.247.158.69
> > [EMAIL PROTECTED] Stop17:23
> > viruse180.247.158.68
> > [EMAIL PROTECTED] Stop1:12:02
> > viruse180.247.158.68
> >
> > where the "TIME" column is the length of time the user spemt online. (I
> > don't really need the ACCTSTYPE column)
> >
> > My config at the moment is as below:
> >
> > 
> > Identifier IPASSSQLAccounting
> >  DBSource dbi:Oracle:radius00
> >  DBUsername radiusgold
> >  DBAuth radiusgold
> >  HandleAcctStatusTypes Start, Stop
> >  AuthSelect
> > AccountingTable IPASSACCOUNTING
> > AcctColumnDef USERNAME, User-Name
> > AcctColumnDef ACCTSTATUSTYPE, Acct-Status-Type
> > AcctColumnDef TIME, Timest

(RADIATOR) Re: IPASS accouting

2003-01-21 Thread Hugh Irvine

Hello Tunde -

The radius accounting stop records should already contain an 
"Acct-Session-Time" attribute containing the duration of the session.

So you just need to add the corresponding column to your database and 
alter the AcctColumnDef's accordingly.


Identifier IPASSSQLAccounting
 DBSource dbi:Oracle:radius00
 DBUsername radiusgold
 DBAuth radiusgold
 HandleAcctStatusTypes Start, Stop
 AuthSelect
AccountingTable IPASSACCOUNTING
AcctColumnDef USERNAME, User-Name
AcctColumnDef ACCTSTATUSTYPE, Acct-Status-Type
AcctColumnDef TIME, Timestamp, integer-date
AcctColumnDef NASIDENTIFIER, NAS-Identifier
AcctColumnDef FRAMEDIPADDRESS, Framed-IP-Address
AcctColumnDef TIMESTAMP, Timestamp
AcctColumnDef SESSIONTIME, Acct-Session-Time



regards

Hugh


On Tuesday, Jan 21, 2003, at 19:57 Australia/Melbourne, Ayotunde 
Itayemi wrote:

Hi Hugh,

Thanks for your help.
I have a table that looks like (below) now.

USERNAME   ACCTSTYPETIME
NAS-IDENTIFIERFRAMED-IP-ADDRESSTIMESTAMP
[EMAIL PROTECTED] Start
Jan
21, 2003 07:02 viruse180.247.158.69
1043136137
[EMAIL PROTECTED] Stop
Jan 21,
2003 08:51 viruse180.247.158.69
1043142670
[EMAIL PROTECTED] StartJan 
16,
2003 22:58 viruse180.247.158.68
1042761506
[EMAIL PROTECTED] StopJan 
16, 2003
23:12 viruse180.247.158.68
1042762372

Now, is there a way I can generate accounting records that show how 
long the
particular IPASS user was logged on? I guess such a
record would have to be logged when the accounting stop packet is sent 
to
radiator. So that I have a table such as:

USERNAME   ACCTSTYPETIME
NAS-IDENTIFIERFRAMED-IP-ADDRESS
[EMAIL PROTECTED] Stop
30:00
viruse180.247.158.69
[EMAIL PROTECTED] Stop
15:00
viruse180.247.158.69
[EMAIL PROTECTED] Stop17:23
viruse180.247.158.68
[EMAIL PROTECTED] Stop1:12:02
viruse180.247.158.68

where the "TIME" column is the length of time the user spemt online. (I
don't really need the ACCTSTYPE column)

My config at the moment is as below:


Identifier IPASSSQLAccounting
 DBSource dbi:Oracle:radius00
 DBUsername radiusgold
 DBAuth radiusgold
 HandleAcctStatusTypes Start, Stop
 AuthSelect
AccountingTable IPASSACCOUNTING
AcctColumnDef USERNAME, User-Name
AcctColumnDef ACCTSTATUSTYPE, Acct-Status-Type
AcctColumnDef TIME, Timestamp, integer-date
AcctColumnDef NASIDENTIFIER, NAS-Identifier
AcctColumnDef FRAMEDIPADDRESS, Framed-IP-Address
AcctColumnDef TIMESTAMP, Timestamp


 Identifier myIPADDRESSauth
 Allocator mySQLallocator
 PoolHint %{Client:Identifier}
 MapAttribute   yiaddr, Framed-IP-Address
 MapAttribute   subnetmask, Framed-IP-Netmask
 StripFromReply PoolHint
 AddToReply MS-MPPE-Encryption-Policy = 1, 
MS-MPPE-Encryption-Types
= 6
 AddToReply MS-MPPE-Send-Key, MS-MPPE-Recv-Key
 DefaultSimultaneousUse 1
 
 
 Identifier noIPADDRESSauth
 Allocator mySQLallocator
 MapAttribute   yiaddr, Framed-IP-Address
 MapAttribute   subnetmask, Framed-IP-Netmask
 StripFromReply PoolHint
 AddToReply MS-MPPE-Encryption-Policy = 1, 
MS-MPPE-Encryption-Types
= 6
 AddToReply MS-MPPE-Send-Key, MS-MPPE-Recv-Key
 DefaultSimultaneousUse 1
 

 Identifier pattonIPADDRESSauth
 Allocator mySQLallocator
MapAttribute   yiaddr, Framed-IP-Address
MapAttribute   subnetmask, Framed-IP-Netmask
StripFromReply PoolHint
 DefaultSimultaneousUse 1
 
 ## proxy radius for IPASS
 
 Identifier  ipassNetserver
 Host63.10.24.21
 Secret
 AuthPort11812
 AcctPort11813
AddToRequest Called-Station-Id=%{Called-Station-Id},
NAS-IP-Address=%N
DefaultSimultaneousUse 1
 

 #=== HANDLERs   
 
 RewriteUsername
s/^IPASS\/([^#]+)\#([^@]+)\@myipass$/IPASS\/$1\@$2/
 AuthByPolicy ContinueAlways
 AuthBy IPASSSQLAccounting
 AuthBy ipassNetserver
 





--
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, softw