(RADIATOR) Reply Attribute
Hugh Irvine
hugh at open.com.au
Mon Oct 15 21:55:13 CDT 2001
Ciao Gionata -
Come va?
On Tuesday 16 October 2001 00:11, Gionata Lamia wrote:
> Hi all,
> I've some different types of users, the difference between the types of
> users is into the replay attributes. In this moment I've configured
> different "<AuthBy RADMIN>" one for every types of users, the only
> differences are the replay attributes.
> The problem is that in this way I've got a large and extended file
> radius.cfg. Is there way to reduce the configuration files ?
> For example :
>
> <AuthBy RADMIN>
> Identifier Default
> DBSource dbi:mysql:radmin:localhost
> DBUsername radius
> DBAuth radiator
>
> AccountingTable RADUSAGE
> AcctColumnDef USERNAME,User-Name
> AcctColumnDef TIME_STAMP,Timestamp,integer
> 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,integer
> AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
> AcctColumnDef NASIDENTIFIER,NAS-Identifier
> AcctColumnDef NASIDENTIFIER,NAS-IP-Address
> AcctColumnDef NASPORT,NAS-Port,integer
> AcctColumnDef DNIS,Called-Station-Id
> AcctColumnDef CALLINGSTATIONID,Calling-Station-Id
> AcctColumnDef CALLEDSTATIONID,Called-Station-Id
> AcctColumnDef CLIENTE,RADUSERS.CLIENTE
> AcctColumnDef NUMERO_VERDE,RADUSERS.NUMERO_VERDE
> AcctSQLStatement update RADUSERS set \
> TIMELEFT=TIMELEFT-0%{Acct-Session-Time}, \
> OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets}, \
> OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where
> USERNAME='%n'
>
> AddToReply Service-Type=2, \
> Framed-Protocol = PPP,\
> Framed-IP-Netmask = 255.255.255.255,\
> Framed-Routing = None,\
> Framed-MTU = 1500,\
> Framed-Compression = Van-Jacobson-TCP-IP
> </AuthBy>
>
> <AuthBy RADMIN>
> Identifier Callback
> DBSource dbi:mysql:radmin:localhost
> DBUsername radius
> DBAuth radiator
>
> AccountingTable RADUSAGE
> AcctColumnDef USERNAME,User-Name
> AcctColumnDef TIME_STAMP,Timestamp,integer
> 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,integer
> AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
> AcctColumnDef NASIDENTIFIER,NAS-Identifier
> AcctColumnDef NASIDENTIFIER,NAS-IP-Address
> AcctColumnDef NASPORT,NAS-Port,integer
> AcctColumnDef DNIS,Called-Station-Id
> AcctColumnDef CALLINGSTATIONID,Calling-Station-Id
> AcctColumnDef CALLEDSTATIONID,Called-Station-Id
> AcctColumnDef CLIENTE,RADUSERS.CLIENTE
> AcctColumnDef NUMERO_VERDE,RADUSERS.NUMERO_VERDE
>
> AcctSQLStatement update RADUSERS set \
> TIMELEFT=TIMELEFT-0%{Acct-Session-Time}, \
> OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets}, \
> OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where
> USERNAME='%n'
>
> AddToReply Service-Type=2,\
> cisco-avpair = "lcp:callback-dialstring=",\
> Framed-IP-Netmask = 255.255.255.255,\
> Framed-Protocol = PPP,\
> Framed-Routing = None,\
> Framed-MTU = 1500,\
> Framed-Compression = Van-Jacobson-TCP-IP
> </AuthBy>
>
> the "AcctColumnDef" row are duplicate in both types of users, the best
> solution should be that the "AcctColumnDef" is put once int the file, but I
> don't know if it is
> possible and how.
>
Facile -
# define AuthBy RADMIN clause
<AuthBy RADMIN>
Identifier CheckRADMIN
DBSource dbi:mysql:radmin:localhost
DBUsername radius
DBAuth radiator
AccountingTable RADUSAGE
AcctColumnDef USERNAME,User-Name
AcctColumnDef TIME_STAMP,Timestamp,integer
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,integer
AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
AcctColumnDef NASIDENTIFIER,NAS-Identifier
AcctColumnDef NASIDENTIFIER,NAS-IP-Address
AcctColumnDef NASPORT,NAS-Port,integer
AcctColumnDef DNIS,Called-Station-Id
AcctColumnDef CALLINGSTATIONID,Calling-Station-Id
AcctColumnDef CALLEDSTATIONID,Called-Station-Id
AcctColumnDef CLIENTE,RADUSERS.CLIENTE
AcctColumnDef NUMERO_VERDE,RADUSERS.NUMERO_VERDE
AcctSQLStatement update RADUSERS set \
TIMELEFT=TIMELEFT-0%{Acct-Session-Time}, \
OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets}, \
OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where
USERNAME='%n'
</AuthBy>
# define AuthBy GROUP's
<AuthBy GROUP>
Identifier Default
AuthBy CheckRADMIN
AddToReply Service-Type=2, \
Framed-Protocol = PPP,\
Framed-IP-Netmask = 255.255.255.255,\
Framed-Routing = None,\
Framed-MTU = 1500,\
Framed-Compression = Van-Jacobson-TCP-IP
</AuthBy>
<AuthBy GROUP>
Identifier Callback
AuthBy CheckRADMIN
AddToReply Service-Type=2,\
cisco-avpair = "lcp:callback-dialstring=",\
Framed-IP-Netmask = 255.255.255.255,\
Framed-Protocol = PPP,\
Framed-Routing = None,\
Framed-MTU = 1500,\
Framed-Compression = Van-Jacobson-TCP-IP
</AuthBy>
OK? Bene!
ciao
Hugo
--
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, software, platform and database independence.
===
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