- | $Lang::tr{'fwdfw sourceip'} |
-
|
- | $Lang::tr{'fwhost stdnet'} | | | $Lang::tr{'fwhost ccdnet'} | |
- | $Lang::tr{'fwhost cust net'} | | | $Lang::tr{'fwhost ccdhost'} | |
- | $Lang::tr{'fwhost cust addr'} | |
+
| $Lang::tr{'fwdfw use srcport'} |
$Lang::tr{'fwdfw man port'} |
@@ -1363,7 +1574,7 @@ END
END
&General::readhasharray("${General::swroot}/fwhosts/icmp-types", \%icmptypes);
print"All ICMP-Types";
- foreach my $key (sort { uc($icmptypes{$a}[0]) cmp uc($icmptypes{$b}[0]) } keys %icmptypes){
+ foreach my $key (sort { ncmp($icmptypes{$a}[0],$icmptypes{$b}[0]) } keys %icmptypes){
if($fwdfwsettings{'ICMP_TYPES'} eq "$icmptypes{$key}[0]"){
print"$icmptypes{$key}[0] ($icmptypes{$key}[1])";
}else{
@@ -1379,119 +1590,43 @@ END
&Header::openbox('100%', 'left', $Lang::tr{'fwdfw target'});
print<
- | $Lang::tr{'fwdfw targetip'} | | IPFire ($Lang::tr{'external access'}) |
-END
- print "Default IP";
-
- foreach my $alias (sort keys %aliases)
- {
- print "$alias";
- }
-
- print< |
-
|
- | $Lang::tr{'fwhost stdnet'} |
-END
- foreach my $network (sort keys %defaultNetworks)
- {
- next if($defaultNetworks{$network}{'NAME'} eq "IPFire");
- print "$network";
- }
- print< | | $Lang::tr{'fwhost ccdnet'} |
-END
- &fillselect(\%ccdnet,$fwdfwsettings{$fwdfwsettings{'grp2'}});
- print< |
- | $Lang::tr{'fwhost cust net'} |
-END
- &fillselect(\%customnetwork,$fwdfwsettings{$fwdfwsettings{'grp2'}});
- print< | | $Lang::tr{'fwhost ccdhost'} |
+ | $Lang::tr{'fwdfw targetip'} | | Firewall |
END
- foreach my $key (sort { uc($ccdhost{$a}[0]) cmp uc($ccdhost{$b}[0]) } keys %ccdhost)
- {
- if ($ccdhost{$key}[33] ne ''){
- print "$ccdhost{$key}[1]";
- }
- }
- print<
- | $Lang::tr{'fwhost cust addr'} |
-END
- &fillselect(\%customhost,$fwdfwsettings{$fwdfwsettings{'grp2'}});
- print< | | $Lang::tr{'fwhost ovpn_n2n'} |
-END
- foreach my $key (sort { uc($ccdhost{$a}[0]) cmp uc($ccdhost{$b}[0]) } keys %ccdhost) {
- if($ccdhost{$key}[3] eq 'net'){
- print "$ccdhost{$key}[1]";
- }
- }
- print< |
- | $Lang::tr{'fwhost cust grp'} |
-END
- $helper='';
- foreach my $key (sort { uc($customgrp{$a}[0]) cmp uc($customgrp{$b}[0]) } keys %customgrp) {
- if($helper ne $customgrp{$key}[0]){
- print"$customgrp{$key}[0]";
- }
- $helper=$customgrp{$key}[0];
- }
- print< |
- | $Lang::tr{'fwhost ipsec net'} |
-END
- foreach my $key (sort { uc($ipsecconf{$a}[1]) cmp uc($ipsecconf{$b}[1]) } keys %ipsecconf) {
- if ($ipsecconf{$key}[3] eq 'net'){
- print"$ipsecconf{$key}[1]";
+ print"";
+ print "$Lang::tr{'all'}";
+ print "$Lang::tr{'green'} ($ifaces{'GREEN_ADDRESS'})" if $ifaces{'GREEN_ADDRESS'};
+ print "$Lang::tr{'orange'} ($ifaces{'ORANGE_ADDRESS'})" if (&Header::orange_used());
+ print "$Lang::tr{'blue'} ($ifaces{'BLUE_ADDRESS'})"if (&Header::blue_used());
+ print "$Lang::tr{'red1'} ($redip)" if ($redip);
+ if (! -z "${General::swroot}/ethernet/aliases"){
+ foreach my $alias (sort keys %aliases)
+ {
+ print "$alias";
}
}
print< | |
+
| | |
END
-# | $Lang::tr{'fwhost ipsec host'} |
-#END
-# foreach my $key (sort { uc($ipsecconf{$a}[1]) cmp uc($ipsecconf{$b}[1]) } keys %ipsecconf) {
-# if ($ipsecconf{$key}[3] eq 'host'){
-# print"$ipsecconf{$key}[1]";
-# }
-# }
+ &gen_dd_block('tgt','grp2');
print<
- $Lang::tr{'fwhost attention'}:
- $Lang::tr{'fwhost macwarn'}
-
+
- | $Lang::tr{'fwdfw use srv'} | | $Lang::tr{'fwhost cust service'} |
+ | $Lang::tr{'fwdfw use srv'} | | $Lang::tr{'fwhost cust service'} |
END
&General::readhasharray("$configsrv", \%customservice);
- foreach my $key (sort { uc($customservice{$a}[0]) cmp uc($customservice{$b}[0]) } keys %customservice){
+ foreach my $key (sort { ncmp($customservice{$a}[0],$customservice{$b}[0]) } keys %customservice){
print"$customservice{$key}[0]";
}
print< |
- | | $Lang::tr{'fwhost cust srvgrp'}: |
+ | | $Lang::tr{'fwhost cust srvgrp'} |
END
&General::readhasharray("$configsrvgrp", \%customservicegrp);
my $helper;
- foreach my $key (sort { uc($customservicegrp{$a}[0]) cmp uc($customservicegrp{$b}[0]) } keys %customservicegrp){
+ foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b}[0]) } keys %customservicegrp){
if ($helper ne $customservicegrp{$key}[0]){
print" |
- | | $Lang::tr{'fwdfw man port'} |
+ | | $Lang::tr{'fwdfw man port'} |
END
foreach ("TCP","UDP","GRE","ESP","AH","ICMP")
{
@@ -1514,12 +1649,12 @@ END
}
$fwdfwsettings{'TGT_PORT'} =~ s/\|/,/g;
print< | |
+ | |
| | $Lang::tr{'fwhost icmptype'} |
END
&General::readhasharray("${General::swroot}/fwhosts/icmp-types", \%icmptypes);
print"All ICMP-Types";
- foreach my $key (sort { uc($icmptypes{$a}[0]) cmp uc($icmptypes{$b}[0]) }keys %icmptypes){
+ foreach my $key (sort { ncmp($icmptypes{$a}[0],$icmptypes{$b}[0]) }keys %icmptypes){
if($fwdfwsettings{'ICMP_TGT'} eq "$icmptypes{$key}[0]"){
print"$icmptypes{$key}[0] ($icmptypes{$key}[1])";
}else{
@@ -1532,12 +1667,69 @@ END
END
&Header::closebox;
+ #---SNAT / DNAT ------------------------------------------------
+ &Header::openbox('100%', 'left', 'NAT');
+ print<
+ | $Lang::tr{'fwdfw use nat'} | |
+ | | $Lang::tr{'fwdfw dnat'} |
+END
+ print"Firewall: | ";
+ print "$Lang::tr{'all'}";
+ print "Default IP";
+ foreach my $alias (sort keys %aliases)
+ {
+ print "$alias";
+ }
+ print" | ";
+ $fwdfwsettings{'dnatport'}=~ tr/|/,/;
+ print" | Port: | | ";
+ print"
| ";
+ #SNAT
+ print" | | $Lang::tr{'fwdfw snat'} | ";
+ print"Firewall: | ";
+ foreach my $alias (sort keys %aliases)
+ {
+ print "$alias";
+ }
+ foreach my $network (sort keys %defaultNetworks)
+ {
+ next if($defaultNetworks{$network}{'NAME'} eq "IPFire");
+ next if($defaultNetworks{$network}{'NAME'} eq "ALL");
+ next if($defaultNetworks{$network}{'NAME'} =~ /OpenVPN/i);
+ print "$network";
+ }
+ print" | | | | ";
+ print" ";
+ &Header::closebox();
#---Activate/logging/remark-------------------------------------
&Header::openbox('100%', 'left', $Lang::tr{'fwdfw additional'});
print<
- $Lang::tr{'remark'}: | |
+ $Lang::tr{'fwdfw rule action'} |
END
+ foreach ("ACCEPT","DROP","REJECT")
+ {
+ if($fwdfwsettings{'updatefwrule'} eq 'on'){
+ print"$Lang::tr{'fwdfw '.$_}";
+ }else{
+ if($fwdfwsettings{'POLICY'} eq 'MODE2'){
+ $fwdfwsettings{'RULE_ACTION'} = 'DROP';
+ }
+ if ($_ eq $fwdfwsettings{'RULE_ACTION'})
+ {
+ print"$Lang::tr{'fwdfw '.$_}";
+ }else{
+ print"$Lang::tr{'fwdfw '.$_}";
+ }
+ }
+ }
+ print" | ";
+ print"$Lang::tr{'remark'}: | | ";
if($fwdfwsettings{'updatefwrule'} eq 'on' || $fwdfwsettings{'copyfwrule'} eq 'on'){
print "$Lang::tr{'fwdfw rulepos'}: | ";
for (my $count =1; $count <= $sum; $count++){
@@ -1561,8 +1753,8 @@ END
&Header::openbox('100%', 'left', $Lang::tr{'fwdfw timeframe'});
print<
- | $Lang::tr{'fwdfw timeframe'} |
-   |
+ | $Lang::tr{'fwdfw timeframe'} |
+ |
$Lang::tr{'time'}: |
$Lang::tr{'advproxy monday'} $Lang::tr{'advproxy tuesday'} $Lang::tr{'advproxy wednesday'} $Lang::tr{'advproxy thursday'} $Lang::tr{'advproxy friday'} $Lang::tr{'advproxy saturday'} $Lang::tr{'advproxy sunday'} |
@@ -1571,15 +1763,13 @@ END
|
-
-
-
-
-
-
-
-
- |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
END
for (my $i=0;$i<=23;$i++) {
@@ -1603,19 +1793,18 @@ END
}
}
print< |
-
+ |
END
-
#---ACTION------------------------------------------------------
if($fwdfwsettings{'updatefwrule'} ne 'on'){
print<
-
- |
-
+
+
+
+
END
}else{
print<
+
+
|