Hello,

How can I fix the following:

This user has a static ip address.

Code:       Access-Request
Identifier: 169
Authentic:  1234567890123456
Attributes:
        User-Name = "dirk"
        Service-Type = Framed-User
        NAS-IP-Address = 1.2.3.4
        NAS-Port = 1234
        NAS-Port-Type = Async
        User-Password =
"<137><234>,<222><216>3v<146><188>8<9><160><216>}x<153>"

Thu Feb  1 21:08:19 2001: DEBUG: Handling request with Handler
'Realm=DEFAULT'
Thu Feb  1 21:08:19 2001: DEBUG:  Deleting session for dirk, 1.2.3.4,
1234
Thu Feb  1 21:08:19 2001: DEBUG: Handling with Radius::AuthSQL
Thu Feb  1 21:08:19 2001: DEBUG: Handling with Radius::AuthSQL
Thu Feb  1 21:08:19 2001: DEBUG: Query is: select PASSWORD, CHECKATTR,
REPLYATTR
, GROUPID, STATICIPADDRESS from SUBSCRIBERS  where USERNAME = 'dirk'

Thu Feb  1 21:08:19 2001: DEBUG: Radius::AuthSQL looks for match with
dirk
Thu Feb  1 21:08:19 2001: DEBUG: Radius::AuthSQL ACCEPT:
Thu Feb  1 21:08:19 2001: DEBUG: Handling with Radius::AuthDYNADDRESS
Thu Feb  1 21:08:19 2001: DEBUG: Query is: select YIADDR, SUBNETMASK,
DNSSERVER
from RADPOOL where
POOL='1.2.3.4-0' and STATE=0 order by TIME_STAMP

Thu Feb  1 21:08:19 2001: INFO: Access rejected for dirk: No available
addresses

This is the config file:

# common-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.5 2000/11/07 21:18:05 mikem Exp $

Foreground
Trace   4
LogStdout
LogDir          .
DbDir           .

# You will probably want to change this to suit your site.
<Client DEFAULT>
"rdc.cfg" 108L, 3232C written
[root@alpha goodies]# more rdc.cfg
# common-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.5 2000/11/07 21:18:05 mikem Exp $

Foreground
Trace   4
LogStdout
LogDir          .
DbDir           .

# You will probably want to change this to suit your site.
<Client DEFAULT>
        Secret  mysecret
        DupInterval 0
</Client>

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

<AddressAllocator SQL>
        Identifier SUBSCRIBERSAllocator
        DBSource        dbi:mysql:radius
        DBUsername      radius
        DBAuth          radius

        DefaultLeasePeriod      86400

                <AddressPool 1.2.3.4-1>
                        Range 2.3.4.5 2.3.4.10
                </AddressPool>
                <AddressPool 1.2.3.4-2>
                        Range 2.3.4.11 2.3.4.20
                </AddressPool>
                <AddressPool 10.10.10.10-1>
                        Range 10.10.10.1 10.10.10.4
                </AddressPool>
                <AddressPool 10.10.10.10-2>
                        Range 10.10.10.5 10.10.10.9
                </AddressPool>
</AddressAllocator>

# This will authenticate users from
<Realm DEFAULT>
  AuthByPolicy ContinueWhileAccept
    <AuthBy SQL>
        # Adjust DBSource, DBUsername, DBAuth to suit your DB

        DBSource        dbi:mysql:radius
        DBUsername      radius
        DBAuth          radius

        AuthSelect select PASSWORD, CHECKATTR, REPLYATTR, GROUPID,
STATICIPADDRESS from SUBSCRIBERS  where USERNAME = '%n'

        AuthColumnDef 0, User-Password, check
        AuthColumnDef 1, GENERIC, check
        AuthColumnDef 2, GENERIC, reply
        AuthColumnDef 3, Group-ID, reply
        AuthColumnDef 4, Framed-IP-Address, check

        # You may want to tailor these for your ACCOUNTING table
        # You can add your own columns to store whatever you like

        AccountingTable ACCOUNTING
        AcctColumnDef   USERNAME,User-Name
        AcctColumnDef   TIME_STAMP,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-Identifier
        AcctColumnDef   NASPORT,NAS-Port,integer
        AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address

        # You can arrange to log accounting to a file if the
        # SQL insert fails with AcctFailedLogFileName
        # That way you could recover from a broken SQL
        # server
        #AcctFailedLogFileName %D/missedaccounting
    </AuthBy>

        <AuthBy DYNADDRESS>
        Identifier      IPAllocator
        Allocator SUBSCRIBERSAllocator
        PoolHint %{NAS-IP-Address}-%{Reply:Group-ID}
        StripFromReply  Group-ID
        MapAttribute   yiaddr, Framed-IP-Address
        </AuthBy>

</Realm>

If the user has no static ip address it works ,depending on
NAS-IP-Address and Group-ID

Regards,

Dirk
begin:vcard 
n:Laan;Dirk
tel;work:020-5497967
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Dirk Laan
end:vcard

Reply via email to