RE: Passing User Variable to access.fw

"Todd Pucci" <[email protected]>
Newsgroups gmane.network.nocat
Message-ID <[email protected]>
Thanks for the quick response Mike.  I had originally edited this in
NoCat.pm but I just tried it in nocat.conf and still no luck :(

All of the files I am editing are on my gateway server.  Is this correct?

Thanks,
Todd

P.S.  Here are the files I've edited in an effort to get this working.


diff nocat.conf nocat.old

< PermitCmd	access.fw permit $MAC $IP $Class $User
< DenyCmd	access.fw deny $MAC $IP $Class $User
---
> # PermitCmd	access.fw permit $MAC $IP $Class
> # DenyCmd	access.fw deny $MAC $IP $Class


diff Gateway.pm Gateway.old

<     my ( $self, $peer, $class, $user) = @_;
---
>     my ( $self, $peer, $class ) = @_;
396c396
< 	$fw->permit( $class, $peer->mac, $peer->ip, $peer->user );
---
> 	$fw->permit( $class, $peer->mac, $peer->ip );
444c444
<     $fw->deny( $class, $mac, $peer->ip, $peer->user );
---
>     $fw->deny( $class, $mac, $peer->ip );


diff acesss.fw access.old

< user=$5
<
55,57d52
<
< echo $mac,$ip,$cmd,$(date +%D,%H:%M),$user >>/usr/local/nocat/access.log
<


diff Firewall.pm Firewall.old

<     my ( $self, $action, $class, $mac, $ip, $user ) = @_;
---
>     my ( $self, $action, $class, $mac, $ip ) = @_;


access.log:

00:00:86:38:F1:CC,10.0.5.254,-A,10/27/04,16:57,
00:00:86:38:F1:CC,10.0.5.254,-A,10/27/04,17:06,
00:00:86:38:F1:CC,10.0.5.254,-A,10/27/04,17:09,
00:00:86:38:F1:CC,10.0.5.254,-A,10/27/04,17:16,
00:00:86:38:F1:CC,10.0.5.254,-D,10/27/04,17:36,
00:D0:09:17:26:3E,10.0.9.255,-A,10/28/04,10:57,
00:D0:09:17:26:3E,10.0.9.255,-A,10/28/04,12:40,
00:D0:09:17:26:3E,10.0.9.255,-A,10/28/04,12:49,
00:D0:09:17:26:3E,10.0.9.255,-A,10/28/04,12:52,
00:D0:09:17:26:3E,10.0.9.255,-A,10/28/04,12:55,
00:D0:09:17:26:3E,10.0.9.255,-D,10/28/04,13:14,


-----Original Message-----
From: Simon, Mike [mailto:[email protected]]
Sent: Thursday, October 28, 2004 12:45 PM
To: Todd Pucci
Subject: RE: [NoCat] Passing User Variable to access.fw


make sure you edit the nocat.conf section so it passes $User to access.fw


# ResetCmd      initialize.fw
# PermitCmd    access.fw permit $MAC $IP $Class $User
# DenyCmd      access.fw deny $MAC $IP $Class $User

PermitCmd    access.fw permit $MAC $IP $Class $User
DenyCmd      access.fw deny   $MAC $IP $Class $User





-----Original Message-----
From: Todd Pucci [mailto:[email protected]]
Sent: Thursday, October 28, 2004 12:21 PM
To: [email protected]
Subject: [NoCat] Passing User Variable to access.fw



Hi all,



I implemented the changes noted in
http://lists.nocat.net/pipermail/nocat/2002-August/001960.html
<http://lists.nocat.net/pipermail/nocat/2002-August/001960.html>  but I am
having trouble passing the user variable to access.fw.   Perhaps this is
because this was set to work on an older version (Gateway.pm in 0.82 seems
to be different from the one in this article)?  I am a new NoCat user and my
knowledge of how everything fits together is still pretty limited.  :(



Does anyone know what I need to do to pass the user variable to access.fw in
0.82?  I am just missing something fundamental?



TIA,

Todd Pucci
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.