]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
Forward Firewall: added new line at bottom of all ruletables with the "final rule"
authorAlexander Marx <amarx@ipfire.org>
Thu, 27 Jun 2013 05:28:06 +0000 (07:28 +0200)
committerAlexander Marx <amarx@ipfire.org>
Thu, 8 Aug 2013 05:51:21 +0000 (07:51 +0200)
html/cgi-bin/forwardfw.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index bf945a3575e223dae3609fffe2c2618024b5c622..d2c502a7a79490740c7e624ce81059920b1ba0ec 100755 (executable)
@@ -75,7 +75,7 @@ my %aliases=();
 my %optionsfw=();
 my %ifaces=();
 
-my $VERSION='0.9.9.8';
+my $VERSION='0.9.9.9';
 my $color;
 my $confignet          = "${General::swroot}/fwhosts/customnetworks";
 my $confighost         = "${General::swroot}/fwhosts/customhosts";
@@ -2317,20 +2317,61 @@ END
                                        my $weekdays=join(",",@days);
                                        if (@days){
                                                print"<tr bgcolor='$color'>";
-                                               print"<td>&nbsp</td><td bgcolor='$rulecolor'></td><td align='left' colspan='10'>$weekdays &nbsp $$hash{$key}[26] - $$hash{$key}[27] </td></tr>";
+                                               print"<td>&nbsp</td><td bgcolor='$rulecolor'></td><td align='left' colspan='10'>&nbsp $weekdays &nbsp $$hash{$key}[26] - $$hash{$key}[27] </td></tr>";
                                        }
                                }
                        }
                        print"<tr bgcolor='FFFFFF'><td colspan='13' height='1'></td></tr>";
                }
+               my $col;
+               if ($config eq '/var/ipfire/forward/config'){
+                       my $pol='fwdfw '.$fwdfwsettings{'POLICY'};
+                       if ($fwdfwsettings{'POLICY'} eq 'MODE1'){
+                               $col="bgcolor='darkred'";
+                       }else{
+                               $col="bgcolor='green'";
+                       }
+                       print"<tr><td colspan='13' $col align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'} $Lang::tr{$pol}</font></td></tr>";
+               }elsif ($config eq '/var/ipfire/forward/outgoing'){
+                       my $pol='fwdfw '.$fwdfwsettings{'POLICY1'};
+                       if ($fwdfwsettings{'POLICY1'} eq 'MODE1'){
+                               $col="bgcolor='darkred'";
+                       }else{
+                               $col="bgcolor='green'";
+                       }
+                       print"<tr><td colspan='13' $col align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'} $Lang::tr{$pol}</font></td></tr>";
+               }else{
+                       print"<tr><td colspan='13' bgcolor='darkred' align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'} $Lang::tr{'fwdfw MODE1'}</font></td></tr>";
+               }
                print"</table>";
-               &Header::closebox();
                print "<hr>";
                print "<br><br>";
+               &Header::closebox();
        }else{
                if ($optionsfw{'SHOWTABLES'} eq 'on'){
                        print "<b>$title1</b><br>";
-                       print"<table width='100%' border='0' rules='none'><tr><td height='30' bgcolor=$color{'color22'} align='center'>$Lang::tr{'fwhost empty'}</td></tr></table><br><br>";
+                       print"<table width='100%' border='0' rules='none'><tr><td height='30' bgcolor=$color{'color22'} align='center'>$Lang::tr{'fwhost empty'}</td></tr>";
+                       my $col;
+                       if ($config eq '/var/ipfire/forward/config'){
+                               my $pol='fwdfw '.$fwdfwsettings{'POLICY'};
+                               if ($fwdfwsettings{'POLICY'} eq 'MODE1'){
+                                       $col="bgcolor='darkred'";
+                               }else{
+                                       $col="bgcolor='green'";
+                               }
+                               print"<tr><td colspan='13' $col align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'} $Lang::tr{$pol}</font></td></tr>";
+                       }elsif ($config eq '/var/ipfire/forward/outgoing'){
+                               my $pol='fwdfw '.$fwdfwsettings{'POLICY1'};
+                               if ($fwdfwsettings{'POLICY1'} eq 'MODE1'){
+                                       $col="bgcolor='darkred'";
+                               }else{
+                                       $col="bgcolor='green'";
+                               }
+                               print"<tr><td colspan='13' $col align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'} $Lang::tr{$pol}</font></td></tr>";
+                       }else{
+                               print"<tr><td colspan='13' bgcolor='darkred' align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'} $Lang::tr{'fwdfw MODE1'}</font></td></tr>";
+                       }
+                       print"</table><br><br>";
                }
        }
 }
index d3d3c54e077f2fe418d3db6e0c43535494be5be4..800b31ffb4b4c3cf73a7f88fd668a52bbc8ebd28 100644 (file)
 'fwdfw err tgt_grp'            => 'Ziel-Dienstgruppe ist leer',
 'fwdfw err time'               => 'Es muss mindestens ein Tag gewählt werden',
 'fwdfw from'                   => 'Von:',
+'fwdfw final_rule'             => 'Letzte Regel: ',
 'fwdfw hint ip1'               => 'Die zuletzt erzeugte Regel wird vielleicht nicht aktiviert, weil Quelle und Ziel evtl im selben Netz sind',
 'fwdfw hint ip2'               => 'Bitte überprüfen Sie ob diese Regel Sinn macht: ',
 'fwdfw ipsec network'  => 'IPsec Netzwerke:',
 'fwdfw man port'               => 'Port(s) manuell:',
 'fwdfw moveup'                 => 'Hoch',
 'fwdfw movedown'               => 'Runter',
+'fwdfw MODE1'                  => 'Alle Pakete verwerfen',
+'fwdfw MODE2'                  => 'Alle Pakete annehmen',
 'fwdfw p2p txt'                        => 'Hier können einzelne P2P Netzwerke erlaubt oder verboten werden. Das System setzt die Regeln automatisch unabhängig vom aktuellen Firewall Modus. Unter Umständen können einzelne aktivierte P2P Netzewerke einen erheblichen Teil der Bandbreite beanspruchen.',
 'fwdfw pol allow'              => 'Zugelassen',
 'fwdfw pol block'              => 'Blockiert',
index 1e3ad0099110ac42fd02612c777d4f4168679828..289ae3d0a09230ea94ad60c9f864bdfc01fa83a9 100644 (file)
 'fwdfw err tgt_grp'            => 'Target servicegroup is empty',
 'fwdfw err time'               => 'You have to define at least one day.',
 'fwdfw from'                   => 'From:',
+'fwdfw final_rule'             => 'Last rule: ',
 'fwdfw hint ip1'               => 'The last generated rule may never be activated because source and target probably are in same subnet.',
 'fwdfw hint ip2'               => 'Please doublecheck if this rule makes sense: ',
 'fwdfw ipsec network'  => 'IpSec networks:',
 'fwdfw man port'               => 'Port(s) manual:',
 'fwdfw moveup'                 => 'Move up',
 'fwdfw movedown'               => 'Move down',
+'fwdfw MODE1'                  => 'Drop all packets',
+'fwdfw MODE2'                  => 'Accept all packets',
 'fwdfw p2p txt'                        => 'Here you can admit or deny or allow single p2p networks. Just define which networks are allowed or denied and the system takes care of the rules depending on the firewall mode. An allowed p2p network may use a lot of bandwith.',
 'fwdfw pol allow'              => 'Allowed',
 'fwdfw pol block'              => 'Blocked',