}
}
}
- #When using source- or targetport, the protocol has to be TCP or UDP
- if (($fwdfwsettings{'USESRV'} eq 'ON' || $fwdfwsettings{'USE_SRC_PORT'} eq 'ON') && ($fwdfwsettings{'SRC_PORT'} ne '' || $fwdfwsettings{'TGT_PORT'} ne '') && ($fwdfwsettings{'PROT'} ne 'TCP' && $fwdfwsettings{'PROT'} ne 'UDP')){
- $errormessage.=$Lang::tr{'fwdfw err prot_port1'};
- return;
- }
- #when icmp selected, no targetport allowed
+ #when icmp selected, no source and targetport allowed
if (($fwdfwsettings{'PROT'} ne '' && $fwdfwsettings{'PROT'} ne 'TCP' && $fwdfwsettings{'PROT'} ne 'UDP' && $fwdfwsettings{'PROT'} ne 'template') && ($fwdfwsettings{'USESRV'} eq 'ON' || $fwdfwsettings{'USE_SRC_PORT'} eq 'ON')){
$errormessage.=$Lang::tr{'fwdfw err prot_port'};
return;
$fwdfwsettings{'ICMP_TYPES'}='';
$fwdfwsettings{'USESRV'}='';
$fwdfwsettings{'TGT_PORT'}='';
- }elsif($fwdfwsettings{'PROT'} ne 'TCP' && $fwdfwsettings{'PROT'} ne 'UDP' && $fwdfwsettings{'PROT'} ne 'ICMP'){
+ }elsif($fwdfwsettings{'PROT'} ne 'TCP' && $fwdfwsettings{'PROT'} ne 'UDP'){
$fwdfwsettings{'ICMP_TYPES'}='';
- $fwdfwsettings{'PROT'} = '';
+ $fwdfwsettings{'SRC_PORT'}='';
+ $fwdfwsettings{'TGT_PORT'}='';
}elsif($fwdfwsettings{'PROT'} ne 'ICMP'){
$fwdfwsettings{'ICMP_TYPES'}='';
}
if ($show eq '1'){$show='';print"</select></td></tr>";}
#IPsec netze
foreach my $key (sort { ncmp($ipsecconf{$a}[1],$ipsecconf{$b}[1]) } keys %ipsecconf) {
- if ($ipsecconf{$key}[3] eq 'net' || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
+ if ($ipsecconf{$key}[3] eq 'net' || ($optionsfw{'SHOWDROPDOWN'} eq 'on' && $ipsecconf{$key}[3] ne 'host')){
print"<tr><td valign='top'><input type='radio' name='$grp' value='ipsec_net_$srctgt' $checked{$grp}{'ipsec_net_'.$srctgt}></td><td >$Lang::tr{'fwhost ipsec net'}</td><td align='right'><select name='ipsec_net_$srctgt' style='width:200px;'>" if ($show eq '');
$show='1';
print "<option ";
}
}elsif ($$hash{$key}[4] eq 'RED1'){
print "$ipfireiface $Lang::tr{'fwdfw red'}";
+ }elsif ($$hash{$key}[4] eq 'ALL'){
+ print "$ipfireiface $Lang::tr{'all'}";
}else{
- print "$$hash{$key}[4]";
+ if ($$hash{$key}[4] eq 'GREEN' || $$hash{$key}[4] eq 'ORANGE' || $$hash{$key}[4] eq 'BLUE' || $$hash{$key}[4] eq 'RED'){
+ print "$ipfireiface $Lang::tr{lc($$hash{$key}[4])}";
+ }else{
+ print "$ipfireiface $$hash{$key}[4]";
+ }
}
$tdcolor='';
#SOURCEPORT
}
print"<br>->";
}
- 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}[5] eq 'std_net_tgt' || $$hash{$key}[5] eq 'ipfire'){
if ($$hash{$key}[6] eq 'RED1'){
- print "$ipfireiface $Lang::tr{'red1'}";
+ print "$Lang::tr{'red1'}";
}elsif ($$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE'|| $$hash{$key}[6] eq 'ALL' || $$hash{$key}[6] eq 'RED')
{
- print "$ipfireiface ".&get_name($$hash{$key}[6]);
+ print &get_name($$hash{$key}[6]);
}else{
print $$hash{$key}[6];
}
$message = $Lang::tr{'fwdfw pol allow'};
- } elsif ($config eq '/var/ipfire/firewall/outgoing') {
+ } elsif ($config eq '/var/ipfire/firewall/outgoing' && ($fwdfwsettings{'POLICY1'} ne 'MODE1')) {
$message = $Lang::tr{'fwdfw pol allow'};
-
+ $colour = "bgcolor='green'";
} else {
$message = $Lang::tr{'fwdfw pol block'};
$colour = "bgcolor='darkred'";