(RADIATOR) SNMP w/ radiator

1999-05-19 Thread ryanm

Anyone here pulling stats from radiator into mrtg?? I am looking to
see any example .cfg files you may have. What stat's are people getting
from radiator?? Also does anyone use mrtg to poll there Cisco AS's??
I would like to get any .cfg files as I have gotten limited info from
the mrtg site. I have gone through the Cisco OID and MIB dir's but
they do not have OID's with names classified. 

Thanks a bundle for any information,

Ryan

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) Group Maximum

1999-05-19 Thread Stephen Roderick


Another kludge that may be useful to someone:


I added some code to create a group maximum within the session database.
This required a modification to Handler.pm, SessGeneric.pm, and SessSQL.pm
(If you used a different Sess.pm module it would need to be modified
as well)

Then within the SessionDatabase I use:

   GroupQuery someUniqueName 30 \
   select count(*) from radonline \
   where ('%{Called-Station-Id}'='XXX')

This would limit the number of connections to the phone number XXX to
30.

You could add as many of these as you wanted and use whatever query
generated the necessary results.

*
Handler.pm - Add the following after the check for MaxSession:
   
if ($p-code eq 'Access-Request'  $sessdb-groupexceeded($p))
{
# Issue a denial and bomb out
my $reason = "Group Maximum exceeded";
main::log($main::LOG_INFO, "Access rejected for $name: $reason");
$rp-set_code('Access-Reject');
$rp-addAttrByNum($Radius::Radius::REPLY_MESSAGE,
'Request Denied');
$rp-addAttrByNum($Radius::Radius::REPLY_MESSAGE, $reason)
if $self-{RejectHasReason};
$p-{Client}-replyTo($rp, $p);
return;
}

*
SessGeneric.pm - add the following (this is probably not needed):

