Here's my config file. - Quite lengthly, I'm afraid...

# radius-sql.cfg
#
# Example Radiator configuration file that allows you to
# authenticate from an SQL database.
# With Radiator you can interface with almost any databse schema,
# and there are many more configurable parameters that allow you
# to control database fallback, select statements, column names
# and arrangements etc etc etc.
# See the reference manual for more details.
# This is a very simple exmaple to get you started. It will
# work with the tables created by the goodies/*.sql scripts.
#
# You should consider this file to be a starting point only
# $Id: sql.cfg,v 1.3 1999/07/29 02:38:10 mikem Exp $

Foreground
#LogStdout
LogDir  /var/log/radius
Trace 4
DbDir  /usr/local/radiator

AuthPort 1812
AcctPort 1813


# You can put client details in a database table
# and get their details from there with something like this:
<ClientListSQL>
 DBSource dbi:mysql:RadAuth
 DBUsername radius
 DBAuth  secret2
</ClientListSQL>

##### Session Database Setup - this keeps track of CURRENT users
##### on the system

<SessionDatabase SQL>
 ### Database Settings ###
 DBSource dbi:mysql:RadAcct
 DBUsername radius
 DBAuth  secret2

 ### AddQuery ###
 AddQuery insert into RadOnline( Username, NasIdentifier, NasPort,\
 AcctSessionID, TimeStamp, FramedIPAddress, NasPortType, ServiceType, \
 CalledStationID, CallingStationID, AcctTxSpeed, AcctRxSpeed, \
 AcctModType ) values ("%n", "%N", %{NAS-Port}, '%{Acct-Session-Id}', \
 '%{Timestamp}', '%{Framed-IP-Address}', '%{Port-Type}', \
 '%{Service-Type}', '%{Called-Station-Id}', '%{Calling-Station-Id}',\
 '%{Acc-Connect-Tx-Speed}', '%{Acc-Connect-Rx-Speed}', \
 '%{Acc-Modem_Modulation_Type}' )

 ### DeleteQuery ###
 DeleteQuery delete from RadOnline where NasIdentifier='%N' and \
 NasPort=%{NAS-Port}

 ### ClearNasQuery ###
 ClearNasQuery delete from RadOnline where NasIdentifier='%N'

 ### CountQuery ###
 CountQuery select NasIdentifier, NasPort, AcctSessionID from RadOnline\
 where CallingStationID='%{Calling-Station-Id}'

</SessionDatabase SQL>
############################
### End Session Database Config
############################

################################
### Address Allocator Config ###
################################
<AddressAllocator SQL>
 Identifier mySQLAlloc

 DefaultLeasePeriod 21600  # 6 Hours
 LeaseReclaimInterval 60 # Every minute

 DBSource dbi:mysql:RadAuth:radius-1
 DBUsername radius
 DBAuth  secret2
 Timeout  60
 FailureBackoffTime 30

</AddressAllocator>

############################
### Start Authentication...
############################
<Realm DEFAULT>
 <AuthBy GROUP>
  ### Set default policy to try next method if fail
  AuthByPolicy ContinueUntilAccept

  #### First do validation via phone number - Checks phone number
  #### dialed, and time dialed.
  <AuthBy SQL>
   DBSource dbi:mysql:RadAuth
   DBUsername radius
   DBAuth  secret2
   Timeout  60
   FailureBackoffTime 30


   ### Select query for authorization
   AuthSelect select NULL, CheckAttr, ReplyAttr from \
   CalledStationProfiles where CalledStationID = \
   '%{Called-Station-Id}' AND CURRENT_TIME BETWEEN Start AND \
   End AND FIND_IN_SET( WEEKDAY(CURRENT_DATE), Day)

   ### Save Accounting Data in radius database,
   ### table RadAccounting%Y%m

   AccountingTable RadAcct.RadAccounting%Y%m
   AcctColumnDef Username,User-Name
   AcctColumnDef TimeStamp,Timestamp,integer
   AcctColumnDef AcctStatusType,Acct-Status-Type
   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-IP-Address
   AcctColumnDef NasPort,NAS-Port,integer
   AcctColumnDef FramedIPAddress,Framed-IP-Address
   AcctColumnDef CallingStationID, Calling-Station-Id
   AcctColumnDef CalledStationID, Called-Station-Id
   AcctColumnDef   AcctTxSpeed, Acc-Connect-Tx-Speed
   AcctColumnDef   AcctRxSpeed, Acc-Connect-Rx-Speed
   AcctColumnDef AcctModType, Acc-Modem_Modulation_Type
 #  AcctColumnDef TimeStampL, Timestamp
  </AuthBy>
