From 8d1beadce31786cc87afc01880d731c8a19e120f Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Tue, 22 Jan 2013 05:42:46 +0100 Subject: [PATCH] Forward Firewall: 1) fixed outgoingfw converter: now checkbox for logging is converted corectly 2) edited p2p_block: now a checked prot is allowed --- config/forwardfw/convert-outgoingfw | 2 +- config/forwardfw/rules.pl | 6 +++--- html/cgi-bin/forwardfw.cgi | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/forwardfw/convert-outgoingfw b/config/forwardfw/convert-outgoingfw index 03208e62b..77f76cb83 100755 --- a/config/forwardfw/convert-outgoingfw +++ b/config/forwardfw/convert-outgoingfw @@ -292,7 +292,7 @@ sub process_rules $configline[4] =~ s/,/;/g; $remark = $configline[4]; }else{$remark = '';} - if($configline[9] eq 'aktiv'){ $log='ON';}else{$log='';} + if($configline[9] eq 'Active'){ $log='ON';}else{$log='';} if($configline[10] eq 'on' && $configline[11] eq 'on' && $configline[12] eq 'on' && $configline[13] eq 'on' && $configline[14] eq 'on' && $configline[15] eq 'on' && $configline[16] eq 'on'){ if($configline[17] eq '00:00' && $configline[18] eq '00:00'){ $time=''; diff --git a/config/forwardfw/rules.pl b/config/forwardfw/rules.pl index 672fa1774..099f2950d 100755 --- a/config/forwardfw/rules.pl +++ b/config/forwardfw/rules.pl @@ -246,12 +246,12 @@ sub p2pblock my $CMD = "-m ipp2p"; foreach my $p2pentry (sort @p2ps) { my @p2pline = split( /\;/, $p2pentry ); - if ( $fwdfwsettings{'POLICY'} eq 'MODE2' ) { - $DO = "DROP"; + if ( $fwdfwsettings{'POLICY'} eq 'MODE1' ) { + $DO = "ACCEPT"; if ("$p2pline[2]" eq "on") { $P2PSTRING = "$P2PSTRING --$p2pline[1]"; } - } else { + }else { $DO = "RETURN"; if ("$p2pline[2]" eq "off") { $P2PSTRING = "$P2PSTRING --$p2pline[1]"; diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index bf35b1f97..094c54474 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -1916,7 +1916,7 @@ END if($$hash{$key}[25] ne ''){push (@days,$Lang::tr{'fwdfw wd_sun'});} my $weekdays=join(",",@days); if (@days){ - print"$Lang::tr{'fwdfw time'} "; + print"$Lang::tr{'fwdfw time'} "; print"$weekdays"; print "  $Lang::tr{'fwdfw from'} $$hash{$key}[26]   $Lang::tr{'fwdfw till'} $$hash{$key}[27]"; } @@ -1951,8 +1951,8 @@ END $p2pline[0]: END } - print"$Lang::tr{'outgoing firewall p2p deny'}"; - print"$Lang::tr{'outgoing firewall p2p allow'}"; + print"$Lang::tr{'outgoing firewall p2p allow'}"; + print"$Lang::tr{'outgoing firewall p2p deny'}"; &Header::closebox(); } sub fillselect -- 2.39.2