sub groupexceeded
{
my ($self, $max, $name, $p) = @_;

main::log($main::LOG_ERR, "You did not override groupexceeded in 
SessGeneric");
}

*
SessSQL.pm - add the following:

elsif ($keyword eq 'GroupQuery')
{
my($id, $count, $q) = split(/\s+/, $value, 3);
$self-{GroupQuery}{$id} = "$count:$q";
}

sub groupexceeded
{
my ($self, $p) = @_;

# (Re)-connect to the database if necessary, but dont let
# a dead database prevent logins
return 0
if !$self-reconnect;

my $count = 0; # Number of current simultaneous sessions for the user

my($id,$max,$q,$sth);
foreach $id (keys %{$self-{GroupQuery}})
{
($max, $q) = split(':', $self-{GroupQuery}{$id});

$q = main::format_special($q, $p);

$sth = $self-prepareAndExecute($q);
if (!$sth)
{
return 0; # Dont let a dead database stop logins
}
($count) = $sth-fetchrow();
return 1if ($count  $max);
}
return 0;
}


All improvements welcome.

Steve


===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Sybase problems!!

1999-05-19 Thread Mike McCauley

Hi Jamie,

When I built DBD-Sybase-0.07 on RH5.2, I added EXTRA_LIBS=-linsck, but did not
define LINKTYPE, and it built fine (I didnt have the server running during the
test, so make test did not connect, but it did load DBD-Sybase OK.

Cheers.


[mikem@charlie DBD-Sybase-0.07]$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Using DBI 1.02 installed in /usr/lib/perl5/site_perl/i386-linux/auto/DBI
Writing Makefile for DBD::Sybase
[mikem@charlie DBD-Sybase-0.07]$ make
mkdir ./blib
mkdir ./blib/lib
mkdir ./blib/lib/DBD
mkdir ./blib/arch
mkdir ./blib/arch/auto
mkdir ./blib/arch/auto/DBD
mkdir ./blib/arch/auto/DBD/Sybase
mkdir ./blib/lib/auto
mkdir ./blib/lib/auto/DBD
mkdir ./blib/lib/auto/DBD/Sybase
mkdir ./blib/man3
cp Sybase.pm ./blib/lib/DBD/Sybase.pm
/usr/bin/perl -p -e "s/~DRIVER~/Sybase/g" 
/usr/lib/perl5/site_perl/i386-linux/auto/DBI/Driver.xst  Sybase.xsi
/usr/bin/perl -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5
/usr/lib/perl5/ExtUtils/xsubpp  -typemap /usr/lib/perl5/ExtUtils/typemap
Sybase.xs Sybase.tc  mv Sybase.tc Sybase.c
cc -c -I/opt/sybase/include -I/usr/lib/perl5/site_perl/i386-linux/auto/DBI
-Dbool=char -DHAS_BOOL -I/usr/local/include -O2-DVERSION=\"0.07\"
-DXS_VERSION=\"0.07\" -fpic -I/usr/lib/perl5/i386-linux/5.00404/CORE  Sybase.c
cc -c -I/opt/sybase/include -I/usr/lib/perl5/site_perl/i386-linux/auto/DBI
-Dbool=char -DHAS_BOOL -I/usr/local/include -O2-DVERSION=\"0.07\"
-DXS_VERSION=\"0.07\" -fpic -I/usr/lib/perl5/i386-linux/5.00404/CORE  dbdimp.c
Running Mkbootstrap for DBD::Sybase ()
chmod 644 Sybase.bs
LD_RUN_PATH="/opt/sybase/lib:/lib" cc -o blib/arch/auto/DBD/Sybase/Sybase.so
 -L/opt/sybase/lib -shared -L/usr/local/lib Sybase.o dbdimp.o
   -L/opt/sybase/lib -lct -lcs -ltcl -lcomn -lintl -linsck -lm
chmod 755 blib/arch/auto/DBD/Sybase/Sybase.so
cp Sybase.bs ./blib/arch/auto/DBD/Sybase/Sybase.bs
chmod 644 blib/arch/auto/DBD/Sybase/Sybase.bs
Manifying ./blib/man3/DBD::Sybase.3
[mikem@charlie DBD-Sybase-0.07]$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
-I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 -e 'use Test::Harness
qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/base..ok
t/main..Open Client Message:
Message number: LAYER = (5) ORIGIN = (3) SEVERITY = (5) NUMBER = (4)
Message String: ct_connect(): network packet layer: internal net library error:
Net-Lib protocol driver call to connect two endpoints failed
Operating System Error: Socket connect failed - errno 111
 at t/main.t line 45
Unable for connect to SYBASE: Open Client Message:
Message number: LAYER = (5) ORIGIN = (3) SEVERITY = (5) NUMBER = (4)
Message String: ct_connect(): network packet layer: internal net library error:
Net-Lib protocol driver call to connect two endpoints failed
Operating System Error: Socket connect failed - errno 111
dubious
Test returned status 255 (wstat 65280, 0xff00)
Undefined subroutine Test::Harness::WCOREDUMP called at
/usr/lib/perl5/Test/Harness.pm line 252.
make: *** [test_dynamic] Error 2



On May 19, 12:38pm, Jamie Orzechowski wrote:
 Subject: (RADIATOR) Sybase problems!!
 has anyone got any ideas what is wrong with my install of Sybase ASE and
 DBD?? ... this is RedHat 5.2 ... am I missing something?

 --
 I just got the SYBASE ASE and SYBASE DOCS RPM's off the RH 5.2 CD

 I ran rpm -Uvh on the 2 RPM's and they installed fine.

 I then untarred the DBD Sybase stuff

 [root@Mail /tmp]# tar -zxvf DBD-Sybase-0.13.tar.gz

 I edited the CONFIG file and changed "EXTRA_LIBS=-linsck" as the docs said
 linux needed this.
 I also have "LINKTYPE=static" defined

 -
 I then ran a 'perl Makefile.PL'

 looks good ...

 [root@Mail DBD-Sybase-0.13]# perl Makefile.PL
 Checking if your kit is complete...
 Looks good
 Note (probably harmless): No library found for -ltli
 Using DBI 1.08 installed in /usr/lib/perl5/site_perl/i386-linux/auto/DBI
 Writing Makefile for DBD::Sybase

 -
 now I run a make

 looks good also

 [root@Mail DBD-Sybase-0.13]# make
 mkdir ./blib
 mkdir ./blib/lib
 mkdir ./blib/lib/DBD
 mkdir ./blib/arch
 mkdir ./blib/arch/auto
 mkdir ./blib/arch/auto/DBD
 mkdir ./blib/arch/auto/DBD/Sybase
 mkdir ./blib/lib/auto
 mkdir ./blib/lib/auto/DBD
 mkdir ./blib/lib/auto/DBD/Sybase
 mkdir ./blib/man3
 cp Sybase.pm ./blib/lib/DBD/Sybase.pm
 /usr/bin/perl -p -e "s/~DRIVER~/Sybase/g" 
 /usr/lib/perl5/site_perl/i386-linux/auto/DBI/Driver.xst  Sybase.xsi
 /usr/bin/perl -I/usr/lib/perl5/i386-linux/5.00405 -I/usr/lib/perl5
 /usr/lib/perl5/ExtUtils/xsubpp  -typemap /usr/lib/perl5/ExtUtils/typemap
 Sybase.xs Sybase.tc  mv Sybase.tc Sybase.c
 cc -c -I/opt/sybase/include -I/usr/lib/perl5/site_perl/i386-linux/auto/DBI -
 Dbool=char -DHAS_BOOL -O2-DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" -fpic
 -I/usr/lib/perl5/i386-linux/5.00405/CORE  Sybase.c
 cc -c 

(RADIATOR) Re: Error initializing Radiator

1999-05-19 Thread Ricardo Freire

Please ignore my last post...
I hadn't read yet Mike's response to Gustavo.
Latest radiusd works fine.

Mike is still incredible fast... :-)

Cheers,
Ricardo Freire



===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) Error initializing Radiator