###########################################
### Standard Username / Password Authentication
###########################################
  <AuthBy SQL>
   DBSource        dbi:mysql:RadAuth
   DBUsername      radius
   DBAuth          secret2

   ### Select query for authorization
   AuthSelect select Password, CheckAttr, ReplyAttr from \
   UserProfiles where CalledStationID = \
   '%{Called-Station-Id}' AND User = '%n'

   ### Save Accounting Data in radius database,
   ### table RadAccounting

   AccountingTable RadAcct.RadAccounting%Y%m
   AcctColumnDef   Username,User-Name
   AcctColumnDef   TimeStamp,Timestamp,integer
   AcctColumnDef   AcctStatusType,Acct-Status-Type
   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-IP-Address
   AcctColumnDef   NasPort,NAS-Port,integer
   AcctColumnDef   FramedIPAddress,Framed-IP-Address
   AcctColumnDef   CallingStationID, Calling-Station-Id
   AcctColumnDef   CalledStationID, Called-Station-Id
   AcctColumnDef   AcctTxSpeed, Acc-Connect-Tx-Speed
   AcctColumnDef   AcctRxSpeed, Acc-Connect-Rx-Speed
   AcctColumnDef   AcctModType, Acc-Modem_Modulation_Type
         AcctColumnDef   TimeStampL, Timestamp
         </AuthBy>
  #######################################
  ### End of Username / Password Auth ###
  #######################################

  ## DynIP Address Allocation ##
  <AuthBy GROUP>
   AuthByPolicy ContinueWhileAccept
   <AuthBy SQL>
                  DBSource        dbi:mysql:RadAuth
                   DBUsername      radius
                   DBAuth          secret2

                  ### Select query for authorization
                   AuthSelect select Password, CheckAttr, ReplyAttr from \
                  DynIPUserProfiles where CalledStationID = \
           '%{Called-Station-Id}' AND User = '%n' AND NasIdentifier = '%N'

                  ### table RadAccounting%Y%m

                  AccountingTable RadAcct.RadAccounting
                  AcctColumnDef   Username,User-Name
                AcctColumnDef   TimeStamp,Timestamp,integer
                  AcctColumnDef   AcctStatusType,Acct-Status-Type
                  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-IP-Address
                  AcctColumnDef   NasPort,NAS-Port,integer
                  AcctColumnDef   FramedIPAddress,Framed-IP-Address
                  AcctColumnDef   CallingStationID, Calling-Station-Id
                  AcctColumnDef   CalledStationID, Called-Station-Id
                  AcctColumnDef   AcctTxSpeed, Acc-Connect-Tx-Speed
                  AcctColumnDef   AcctRxSpeed, Acc-Connect-Rx-Speed
                  AcctColumnDef   AcctModType, Acc-Modem_Modulation_Type
                  AcctColumnDef   TimeStampL, Timestamp
   </AuthBy>
   <AuthBy DYNADDRESS>
    Allocator mySQLAlloc
    PoolHint %{Reply:PoolHint}
   </AuthBy>
   ########################################
   ### End Dynamic IP Allocation
   ########################################
  </AuthBy>
 </AuthBy>
</Handler>



-------------------------------------------------------
The only this I changed was the dbAuth's.

And here's the trace ...


*** Received from 62.24.129.1 port 8002 ....
Code:       Access-Request
Identifier: 158
Authentic:  <203><219><25>+<0><246>z<26><9><180><22>mZ<190><135><238>
Attributes:
 User-Name = "dyn_test"
 User-Password = "<28>PIc<197><144>Z<197>F.n<192>=n;X"
 NAS-Port = 57
 NAS-Port-Type = Async
 Acc-Request-Type = User-Authentication
 Service-Type = Framed-User
 Framed-Protocol = PPP
 Called-Station-Id = "08452231010"
 Calling-Station-Id = "01612222000"
 NAS-IP-Address = 62.24.129.1

Thu Jun 22 08:27:18 2000: DEBUG: Handling request with Handler 'Realm=DEFAULT'
Thu Jun 22 08:27:18 2000: DEBUG:  Deleting session for dyn_test, 62.24.129.1,
57
Thu Jun 22 08:27:18 2000: DEBUG: do query is: delete from RadOnline where
NasIdentifier='62.24.129.1' and NasPort=57

Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthGROUP
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Query is: select NULL, CheckAttr, ReplyAttr
from CalledStationProfiles where CalledStationID = '08452231010' AND
CURRENT_TIME BETWEEN Start AND End AND FIND_IN_SET( WEEKDAY(CURRENT_DATE), Day)

