fw-wrap and LocalNetwork in nocat 0.82

penn gwen <[email protected]> Wed, 26 Oct 2005 08:52:00 -0700 (PDT)
Newsgroups gmane.network.nocat
Message-ID <[email protected]>
i'm using nocatauth 0.82 with on rh 9, using
iptables-1.2.7a-2 on kernel 2.4.20-30.9.   gateway and
authorize run on a separate hosts (wifi and auth,
resp), same enet segment, connected via a hub.  wifi
runs suse9.3, auth runs rh9.

i have a few questions:

1. if i run the gateway using bin/gateway as root, it
sets ip_forward and rp_filter in /proc, but i get many
"permission denied" errors when it tries to set rules.
 if i run the gateway as user nocat, i get no errors,
but, due to the check for uid == 0,  ip_forward and
rp_filter in /proc don't get set.  

ls -l gives
-rwsr-xr-x  1 root nocat 8258 2005-10-15 12:30 fw-wrap
-rwxr-xr-x  1 root root  1961 2005-10-15 12:30 gateway

did i miss something? 


2. in bin/initialize.fw, at line 159,160:
is this a typo?  i think to-port should be to-ports,
that is
     $redirect -m mark --mark $mark -p tcp --dport
$port  -j REDIRECT \
            --to-port $GatewayPort
 should be
    $redirect -m mark --mark $mark -p tcp --dport
$port  -j REDIRECT \
            --to-ports $GatewayPort

as man iptables shows to-ports as the only option to
REDIRECT (for this version at least).


3.  i get errors in the authorize host
  Use of uninitialized value in pattern match (m//) at
/usr/lib/perl5/site_perl/5.8.0/Net/Netmask.pm line 47
     (this error always happens 11 times)
  Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.8.0/Net/Netmask.pm line 47,
...
    (this error always happens twice)
  Use of uninitialized value in pattern match (m//) at
/usr/lib/perl5/site_perl/5.8.0/Net/Netmask.pm line 47
  Use of uninitialized value in concatenation (.) or
string at
/usr/lib/perl5/site_perl/5.8.0/Net/Netmask.pm
    could not parse  at ../lib//NoCat/AuthService.pm
line 77, referer: http://auth/cgi-bin/login
  Use of uninitialized value in numeric eq (==) at
/usr/lib/perl5/site_perl/5.8.0/Net/Netmask.pm line
406, ...

which all seem to be due to $self->{LocalNetwork}
being == "", that is, LocalNetwork is not set. 
therefore, in authservice.pm, the call to
  new Net::Netmask( $self->{LocalNetwork}
fails. 

i don't see where LocalNetwork gets set except in
Firewall.pm, which isn't being called.   i'm using
net-netmask 1.9012.  can anyone shed some light on
this?

thanks



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com