]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Forward Firewall:
authorAlexander Marx <amarx@ipfire.org>
Tue, 22 Jan 2013 04:42:46 +0000 (05:42 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:08:14 +0000 (14:08 +0200)
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
config/forwardfw/rules.pl
html/cgi-bin/forwardfw.cgi

index 03208e62b48252fb8bf0212061ad8461b9679026..77f76cb836fe7e692c8eb984742af72e82400267 100755 (executable)
@@ -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='';
index 672fa1774513932cf12ecf6e428738bc73470e84..099f2950d6cc80e809fa7bbfbfc66761eb028f86 100755 (executable)
@@ -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]";
index bf35b1f97d734d23ebead9f11b32d9f254cac021..094c544749f3acd7aaae8d8fdd360895ba714901 100755 (executable)
@@ -1916,7 +1916,7 @@ END
                                if($$hash{$key}[25] ne ''){push (@days,$Lang::tr{'fwdfw wd_sun'});}
                                my $weekdays=join(",",@days);
                                if (@days){
-                                       print"<tr bgcolor='#FFE4B5'><td colspan='7'>$Lang::tr{'fwdfw time'} ";
+                                       print"<tr bgcolor='#FFE4B5'><td colspan='6'>$Lang::tr{'fwdfw time'} ";
                                        print"$weekdays";
                                        print "&nbsp $Lang::tr{'fwdfw from'} $$hash{$key}[26] &nbsp $Lang::tr{'fwdfw till'} $$hash{$key}[27]</td><td colspan='8'></d></tr>";
                                }
@@ -1951,8 +1951,8 @@ END
                <td width='66%' align='center' colspan='2'>$p2pline[0]:</td><td width='33%' align='center'><input type='hidden' name='P2PROT' value='$p2pline[1]' /><input type='image' img src='$gif' alt='$Lang::tr{'click to disable'}' title='$Lang::tr{'fwdfw toggle'}' style='padding-top: 0px; padding-left: 0px; padding-bottom: 0px ;padding-right: 0px ;display: block;' ><input type='hidden' name='ACTION' value='togglep2p'></td></tr></form>
 END
        }
-       print"<tr><td width='10%'><input type='image' img src='/images/on.gif'></td><td>$Lang::tr{'outgoing firewall p2p deny'}</td><td></td></tr>";
-       print"<tr><td width='10%'><input type='image' img src='/images/off.gif'></td><td>$Lang::tr{'outgoing firewall p2p allow'}</td><td></td></tr></table>";
+       print"<tr><td width='10%'><input type='image' img src='/images/on.gif'></td><td>$Lang::tr{'outgoing firewall p2p allow'}</td><td></td></tr>";
+       print"<tr><td width='10%'><input type='image' img src='/images/off.gif'></td><td>$Lang::tr{'outgoing firewall p2p deny'}</td><td></td></tr></table>";
        &Header::closebox();
 }
 sub fillselect