Thu Jun 22 08:27:18 2000: DEBUG: Radius::AuthSQL looks for match with dyn_test
Thu Jun 22 08:27:18 2000: DEBUG: Query is: select NULL, CheckAttr, ReplyAttr
from CalledStationProfiles where CalledStationID = '08452231010' AND
CURRENT_TIME BETWEEN Start AND End AND FIND_IN_SET( WEEKDAY(CURRENT_DATE), Day)

Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Query is: select Password, CheckAttr,
ReplyAttr from UserProfiles where CalledStationID = '08452231010' AND User =
'dyn_test'
Thu Jun 22 08:27:18 2000: DEBUG: Radius::AuthSQL looks for match with dyn_test
Thu Jun 22 08:27:18 2000: DEBUG: Query is: select Password, CheckAttr,
ReplyAttr from UserProfiles where CalledStationID = '08452231010' AND User =
'DEFAULT'

Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthGROUP
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Query is: select Password, CheckAttr,
ReplyAttr from DynIPUserProfiles where CalledStationID = '08452231010' AND User
= 'dyn_test' AND NasIdentifier = '62.24.129.1'

Thu Jun 22 08:27:18 2000: DEBUG: Radius::AuthSQL looks for match with dyn_test
Thu Jun 22 08:27:18 2000: DEBUG: Radius::AuthSQL ACCEPT:
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthDYNADDRESS
Thu Jun 22 08:27:18 2000: DEBUG: Query is: select YIADDR, SUBNETMASK, DNSSERVER
from RADPOOL where
POOL='dyn_test' and STATE=0 order by TIME_STAMP

Thu Jun 22 08:27:18 2000: DEBUG: do query is: update RADPOOL set STATE=1,
TIME_STAMP=961658838,
EXPIRY=961680438, USERNAME='dyn_test' where YIADDR='1.2.3.4'

Thu Jun 22 08:27:18 2000: DEBUG: Access accepted for dyn_test
Thu Jun 22 08:27:18 2000: WARNING: No such attribute PoolHint
Thu Jun 22 08:27:18 2000: DEBUG: Packet dump:
*** Sending to 62.24.129.1 port 8002 ....
Code:       Access-Accept
Identifier: 158
Authentic:  <203><219><25>+<0><246>z<26><9><180><22>mZ<190><135><238>
Attributes:
 Framed-Protocol = PPP
 PoolHint = dyn_test
 Framed-IP-Netmask = 255.255.255.255
 Framed-IP-Address = 1.2.3.4

