mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Forward Firewall: Tablegroup DMZ and WLAN now only show the own rules
This commit is contained in:
committed by
Michael Tremer
parent
6adcf1569c
commit
5b7ed8bbae
@@ -1718,6 +1718,7 @@ sub viewtablerule
|
||||
|
||||
&viewtablenew(\%configfwdfw,$configfwdfw,$Lang::tr{'fwdfw rules'},"Forward" );
|
||||
&viewtablenew(\%configfwdfw,$configfwdfw,'',"DMZ" );
|
||||
&viewtablenew(\%configfwdfw,$configfwdfw,'',"WLAN" );
|
||||
&viewtablenew(\%configinputfw,$configinput,"",$Lang::tr{'external access'} );
|
||||
}
|
||||
sub viewtablenew
|
||||
@@ -1731,9 +1732,17 @@ sub viewtablenew
|
||||
#check if there are DMZ entries
|
||||
if ($title1 eq 'DMZ'){
|
||||
foreach my $key (keys %$hash){
|
||||
if ($$hash{$key}[4] eq 'ORANGE' || $$hash{$key}[6] eq 'ORANGE'){$go='on';}
|
||||
if ($$hash{$key}[4] eq 'ORANGE'){$go='on';last}
|
||||
}
|
||||
}elsif( ! -z "$config" ){
|
||||
}elsif($title1 eq 'WLAN'){
|
||||
foreach my $key (keys %$hash){
|
||||
if ($$hash{$key}[4] eq 'BLUE'){$go='on';last}
|
||||
}
|
||||
}elsif($title1 eq 'Forward'){
|
||||
foreach my $key (keys %$hash){
|
||||
if (($$hash{$key}[4] ne 'ORANGE' && $$hash{$key}[4] ne 'BLUE')){$go='on';last}
|
||||
}
|
||||
}elsif( ! -z $config){
|
||||
$go='on';
|
||||
}
|
||||
if($go ne ''){
|
||||
@@ -1750,8 +1759,9 @@ sub viewtablenew
|
||||
print"<tr><td align='center' width='1%'><b>#</td><td width='1%'></td><td align='center' ><b>$Lang::tr{'fwdfw source'}</td><td width='1%'><b>Log</td><td align='center' width='20%'><b>$Lang::tr{'fwdfw target'}</td><td align='center'><b>$Lang::tr{'protocol'}</b></td><td align='center' width='70%'><b>$Lang::tr{'remark'}</td><td align='center' colspan='3' width='1%'><b>$Lang::tr{'fwdfw action'}</td></tr>";
|
||||
foreach my $key (sort {$a <=> $b} keys %$hash){
|
||||
#check if we have a FORWARDFW OR DMZ RULE
|
||||
if ($title1 eq 'DMZ' && ($$hash{$key}[4] ne 'ORANGE' && $$hash{$key}[6] ne 'ORANGE')){next;}
|
||||
if ($title1 eq 'Forward' && ($$hash{$key}[4] eq 'ORANGE' || $$hash{$key}[6] eq 'ORANGE')){next;}
|
||||
if ($title1 eq 'DMZ' && ($$hash{$key}[4] ne 'ORANGE')){next;}
|
||||
if ($title1 eq 'WLAN' && ($$hash{$key}[4] ne 'BLUE')){next;}
|
||||
if ($title1 eq 'Forward' && ($$hash{$key}[4] eq 'ORANGE' || $$hash{$key}[4] eq 'BLUE')){next;}
|
||||
@tmpsrc=();
|
||||
#check if vpn hosts/nets have been deleted
|
||||
if($$hash{$key}[3] =~ /ipsec/i || $$hash{$key}[3] =~ /ovpn/i){
|
||||
|
||||
Reference in New Issue
Block a user