(RADIATOR) MaxSession

Mohammed Adam adam at kccg.com
Mon Jun 4 05:03:19 CDT 2001


Hi all

i'm facing a problem with Maxsessions, it doesnt work the following is my Radius config file

#  

Foreground
LogStdout
LogDir		.
DbDir		.
DictionaryFile d:\radiator-demo-2.18\dictionary.cisco
Trace 4

# For testing: this allows us to honour requests from radpwtst 
# on the same host.
<Client localhost>
	Secret mysecret
	DupInterval 300
</Client>
#<Client X>
#	Secret mysecret
#	DupInterval 300
#</Client>

<SessionDatabase SQL>


	#Identifier 	OnlineUsers
	DBSource	dbi:ODBC:MDBTest
	DBUsername	
	DBAuth	
	AddQuery	insert into RADONLINE \


	(USERNAME, NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, #NASPORTTYPE, SERVICETYPE, CALLEDSID) \ 
	values \ 
	('%n', '%N', %{NAS-Port}, '%{Acct-Session-Id}', %{Timestamp}, #'%{Framed-IP-Address}', '%{Port-Type}', '%{Service-Type}', '%{Called-Station-Id}') 

</SessionDatabase>

<Realm>

#-----------------------------------------------------------------------
#
# This is for Aythenticating Authorizing and Accounting the hourly users
#
#-----------------------------------------------------------------------


#------------------------------------

	MaxSessions 1
	AuthByPolicy ContinueUntilAccept

	<AuthBy SQL>
		# Change DBSource, DBUsername, DBAuth for your database
		# See the reference manual
		DBSource	dbi:ODBC:MDBTest
		DBUsername	
		DBAuth	
	
		AccountingStopsOnly
		AccountingTable	Accounting
		AcctColumnDef	UserName,User-Name
		AcctColumnDef	CallDate,Timestamp,integer-date
		AcctColumnDef	AcctStatusType,Acct-Status-Type,integer
		AcctColumnDef	AcctDelayTime,Acct-Delay-Time,integer
		AcctColumnDef	AcctInputOctets,Acct-Input-Octets,integer
		AcctColumnDef	AcctOutputOctets,Acct-Output-Octets,integer
		AcctColumnDef	AcctSessionId,Acct-Session-Id
		AcctColumnDef	AcctSessionTime,Acct-Session-Time,integer
		AcctColumnDef	AcctTerminateCause,Acct_Terminate-Cause
		AcctColumnDef	NASIdentifier,NAS-Identifier
		AcctColumnDef	NASIdentifier,NAS-IP-Address
		AcctColumnDef	NASPort,NAS-Port,integer

		# You can use this to force Radiator to limit 
		# maximum session times to how many minutes	
		# are left in subaccounts.timeleft
		
#		AcctSQLStatement update Authentication set BalanceTime = (BalanceTime)-0%{Acct-Session-Time}, \
		AcctSQLStatement update Authentication set %Q = %Q-0%{Acct-Session-Time} \
						 #, Last = '%Q' \
						where USERNAME = '%n' \
						And Type = 'H'

		# 
	</AuthBy>



	<AuthBy SQL>
		# Change DBSource, DBUsername, DBAuth for your database
		# See the reference manual
		DBSource	dbi:ODBC:MDBTest
		DBUsername	
		DBAuth	
	
		AuthSelect select Password from Authentication where USERNAME='%n' And Type='P'and ExpiryDate > now() 

		AuthColumnDef	0,Password,check
		#AuthColumnDef	1,Session-Timeout,reply
		AddToReply		Service-Type = Framed,Framed-Protocol = PPP
	#	#DefaultReply Service-Type = Framed,Framed-Protocol = PPP
		# You can add to or change these if you want.
		
	</AuthBy>

	<AuthBy SQL>
		# daily control
		# Change DBSource, DBUsername, DBAuth for your database
		# See the reference manual
		DBSource	dbi:ODBC:MDBTest
		DBUsername	
		DBAuth	
		#AuthSelect select Password, %Q from Authentication where USERNAME='%n' And %Q > 0 And Type='H'  And Last <> '%Q' And ThursdayFrom < %H
		AuthSelect select Password, %Q from Authentication where USERNAME='%n' And %Q > 0 And Type='H'  And %QFrom < %H  And %QTo > %H and (IP1=%{NAS-Port} or (IP1=0 and IP2=0) or IP2=%{NAS-Port})


		AuthColumnDef	0,Password,check
		AuthColumnDef	1,Session-Timeout,reply
		AddToReply	Service-Type = Framed,Framed-Protocol = PPP
	</AuthBy>

</Realm>



Thanks all

===
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