1999-05-19 Thread Ricardo Freire

Mike,

I always apply all patches you deploy (although most of it I don't need
anyway :-).
Last monday I applied the latest patches, and Radiator now comes with it:

C:\Radiator-2.13.1perl radiusd -config_file c:\etc\radius.cfg -trace 3
Undefined subroutine Radius::Realm::reinitialize called at radiusd line
160.

I didn't change *anything* on this server. I just applied some newer .PM (on
c:\perl\lib\radius\ folder) and "radiusd" (on c:\radiator-2.13.1\ folder).

This is a test environment, so before I rollback all patches I applied, I'd
like to hear from you.
What should be causing this?

Cheers,
Ricardo Freire



===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Urgent - No accounting record is coming

1999-05-19 Thread Mike McCauley

Hi Clement,

On May 20,  2:58pm, Clement wrote:
 Subject: (RADIATOR) Urgent - No accounting record is coming
 Hi Guys,

 I am receiving no accounting records from my Bays after reset.   A look
 at the log files shows that the Bays are waiting a proper reply from
 "Acct-Status-Type = Accounting-On" accounting requests.  However, the
 radiator is not giving the correct response.  Do you know how can I
 program RADIATOR to give the proper response again?

Looks to me like Radiator did exactly the same thing in each case. Are you sure
its not a problem in your NAS?

Cheers.


 Your help is much appreciated.

 - This is a response that does not work


 Code:   Accounting-Request
 Identifier: 152
 Authentic:
 151N128212138219T152209228i16220014220I
 Attributes:
 Acct-Status-Type = Accounting-On
 Acct-Session-Id = "400"
 Acct-Delay-Time = 42028
 NAS-IP-Address = 203.132.1.242
 Annex-Product-Name = "5399/Turbo"
 Annex-SW-Version = "X15.1.6"

 Thu May 20 00:08:38 1999: DEBUG: Check if Handler Acct-Status-Type=Stop
 should be used to handle this request
 Thu May 20 00:08:38 1999: DEBUG: Check if Handler  should be used to
 handle this request
 Thu May 20 00:08:38 1999: DEBUG: Handling request with Handler ''
 Thu May 20 00:08:38 1999: DEBUG: Handling with Radius::AuthSQL
 Thu May 20 00:08:38 1999: DEBUG: Handling accounting with
 Radius::AuthSQL
 Thu May 20 00:08:38 1999: DEBUG: Deleting all sessions for 203.132.1.242
 Thu May 20 00:08:38 1999: DEBUG: got On/Off from 203.132.1.242
 Thu May 20 00:08:38 1999: DEBUG: Accounting accepted
 Thu May 20 00:08:38 1999: DEBUG: Packet dump:
 *** Sending to 203.132.1.242 port 1040 
 Code:   Accounting-Response
 Identifier: 152
 Authentic:
 151N128212138219T152209228i16220014220I
 Attributes:


 - This is a response that worked

 Code:   Accounting-Request
 Identifier: 0
 Authentic:  mwOte@158Q16523-21810195193237
 Attributes:
 Acct-Status-Type = Accounting-On
 Acct-Session-Id = "5e06"
 Acct-Delay-Time = 1
 NAS-IP-Address = 203.132.1.244
 Annex-Product-Name = "8000RAC/Turbo"
 Annex-SW-Version = "X15.1.6"

 Mon May 17 22:17:55 1999: DEBUG: Check if Handler Acct-Status-Type=Stop
 should be used to handle this request
 Mon May 17 22:17:55 1999: DEBUG: Check if Handler  should be used to
 handle this request
 Mon May 17 22:17:55 1999: DEBUG: Handling request with Handler ''
 Mon May 17 22:17:55 1999: DEBUG: Handling with Radius::AuthSQL
 Mon May 17 22:17:56 1999: DEBUG: Handling accounting with
 Radius::AuthSQL
 Mon May 17 22:17:56 1999: DEBUG: Deleting all sessions for 203.132.1.244
 Mon May 17 22:17:56 1999: DEBUG: got On/Off from 203.132.1.244
 Mon May 17 22:17:56 1999: DEBUG: Accounting accepted
 Mon May 17 22:17:56 1999: DEBUG: Packet dump:
 *** Sending to 203.132.1.244 port 1040 
 Code:   Accounting-Response
 Identifier: 0
 Authentic:  mwOte@158Q16523-21810195193237
 Attributes:

 Regards
 Clement

 ===
 Archive at http://www.thesite.com.au/~radiator/
 To unsubscribe, email '[EMAIL PROTECTED]' with
 'unsubscribe radiator' in the body of the message.
-- End of excerpt from Clement



-- 
Mike McCauley   [EMAIL PROTECTED]
Open System Consultants Pty. LtdUnix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985   Fax   +61 3 9598-0955

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8, 
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.