(RADIATOR) add attr
Hugh Irvine
hugh at open.com.au
Tue Sep 14 01:24:19 CDT 2004
Hello -
What you show below will add attributes to the incoming radius request,
not the reply which I am guessing is what you want to do.
There are a number of example hooks in the file "goodies/hooks.txt"
BTW - you probably don't need a hook to do this.
regards
Hugh
On 14 Sep 2004, at 15:22, Tech wrote:
> Hi ,
> I am trying to add attributes, if a request is received from either
> of 2 nas. as all other access requests come from a lot of other nas
> that do not require the added attributes. I am trying to do this by
> way of both a PreAuthHook and ReplyHook with no luck
>
>
>
> I am also sending the hook file,
>
>
>
> Any help thanks
> # -*- mode: Perl -*-
> #
> sub
> {
> my $p = ${$_[0]};
>
> my $code = $p->code;
> #my $nas = $p->get_attr('NAS-IP-Address');
> my $nas = $p->get_attr('NASIDENTIFIER');
>
> if ($code eq 'Access-Request' && $nas eq ('2.2.9.2','2.1.1.1'))
> {
> $p->add_attr('Ascend-Data-Filter',"ip in drop dstip x.x.x.0/24 tcp
> dstport',23");
> $p->add_attr('Ascend-Data-Filter',"ip in drop dstip x.x.x.0/24 tcp
> dstport',23");
> $p->add_attr('Ascend-Data-Filter',"ip in drop dstip x.x.x.0/24 tcp
> dstport',79");
> $p->add_attr('Ascend-Data-Filter',"ip in drop dstip x.x.x.0/24 tcp
> dstport',161");
> $p->add_attr('Ascend-Data-Filter',"ip in forward");
> $p->add_attr('Ascend-Data-Filter',"ip out forward);
> }
> return;
> }
>
NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
--
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