mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 15:32:59 +02:00
Forward Firewall: added an option to firewall-options to show all dropdowns on rulecreation site.
This commit is contained in:
committed by
Michael Tremer
parent
8013bd0ac2
commit
d998784149
@@ -1026,7 +1026,7 @@ print<<END;
|
||||
<table width='100%' border='0'>
|
||||
<tr><td width='50%' valign='top'>
|
||||
<table width='100%' border='0'>
|
||||
<tr><td width='1%'><input type='radio' name='$grp' value='std_net_$srctgt' $checked{$grp}{'std_net_'.$srctgt}></td><td>$Lang::tr{'fwhost stdnet'}</td><td><select name='std_net_$srctgt' style='min-width:185px;'>
|
||||
<tr><td width='1%'><input type='radio' name='$grp' value='std_net_$srctgt' $checked{$grp}{'std_net_'.$srctgt}></td><td>$Lang::tr{'fwhost stdnet'}</td><td align='right'><select name='std_net_$srctgt' style='min-width:185px;'>
|
||||
END
|
||||
foreach my $network (sort keys %defaultNetworks)
|
||||
{
|
||||
@@ -1038,20 +1038,20 @@ END
|
||||
}
|
||||
print"</select></td></tr>";
|
||||
#custom networks
|
||||
if (! -z $confignet){
|
||||
print"<tr><td><input type='radio' name='$grp' value='cust_net_$srctgt' $checked{$grp}{'cust_net_'.$srctgt}></td><td>$Lang::tr{'fwhost cust net'}</td><td><select name='cust_net_$srctgt' style='min-width:185px;'>";
|
||||
if (! -z $confignet || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
|
||||
print"<tr><td><input type='radio' name='$grp' value='cust_net_$srctgt' $checked{$grp}{'cust_net_'.$srctgt}></td><td>$Lang::tr{'fwhost cust net'}</td><td align='right'><select name='cust_net_$srctgt' style='min-width:185px;'>";
|
||||
&fillselect(\%customnetwork,$fwdfwsettings{$fwdfwsettings{$grp}});
|
||||
print"</select></td>";
|
||||
}
|
||||
#custom hosts
|
||||
if (! -z $confighost){
|
||||
print"<tr><td><input type='radio' name='$grp' value='cust_host_$srctgt' $checked{$grp}{'cust_host_'.$srctgt}></td><td>$Lang::tr{'fwhost cust addr'}</td><td><select name='cust_host_$srctgt' style='min-width:185px;'>";
|
||||
if (! -z $confighost || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
|
||||
print"<tr><td><input type='radio' name='$grp' value='cust_host_$srctgt' $checked{$grp}{'cust_host_'.$srctgt}></td><td>$Lang::tr{'fwhost cust addr'}</td><td align='right'><select name='cust_host_$srctgt' style='min-width:185px;'>";
|
||||
&fillselect(\%customhost,$fwdfwsettings{$fwdfwsettings{$grp}});
|
||||
print"</select></td>";
|
||||
}
|
||||
#custom groups
|
||||
if (! -z $configgrp){
|
||||
print"<tr><td valign='top'><input type='radio' name='$grp' value='cust_grp_$srctgt' $checked{$grp}{'cust_grp_'.$srctgt}></td><td >$Lang::tr{'fwhost cust grp'}</td><td><select name='cust_grp_$srctgt' style='min-width:185px;'>";
|
||||
if (! -z $configgrp || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
|
||||
print"<tr><td valign='top'><input type='radio' name='$grp' value='cust_grp_$srctgt' $checked{$grp}{'cust_grp_'.$srctgt}></td><td >$Lang::tr{'fwhost cust grp'}</td><td align='right'><select name='cust_grp_$srctgt' style='min-width:185px;'>";
|
||||
foreach my $key (sort { uc($customgrp{$a}[0]) cmp uc($customgrp{$b}[0]) } keys %customgrp) {
|
||||
if($helper ne $customgrp{$key}[0]){
|
||||
print"<option ";
|
||||
@@ -1065,43 +1065,52 @@ END
|
||||
#End left table. start right table (vpn)
|
||||
print"</tr></table></td><td valign='top'><table width='100%' border='0'><tr>";
|
||||
# CCD networks
|
||||
if( ! -z $configccdnet){
|
||||
print"<td width='1%'><input type='radio' name='$grp' value='ovpn_net_$srctgt' $checked{$grp}{'ovpn_net_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ccdnet'}</td><td nowrap='nowrap' width='1%'><select name='ovpn_net_$srctgt' style='min-width:185px;'>";
|
||||
if( ! -z $configccdnet || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
|
||||
print"<td width='1%'><input type='radio' name='$grp' value='ovpn_net_$srctgt' $checked{$grp}{'ovpn_net_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ccdnet'}</td><td nowrap='nowrap' width='1%' align='right'><select name='ovpn_net_$srctgt' style='min-width:185px;'>";
|
||||
&fillselect(\%ccdnet,$fwdfwsettings{$fwdfwsettings{$grp}});
|
||||
print"</select></td></tr>";
|
||||
}
|
||||
#OVPN CCD Hosts
|
||||
foreach my $key (sort { uc($ccdhost{$a}[0]) cmp uc($ccdhost{$b}[0]) } keys %ccdhost){
|
||||
if ($ccdhost{$key}[33] ne ''){
|
||||
print"<tr><td width='1%'><input type='radio' name='$grp' value='ovpn_host_$srctgt' $checked{$grp}{'ovpn_host_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ccdhost'}</td><td nowrap='nowrap' width='1%'><select name='ovpn_host_$srctgt' style='min-width:185px;'>" if ($show eq '');
|
||||
if ($ccdhost{$key}[33] ne '' ){
|
||||
print"<tr><td width='1%'><input type='radio' name='$grp' value='ovpn_host_$srctgt' $checked{$grp}{'ovpn_host_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ccdhost'}</td><td nowrap='nowrap' width='1%' align='right'><select name='ovpn_host_$srctgt' style='min-width:185px;'>" if ($show eq '');
|
||||
$show='1';
|
||||
print "<option value='$ccdhost{$key}[1]'";
|
||||
print "selected='selected'" if ($fwdfwsettings{$fwdfwsettings{$grp}} eq $ccdhost{$key}[1]);
|
||||
print ">$ccdhost{$key}[1]</option>";
|
||||
}
|
||||
}
|
||||
if($optionsfw{'SHOWDROPDOWN'} eq 'on' && $show eq ''){
|
||||
print"<tr><td width='1%'><input type='radio' name='$grp' value='ovpn_host_$srctgt' $checked{$grp}{'ovpn_host_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ccdhost'}</td><td nowrap='nowrap' width='1%' align='right'><select name='ovpn_host_$srctgt' style='min-width:185px;'></select></td></tr>" ;
|
||||
}
|
||||
if ($show eq '1'){$show='';print"</select></td></tr>";}
|
||||
#OVPN N2N
|
||||
foreach my $key (sort { uc($ccdhost{$a}[0]) cmp uc($ccdhost{$b}[0]) } keys %ccdhost){
|
||||
if ($ccdhost{$key}[3] eq 'net'){
|
||||
print"<tr><td width='1%'><input type='radio' name='$grp' value='ovpn_n2n_$srctgt' $checked{$grp}{'ovpn_n2n_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ccdhost'}</td><td nowrap='nowrap' width='1%'><select name='ovpn_n2n_$srctgt' style='min-width:185px;'>" if ($show eq '');
|
||||
my $show='1';
|
||||
print"<tr><td width='1%'><input type='radio' name='$grp' value='ovpn_n2n_$srctgt' $checked{$grp}{'ovpn_n2n_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ovpn_n2n'}:</td><td nowrap='nowrap' width='1%' align='right'><select name='ovpn_n2n_$srctgt' style='min-width:185px;'>" if ($show eq '');
|
||||
$show='1';
|
||||
print "<option value='$ccdhost{$key}[1]'";
|
||||
print "selected='selected'" if ($fwdfwsettings{$fwdfwsettings{$grp}} eq $ccdhost{$key}[1]);
|
||||
print ">$ccdhost{$key}[1]</option>";
|
||||
}
|
||||
}
|
||||
if($optionsfw{'SHOWDROPDOWN'} eq 'on' && $show eq ''){
|
||||
print"<tr><td width='1%'><input type='radio' name='$grp' value='ovpn_n2n_$srctgt' $checked{$grp}{'ovpn_n2n_'.$srctgt}></td><td nowrap='nowrap' width='16%'>$Lang::tr{'fwhost ovpn_n2n'}</td><td nowrap='nowrap' width='1%' align='right'><select name='ovpn_n2n_$srctgt' style='min-width:185px;'></select></td></tr>" ;
|
||||
}
|
||||
if ($show eq '1'){$show='';print"</select></td></tr>";}
|
||||
#IPsec netze
|
||||
foreach my $key (sort { uc($ipsecconf{$a}[1]) cmp uc($ipsecconf{$b}[1]) } keys %ipsecconf) {
|
||||
if ($ipsecconf{$key}[3] eq 'net'){
|
||||
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><select name='ipsec_net_$srctgt' style='min-width:185px;'>" if ($show eq '');
|
||||
if ($ipsecconf{$key}[3] eq 'net' || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
|
||||
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='min-width:185px;'>" if ($show eq '');
|
||||
$show='1';
|
||||
print "<option ";
|
||||
print "selected='selected'" if ($fwdfwsettings{$fwdfwsettings{$grp}} eq $ipsecconf{$key}[1]);
|
||||
print ">$ipsecconf{$key}[1]</option>";
|
||||
}
|
||||
}
|
||||
if($optionsfw{'SHOWDROPDOWN'} eq 'on' && $show eq ''){
|
||||
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='min-width:185px;'><select></td></tr>";
|
||||
}
|
||||
if ($show eq '1'){$show='';print"</select></td></tr>";}
|
||||
|
||||
print"</tr></table>";
|
||||
|
||||
@@ -38,6 +38,7 @@ $settings{'DROPWIRELESSFORWARD'} = 'on';
|
||||
$settings{'SHOWCOLORS'} = 'off';
|
||||
$settings{'SHOWREMARK'} = 'on';
|
||||
$settings{'SHOWTABLES'} = 'on';
|
||||
$settings{'SHOWDROPDOWN'} = 'off';
|
||||
|
||||
my $errormessage = '';
|
||||
my $warnmessage = '';
|
||||
@@ -103,12 +104,11 @@ $checked{'SHOWREMARK'}{$settings{'SHOWREMARK'}} = "checked='checked'";
|
||||
$checked{'SHOWTABLES'}{'off'} = '';
|
||||
$checked{'SHOWTABLES'}{'on'} = '';
|
||||
$checked{'SHOWTABLES'}{$settings{'SHOWTABLES'}} = "checked='checked'";
|
||||
$checked{'FWPOLICY'}{'DROP'} = '';
|
||||
$checked{'FWPOLICY'}{'REJECT'} = '';
|
||||
$checked{'FWPOLICY'}{$settings{'FWPOLICY'}} = "checked='checked'";
|
||||
$checked{'FWPOLICY1'}{'DROP'} = '';
|
||||
$checked{'FWPOLICY1'}{'REJECT'} = '';
|
||||
$checked{'FWPOLICY1'}{$settings{'FWPOLICY1'}} = "checked='checked'";
|
||||
$checked{'SHOWDROPDOWN'}{'off'} = '';
|
||||
$checked{'SHOWDROPDOWN'}{'on'} = '';
|
||||
$checked{'SHOWDROPDOWN'}{$settings{'SHOWDROPDOWN'}} = "checked='checked'";
|
||||
$selected{'FWPOLICY'}{$settings{'FWPOLICY'}}= 'selected';
|
||||
$selected{'FWPOLICY1'}{$settings{'FWPOLICY1'}}= 'selected';
|
||||
|
||||
|
||||
&Header::openbox('100%', 'center', $Lang::tr{'options fw'});
|
||||
@@ -148,18 +148,23 @@ print <<END
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'fw settings color'}</td><td align='left'>on <input type='radio' name='SHOWCOLORS' value='on' $checked{'SHOWCOLORS'}{'on'} />/
|
||||
<input type='radio' name='SHOWCOLORS' value='off' $checked{'SHOWCOLORS'}{'off'} /> off</td></tr>
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'fw settings remark'}</td><td align='left'>on <input type='radio' name='SHOWREMARK' value='on' $checked{'SHOWREMARK'}{'on'} />/
|
||||
<input type='radio' name='SHOWREMARK' value='off' $checked{'SHOWREMARK'}{'off'} /> off</td></tr>
|
||||
<input type='radio' name='SHOWREMARK' value='off' $checked{'SHOWREMARK'}{'off'} /> off</td></tr>
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'fw settings ruletable'}</td><td align='left'>on <input type='radio' name='SHOWTABLES' value='on' $checked{'SHOWTABLES'}{'on'} />/
|
||||
<input type='radio' name='SHOWTABLES' value='off' $checked{'SHOWTABLES'}{'off'} /> off</td></tr>
|
||||
</table>
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'fw settings dropdown'}</td><td align='left'>on <input type='radio' name='SHOWDROPDOWN' value='on' $checked{'SHOWDROPDOWN'}{'on'} />/
|
||||
<input type='radio' name='SHOWDROPDOWN' value='off' $checked{'SHOWDROPDOWN'}{'off'} /> off</td></tr>
|
||||
</table>
|
||||
<br />
|
||||
<table width='95%' cellspacing='0'>
|
||||
<tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'fw default drop'}</b></td></tr>
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'drop action'}</td><td align='left'>DROP <input type='radio' name='FWPOLICY' value='DROP' $checked{'FWPOLICY'}{'DROP'} />/
|
||||
<input type='radio' name='FWPOLICY' value='REJECT' $checked{'FWPOLICY'}{'REJECT'} /> REJECT</td></tr>
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'drop action1'}</td><td align='left'>DROP <input type='radio' name='FWPOLICY1' value='DROP' $checked{'FWPOLICY1'}{'DROP'} />/
|
||||
<input type='radio' name='FWPOLICY1' value='REJECT' $checked{'FWPOLICY1'}{'REJECT'} /> REJECT</td></tr>
|
||||
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'drop action'}</td><td><select name='FWPOLICY'>
|
||||
<option value='DROP' $selected{'FWPOLICY'}{'DROP'}>DROP</option>
|
||||
<option value='REJECT' $selected{'FWPOLICY'}{'REJECT'}>REJECT</option></select>
|
||||
</td></tr>
|
||||
<tr><td align='left' width='60%'>$Lang::tr{'drop action1'}</td><td><select name='FWPOLICY1'>
|
||||
<option value='DROP' $selected{'FWPOLICY1'}{'DROP'}>DROP</option>
|
||||
<option value='REJECT' $selected{'FWPOLICY1'}{'REJECT'}>REJECT</option></select>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1051,6 +1051,7 @@
|
||||
'fw settings color' => 'Farben in Regeltabelle anzeigen',
|
||||
'fw settings remark' => 'Anmerkungen in Regeltabelle anzeigen',
|
||||
'fw settings ruletable' => 'Leere Regeltabellen anzeigen',
|
||||
'fw settings dropdown' => 'Alle Netzwerke auf Regelerstellungsseite anzeigen',
|
||||
'fw logging' => 'Firewall-Logging',
|
||||
'gateway' => 'Gateway',
|
||||
'gateway ip' => 'Gateway-IP',
|
||||
|
||||
@@ -1076,6 +1076,7 @@
|
||||
'fw settings color' => 'Show colors in ruletable',
|
||||
'fw settings remark' => 'Show remarks in ruletable',
|
||||
'fw settings ruletable' => 'Show empty ruletables',
|
||||
'fw settings dropdown' => 'Show all networks on rulecreation site',
|
||||
'fw logging' => 'Firewall logging',
|
||||
'g.dtm' => 'TO BE REMOVED',
|
||||
'g.lite' => 'TO BE REMOVED',
|
||||
|
||||
@@ -123,6 +123,7 @@ $(TARGET) :
|
||||
echo "SHOWREMARK=on" >> $(CONFIG_ROOT)/optionsfw/settings
|
||||
echo "SHOWCOLORS=off" >> $(CONFIG_ROOT)/optionsfw/settings
|
||||
echo "SHOWTABLES=on" >> $(CONFIG_ROOT)/optionsfw/settings
|
||||
echo "SHOWDROPDOWN=off >> $(CONFIG_ROOT)/optionsfw/settings
|
||||
echo "POLICY=MODE2" >> $(CONFIG_ROOT)/forward/settings
|
||||
echo "POLICY1=MODE2" >> $(CONFIG_ROOT)/forward/settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user