$Lang::tr{'fwdfw pol text'} | ||
- | - | -END - print "$Lang::tr{'outgoing firewall reset'}: "; - print " |
$Lang::tr{'fwhost stdnet'} | ||
$Lang::tr{'fwhost cust net'} | "; + } + #custom hosts + if (! -z $confighost || $optionsfw{'SHOWDROPDOWN'} eq 'on'){ + print" | |
$Lang::tr{'fwhost cust addr'} | "; + } + #custom groups + if (! -z $configgrp || $optionsfw{'SHOWDROPDOWN'} eq 'on'){ + print" | |
$Lang::tr{'fwhost cust grp'} | "; + } + #End left table. start right table (vpn) + print" |
$Lang::tr{'fwhost ccdnet'} | |||||
$Lang::tr{'fwhost ccdhost'} | |||||
$Lang::tr{'fwhost ovpn_n2n'}: | $Lang::tr{'fwhost ovpn_n2n'} | | |||
$Lang::tr{'fwhost ipsec net'} | $Lang::tr{'fwhost ipsec net'} | |
$Lang::tr{'fwdfw rule action'} |
# | $Lang::tr{'fwdfw source'} | Log | $Lang::tr{'fwdfw target'} | $Lang::tr{'protocol'} | $Lang::tr{'remark'} | $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'; @@ -1836,56 +2189,111 @@ END $tooltip='REJECT'; $rulecolor=$color{'color16'}; } - print"$ruletype | "; - print""; + 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<
END
- if ($$hash{$key}[5] eq 'std_net_tgt'){
- print &get_name($$hash{$key}[6]);
+ #Is this a DNAT rule?
+ if ($$hash{$key}[31] eq 'dnat' && $$hash{$key}[28] eq 'ON'){
+ print "Firewall ($$hash{$key}[29])";
+ if($$hash{$key}[30] ne ''){
+ $$hash{$key}[30]=~ tr/|/,/;
+ print": $$hash{$key}[30]";
+ }
+ print" ->"; + } + if ($$hash{$key}[5] eq 'ipfire'){ + $ipfireiface='Interface'; + } + if ($$hash{$key}[5] eq 'std_net_tgt' || $$hash{$key}[5] eq 'ipfire' || $$hash{$key}[6] eq 'RED1' || $$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE' ){ + if ($$hash{$key}[6] eq 'RED1'){ + print "$ipfireiface $Lang::tr{'red1'}"; + }elsif ($$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE'|| $$hash{$key}[6] eq 'ALL') + { + print "$ipfireiface ".&get_name($$hash{$key}[6]); + }else{ + print $$hash{$key}[6]; + } + }elsif ($$hash{$key}[5] eq 'tgt_addr'){ + my ($split1,$split2) = split("/",$$hash{$key}[6]); + if ($split2 eq '32'){ + print $split1; + }else{ + print $$hash{$key}[6]; + } }else{ - print $$hash{$key}[6]; + print "$$hash{$key}[6]"; } + $tdcolor=''; + #TARGETPORT &gettgtport(\%$hash,$key); - ################################################################################ print" | ";
- #Get Protocol
- my $prot;
- if ($$hash{$key}[12]){ #target prot if manual
- $prot=$$hash{$key}[12];
- }elsif($$hash{$key}[8]){ #source prot if manual
- $prot=$$hash{$key}[8];
- }elsif($$hash{$key}[14] eq 'cust_srv'){
- $prot=&get_serviceports("service",$$hash{$key}[15]);
- }elsif($$hash{$key}[14] eq 'cust_srvgrp'){
- $prot=&get_serviceports("group",$$hash{$key}[15]);
- }else{
- $prot=$Lang::tr{'all'};
- }
- print"$prot | "; - - print"$$hash{$key}[16] | "; - + #RULE ACTIVE if($$hash{$key}[2] eq 'ON'){ $gif="/images/on.gif" @@ -1893,131 +2301,165 @@ END $gif="/images/off.gif" } print<+ | + | ++ | ++ | ++ | "; + print" | "; } if (exists $$hash{$key+1}){ print< | + | "; + print" | "; + } + #REMARK + if ($optionsfw{'SHOWREMARK'} eq 'on' && $$hash{$key}[16] ne ''){ + print" | |||||
$$hash{$key}[16] | ||||||||||||||||||||||||
$Lang::tr{'fwdfw time'} "; - print"$weekdays"; - print "  $Lang::tr{'fwdfw from'} $$hash{$key}[26]   $Lang::tr{'fwdfw till'} $$hash{$key}[27] | ||||||||||||||||||||||||
$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'} | |
$p2pline[0]: | ||
$Lang::tr{'outgoing firewall p2p allow'} | ||
$Lang::tr{'outgoing firewall p2p deny'} |
$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'} |