]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/firewall.cgi
Firewall: When using DNAT AUTO, don't display the IP anymore in brackets
[people/teissler/ipfire-2.x.git] / html / cgi-bin / firewall.cgi
index 9af97d1a88b7e5fa7b39bfca3fd1ba134a7b48f2..48e3a8d2a6efe78855d02f8d8c38df6509e32927 100644 (file)
@@ -101,7 +101,7 @@ my @protocols;
 &General::readhasharray("$configipsec", \%ipsecconf);
 &Header::showhttpheaders();
 &Header::getcgihash(\%fwdfwsettings);
-&Header::openpage($Lang::tr{'fwdfw menu'}, 1, '');
+&Header::openpage($Lang::tr{'firewall rules'}, 1, '');
 &Header::openbigbox('100%', 'center',$errormessage);
 #### JAVA SCRIPT ####
 print<<END;
@@ -1284,6 +1284,10 @@ sub get_serviceports
                        }
                }
        }
+
+       # Sort protocols alphabetically.
+       @protocols = sort(@protocols);
+
        return @protocols;
 }
 sub getcolor
@@ -1535,6 +1539,7 @@ sub newrule
                                $selected{'ipfire'}{$fwdfwsettings{$fwdfwsettings{'grp2'}}} ='selected';
                                $selected{'ipfire_src'}{$fwdfwsettings{$fwdfwsettings{'grp1'}}} ='selected';
                                $selected{'dnat'}{$fwdfwsettings{'dnat'}}                               ='selected';
+                               $selected{'snat'}{$fwdfwsettings{'snat'}}                               ='selected';
                        }
                }
                $fwdfwsettings{'oldgrp1a'}=$fwdfwsettings{'grp1'};
@@ -2295,8 +2300,8 @@ sub viewtablerule
        &General::readhash("/var/ipfire/ethernet/settings", \%netsettings);
 
        &viewtablenew(\%configfwdfw, $configfwdfw, $Lang::tr{'firewall rules'});
-       &viewtablenew(\%configinputfw, $configinput, $Lang::tr{'external access'});
-       &viewtablenew(\%configoutgoingfw, $configoutgoing, $Lang::tr{'outgoing firewall'});
+       &viewtablenew(\%configinputfw, $configinput, $Lang::tr{'incoming firewall access'});
+       &viewtablenew(\%configoutgoingfw, $configoutgoing, $Lang::tr{'outgoing firewall access'});
 }
 sub viewtablenew
 {
@@ -2557,11 +2562,11 @@ END
                                                push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$val));
                                        }
                                        @nat_ifaces=&del_double(@nat_ifaces);
-                                       $natstring = join(', ', @nat_ifaces);
+                                       $natstring = "";
                                }else{
-                                       $natstring = $$hash{$key}[29];
+                                       $natstring = "($$hash{$key}[29])";
                                }
-                               print "$Lang::tr{'firewall'} ($natstring)";
+                               print "$Lang::tr{'firewall'} $natstring";
                                if($$hash{$key}[30] ne ''){
                                        $$hash{$key}[30]=~ tr/|/,/;
                                        print": $$hash{$key}[30]";