Thu Jun 22 08:27:18 2000: DEBUG: Packet dump:
*** Received from 62.24.129.1 port 8003 ....
Code:       Accounting-Request
Identifier: 154
Authentic:  <179><8><232>`<16><160> {<7>-<15>q<225>s<249>y
Attributes:
 User-Name = "dyn_test"
 NAS-Port = 57
 NAS-Port-Type = Async
 Acc-Request-Type = User-Accounting
 Service-Type = Framed-User
 Framed-Protocol = PPP
 Called-Station-Id = "08452231010"
 Calling-Station-Id = "01612222000"
 NAS-IP-Address = 62.24.129.1
 Acct-Status-Type = Start
 Acct-Delay-Time = 0
 Acct-Session-Id = "000622.082409.104250"
 Acc-Dial-Port-Index = 351
 Connect-Info = "28800/49333 V90/LAPM"
 Acc-Connect-Tx-Speed = 49333
 Acc-Connect-Rx-Speed = 28800
 Acc-Modem_Modulation_Type = "V90"
 Acc-Modem_Error_Protocol = "LAPM"
 Acct-Authentic = RADIUS
 Acc-Service-Profile = "sp1-10"
 Framed-IP-Address = 1.2.3.4
 Framed-IP-Netmask = 255.255.255.255

Thu Jun 22 08:27:18 2000: DEBUG: Handling request with Handler 'Realm=DEFAULT'
Thu Jun 22 08:27:18 2000: DEBUG:  Adding session for dyn_test, 62.24.129.1, 57
Thu Jun 22 08:27:18 2000: DEBUG: do query is: delete from RadOnline where
NasIdentifier='62.24.129.1' and NasPort=57

Thu Jun 22 08:27:18 2000: DEBUG: do query is: insert into RadOnline( Username,
NasIdentifier, NasPort,AcctSessionID, TimeStamp, FramedIPAddress, NasPortType,
ServiceType, CalledStationID, CallingStationID, AcctTxSpeed, AcctRxSpeed,
AcctModType ) values ("dyn_test", "62.24.129.1", 57, '000622.082409.104250',
'961658838', '1.2.3.4', '', 'Framed-User', '08452231010',
'01612222000','49333', '28800', 'V90' )

Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthGROUP
Thu Jun 22 08:27:18 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: Handling accounting with Radius::AuthSQL
Thu Jun 22 08:27:18 2000: DEBUG: do query is: insert into
RadAcct.RadAccounting200006
  (Username, TimeStamp, AcctStatusType, AcctDelayTime, AcctSessionID,
NasIdentifier, NasPort, FramedIPAddress, CallingStationID, CalledStationID,
AcctTxSpeed, AcctRxSpeed, AcctModType)
  values
  ('dyn_test', 961658838, 'Start', 0, '000622.082409.104250', '62.24.129.1',
57, '1.2.3.4', '01612222000', '08452231010', '49333', '28800', 'V90')

Thu Jun 22 08:27:18 2000: DEBUG: Accounting accepted
Thu Jun 22 08:27:18 2000: DEBUG: Packet dump:
*** Sending to 62.24.129.1 port 8003 ....
Code:       Accounting-Response
Identifier: 154
Authentic:  <179><8><232>`<16><160> {<7>-<15>q<225>s<249>y
Attributes:

Jun 22 08:27:33 2000: DEBUG: Packet dump:
*** Received from 62.24.129.1 port 8003 ....
Code:       Accounting-Request
Identifier: 158
Authentic:  <205>^<147>y:<30><184><200><133><4><138><164>S<179>c6
Attributes:
 User-Name = "dyn_test"
 NAS-Port = 57
 NAS-Port-Type = Async
 Acc-Request-Type = User-Accounting
 Service-Type = Framed-User
 Framed-Protocol = PPP
 Called-Station-Id = "08452231010"
 Calling-Station-Id = "01612222000"
 NAS-IP-Address = 62.24.129.1
 Acct-Status-Type = Stop
 Acct-Delay-Time = 0
 Acct-Session-Id = "000622.082409.104250"
 Acc-Dial-Port-Index = 351
 Connect-Info = "28800/49333 V90/LAPM"
 Acc-Connect-Tx-Speed = 49333
 Acc-Connect-Rx-Speed = 28800
 Acc-Modem_Modulation_Type = "V90"
 Acc-Modem_Error_Protocol = "LAPM"
 Acct-Authentic = RADIUS
 Acc-Service-Profile = "sp1-10"
 Acct-Session-Time = 14
 Acct-Input-Octets = 1535
 Acct-Output-Octets = 358
 Acct-Input-Packets = 32
 Acct-Output-Packets = 23
 Acc-Input-Errors = 0
 Acc-Output-Errors = 0
 Acct-Terminate-Cause = User-Request
 Acc-Reason-Code = Requested-By-User
 Framed-IP-Address = 1.2.3.4
 Framed-IP-Netmask = 255.255.255.255

Thu Jun 22 08:27:33 2000: DEBUG: Handling request with Handler 'Realm=DEFAULT'
Thu Jun 22 08:27:33 2000: DEBUG:  Deleting session for dyn_test, 62.24.129.1,
57
Thu Jun 22 08:27:33 2000: DEBUG: do query is: delete from RadOnline where
NasIdentifier='62.24.129.1' and NasPort=57

Thu Jun 22 08:27:33 2000: DEBUG: Handling with Radius::AuthGROUP
Thu Jun 22 08:27:33 2000: DEBUG: Handling with Radius::AuthSQL
Thu Jun 22 08:27:33 2000: DEBUG: Handling accounting with Radius::AuthSQL
Thu Jun 22 08:27:33 2000: DEBUG: do query is: insert into
RadAcct.RadAccounting200006
  (Username, TimeStamp, AcctStatusType, AcctDelayTime, AcctInputOctets,
AcctOutputOctets, AcctSessionID, AcctSessionTime, AcctTerminateCause,
NasIdentifier, NasPort, FramedIPAddress, CallingStationID, CalledStationID,
AcctTxSpeed, AcctRxSpeed, AcctModType)
  values
  ('dyn_test', 961658853, 'Stop', 0, 1535, 358, '000622.082409.104250', 14,
'User-Request', '62.24.129.1', 57, '1.2.3.4', '01612222000', '08452231010',
'49333', '28800', 'V90')

Thu Jun 22 08:27:33 2000: DEBUG: Accounting accepted
Thu Jun 22 08:27:33 2000: DEBUG: Packet dump:
*** Sending to 62.24.129.1 port 8003 ....
Code:       Accounting-Response
Identifier: 158
Authentic:  <205>^<147>y:<30><184><200><133><4><138><164>S<179>c6
Attributes:


Hope this is of use. I don't know where this is going wrong...


Regards


David Rigby





===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to