(RADIATOR) Proxying Accounting Packets

Erich Zigler erich at superheronetworks.com
Fri Feb 27 17:25:26 CST 2004


Here's what I'm trying to do. I want to proxy the accounting packets to my
customer's radius server, but I want to log them in my SQL database also.
This is what I have so far...

<Realm customersrealm.net>
       AuthByPolicy ContinueWhileReject
        <AuthBy SQL>
                DBSource        dbi:mysql:radiator
                DBUsername      radiator
                DBAuth          xxxxxxx
                AuthSelect
                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
        </AuthBy>
       RewriteUsername s/^([^@]+).*/$1/
       <AuthBy RADIUS>
                Identifier Radius
                Host            xxx.xxx.xxx.xxx
                Secret          xxxxxx
                AuthPort        1645
                AcctPort        1646
                Retries         3
       </AuthBy>
</Realm>

It logs it correctly, however it only logs the username which I guess is
because of the RewriteUsername command. I moved the Rewriteusername command
to the bottom thinking it would on my accounting keep username at realm.com and
just send the remote radius server username.

This doesn't seem to be the case. How can I keep username at realm.com in my
accounting database and send username to the proxied radius server?

Thanks!

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