---------- Forwarded Message ----------
Subject: choosing a default realm name based on the Called-Station-Id
Date: Tue, 4 Jul 2000 12:00:33 +0930
From: Simon Hackett <[EMAIL PROTECTED]>
Hello, fellow Radiators,
We use a PreClientHook (shown below for interest), in order to do
something that we find highly useful here - using the called number
as a match string to determine a default realm name.
What the PreClientHook does is look up a little text file listing
regular expressions to match (for example, 00$ to match a number
ending in 00, or a full number, or anything in between, and just '.'
to specify default behavior), and a corresponding realm name to
append to the username if there is no realm explicitly specified by
the user.
This is used to allow us to offer outsourced dialup access to others,
where we assign a distinct indial number to each customer, allowing
their users to magically grow the correct realm name based on the
number they were told to dial.
This then makes it very easy to handle the requests with a Realm
statement for each realm we know about, without worrying about the
Called-Station-Id other than in the PreClientHook.
My question is simply this: Is there any more 'direct' way to achieve
the inference of a realm name to use, based on the Called-Station-Id,
via direct statements in the radiator configuration file?
It works fine, by the way, I'm just in search of a deeper
understanding of the many and mysterious features of Radiator by
asking about alternatives that might do something similar. It may
just be possible that we're doing this the best way we can already
(it certainly does work very well for us).
Cheers,
Simon
PreClientHook sub { \
my($rm, $pn, $un, $rre, $rrm); \
\
$un = ${$_[0]}->getUserName; \
return if($un =~ m/\@/); \
$pn = ${$_[0]}->get_attr('Called-Station-Id'); \
$pn = "." if(!defined($pn)); \
open(FH, "/local/radius/radconfig/phonearray.txt"); \
while(<FH>) { \
chomp; \
($rre, $rrm) = split(/\s+/, $_); \
if($pn =~ m/$rre/) { \
$rm = $rrm; \
last; \
} \
} \
close(FH); \
${$_[0]}->changeUserName($un . "@" . $rm); \
}
---
Simon Hackett, Technical Director, Internode Systems Pty Ltd
31 York St [PO Box 284, Rundle Mall], Adelaide, SA 5000 Australia
Email: [EMAIL PROTECTED] Web: http://www.on.net
Phone: +61-8-8223-2999 Fax: +61-8-8223-1777
-------------------------------------------------------
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
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.