# | $Lang::tr{'fwdfw source'} | Log | $Lang::tr{'fwdfw target'} | $Lang::tr{'protocol'} | $Lang::tr{'fwdfw time'} | $Lang::tr{'fwdfw action'} |
# | $Lang::tr{'fwdfw source'} | Log | $Lang::tr{'fwdfw target'} | $Lang::tr{'fwdfw action'} | ||||||||||||||||||
$key | END + #RULETYPE (A,R,D) if ($$hash{$key}[0] eq 'ACCEPT'){ $ruletype='A'; $tooltip='ACCEPT'; @@ -2092,72 +2192,111 @@ END $tooltip='REJECT'; $rulecolor=$color{'color16'}; } - print"$ruletype | "; + print"$ruletype | "; + #Get Protocol + my $prot; + if ($$hash{$key}[8] && $$hash{$key}[7] eq 'ON'){#source prot if manual + push (@protocols,$$hash{$key}[8]); + }elsif ($$hash{$key}[12]){ #target prot if manual + push (@protocols,$$hash{$key}[12]); + }elsif($$hash{$key}[14] eq 'cust_srv'){ + &get_serviceports("service",$$hash{$key}[15]); + }elsif($$hash{$key}[14] eq 'cust_srvgrp'){ + &get_serviceports("group",$$hash{$key}[15]); + }else{ + push (@protocols,$Lang::tr{'all'}); + } + my $protz=join(",",@protocols); + print"$protz | "; + @protocols=(); + #SOURCE + my $ipfireiface; &getcolor($$hash{$key}[3],$$hash{$key}[4],\%customhost); print"";
+ if ($$hash{$key}[3] eq 'ipfire_src'){
+ $ipfireiface='Interface ';
+ }
if ($$hash{$key}[3] eq 'std_net_src'){
print &get_name($$hash{$key}[4]);
+ }elsif ($$hash{$key}[3] eq 'src_addr'){
+ my ($split1,$split2) = split("/",$$hash{$key}[4]);
+ if ($split2 eq '32'){
+ print $split1;
+ }else{
+ print $$hash{$key}[4];
+ }
+ }elsif ($$hash{$key}[4] eq 'RED1'){
+ print "$ipfireiface $Lang::tr{'fwdfw red'}";
}else{
- print $$hash{$key}[4];
+ print "$$hash{$key}[4]";
}
$tdcolor='';
+ #SOURCEPORT
&getsrcport(\%$hash,$key);
+ #Is this a SNAT rule?
+ if ($$hash{$key}[31] eq 'snat' && $$hash{$key}[28] eq 'ON'){
+ my $net=&get_name($$hash{$key}[29]);
+ if ( ! $net){ $net=$$hash{$key}[29];}
+ print" ->$net"; + if ($$hash{$key}[30] ne ''){ + print": $$hash{$key}[30]"; + } + } if ($$hash{$key}[17] eq 'ON'){ $log="/images/on.gif"; }else{ $log="/images/off.gif"; } + #LOGGING print<
+ | |
END
+ #TARGET
&getcolor($$hash{$key}[5],$$hash{$key}[6],\%customhost);
print<$prot | "; - if ($$hash{$key}[18] eq 'ON'){ - my @days=(); - if($$hash{$key}[19] ne ''){push (@days,$Lang::tr{'fwdfw wd_mon'});} - if($$hash{$key}[20] ne ''){push (@days,$Lang::tr{'fwdfw wd_tue'});} - if($$hash{$key}[21] ne ''){push (@days,$Lang::tr{'fwdfw wd_wed'});} - if($$hash{$key}[22] ne ''){push (@days,$Lang::tr{'fwdfw wd_thu'});} - if($$hash{$key}[23] ne ''){push (@days,$Lang::tr{'fwdfw wd_fri'});} - if($$hash{$key}[24] ne ''){push (@days,$Lang::tr{'fwdfw wd_sat'});} - if($$hash{$key}[25] ne ''){push (@days,$Lang::tr{'fwdfw wd_sun'});} - my $weekdays=join(",",@days); - if (@days){ - print"$weekdays   $$hash{$key}[26] - $$hash{$key}[27] | "; - } - }else{ - print"24/7 | "; - } + #RULE ACTIVE if($$hash{$key}[2] eq 'ON'){ $gif="/images/on.gif" @@ -2165,74 +2304,165 @@ END $gif="/images/off.gif" } print<+ | + | ++ | ++ | ++ | "; } if (exists $$hash{$key+1}){ print< | + | "; } #REMARK - if ($optionsfw{'SHOWREMARK'} eq 'on'){ + if ($optionsfw{'SHOWREMARK'} eq 'on' && $$hash{$key}[16] ne ''){ print" | ||||||
  |   $$hash{$key}[16] | $$hash{$key}[16] | "; + } + if ($$hash{$key}[18] eq 'ON'){ + #TIMEFRAME + if ($$hash{$key}[18] eq 'ON'){ + my @days=(); + if($$hash{$key}[19] ne ''){push (@days,$Lang::tr{'fwdfw wd_mon'});} + if($$hash{$key}[20] ne ''){push (@days,$Lang::tr{'fwdfw wd_tue'});} + if($$hash{$key}[21] ne ''){push (@days,$Lang::tr{'fwdfw wd_wed'});} + if($$hash{$key}[22] ne ''){push (@days,$Lang::tr{'fwdfw wd_thu'});} + if($$hash{$key}[23] ne ''){push (@days,$Lang::tr{'fwdfw wd_fri'});} + if($$hash{$key}[24] ne ''){push (@days,$Lang::tr{'fwdfw wd_sat'});} + if($$hash{$key}[25] ne ''){push (@days,$Lang::tr{'fwdfw wd_sun'});} + my $weekdays=join(",",@days); + if (@days){ + print"||||||||||||||||||||
$weekdays $$hash{$key}[26] - $$hash{$key}[27] | ||||||||||||||||||||||
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol block'} |
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol allow'} |
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol block'} |
$Lang::tr{'fwhost empty'} |
$Lang::tr{'fwhost empty'} |
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol block'} |
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol allow'} |
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol block'} |
$Lang::tr{'green'} | $Lang::tr{'red'} ($Lang::tr{'fwdfw pol allow'}) | "; + print"$orange1 | " if (&Header::orange_used()); + print"$blue1 | " if (&Header::blue_used()); + print"
$Lang::tr{'orange'} | $Lang::tr{'red'} ($Lang::tr{'fwdfw pol allow'}) | $Lang::tr{'green'} ($Lang::tr{'fwdfw pol block'}) | "; + print"$blue | " if (&Header::blue_used()); + print"
$Lang::tr{'blue'} | $Lang::tr{'red'} ($Lang::tr{'fwdfw pol allow'}) | "; + print"$orange | " if (&Header::orange_used()); + print"$Lang::tr{'green'} ($Lang::tr{'fwdfw pol block'}) | "; + print"
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol allow'} |
$Lang::tr{'fwdfw final_rule'} | $Lang::tr{'fwdfw pol block'} |