From: <abe...@us...> - 2016-07-10 19:33:46
|
Revision: 7748 http://sourceforge.net/p/astlinux/code/7748 Author: abelbeck Date: 2016-07-10 19:33:43 +0000 (Sun, 10 Jul 2016) Log Message: ----------- web interface, Firewall sub-tab, add 'Deny LAN to DMZ' option for specified LAN Interfaces Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/firewall.php branches/1.0/package/webinterface/altweb/common/version.php Modified: branches/1.0/package/webinterface/altweb/admin/firewall.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/firewall.php 2016-07-10 15:10:17 UTC (rev 7747) +++ branches/1.0/package/webinterface/altweb/admin/firewall.php 2016-07-10 19:33:43 UTC (rev 7748) @@ -21,6 +21,7 @@ // 01-27-2014, Added "Log Denied DMZ interface packets" // 06-08-2014, Added support for multiple "Allow OpenVPN" LAN interfaces // 06-12-2016, Added "Pass LAN->LAN" action +// 07-10-2016, Added Deny LAN to DMZ for specified LAN Interfaces // // System location of /mnt/kd/rc.conf.d directory $FIREWALLCONFDIR = '/mnt/kd/rc.conf.d'; @@ -85,23 +86,23 @@ '41' => '6to4' ); -$allowlans_label = array ( +$lan_permutations_label = array ( + 'INTIF' => '1st', + 'INT2IF' => '2nd', + 'INT3IF' => '3rd', 'INTIF INT2IF' => '1st and 2nd', 'INTIF INT3IF' => '1st and 3rd', 'INT2IF INT3IF' => '2nd and 3rd', - 'INTIF INT2IF~INTIF INT3IF' => '1st and 2nd, 1st and 3rd', - 'INTIF INT2IF~INT2IF INT3IF' => '1st and 2nd, 2nd and 3rd', - 'INTIF INT3IF~INT2IF INT3IF' => '1st and 3rd, 2nd and 3rd', 'INTIF INT2IF INT3IF' => '1st and 2nd and 3rd' ); -$vpn_allowlan_label = array ( - 'INTIF' => '1st', - 'INT2IF' => '2nd', - 'INT3IF' => '3rd', +$allowlans_label = array ( 'INTIF INT2IF' => '1st and 2nd', 'INTIF INT3IF' => '1st and 3rd', 'INT2IF INT3IF' => '2nd and 3rd', + 'INTIF INT2IF~INTIF INT3IF' => '1st and 2nd, 1st and 3rd', + 'INTIF INT2IF~INT2IF INT3IF' => '1st and 2nd, 2nd and 3rd', + 'INTIF INT3IF~INT2IF INT3IF' => '1st and 3rd, 2nd and 3rd', 'INTIF INT2IF INT3IF' => '1st and 2nd and 3rd' ); @@ -294,6 +295,8 @@ fwrite($fp, $value."\n"); $value = 'DMZ_INET_DEFAULT_POLICY_DROP="'.$_POST['dmz_DP'].'"'; fwrite($fp, $value."\n"); + $value = 'DMZ_DENYLAN="'.(isset($_POST['is_dmz_denylan']) ? $_POST['dmz_denylan'] : '').'"'; + fwrite($fp, $value."\n"); $value = 'ALLOWLANS="'.(isset($_POST['is_allowlans']) ? $_POST['allowlans'] : '').'"'; fwrite($fp, $value."\n"); $value = 'OVPNC_ALLOWLAN="'.(isset($_POST['is_ovpnc_allowlan']) ? $_POST['ovpnc_allowlan'] : '').'"'; @@ -995,6 +998,18 @@ putHtml('</td></tr>'); putHtml('<tr class="dtrow1"><td width="75" style="text-align: right;">'); + $dmz_denylan = getVARdef($vars, 'DMZ_DENYLAN'); + $sel = ($dmz_denylan !== '') ? ' checked="checked"' : ''; + putHtml('<input type="checkbox" value="is_dmz_denylan" name="is_dmz_denylan"'.$sel.' /></td><td>Deny LAN to DMZ for the'); + putHtml('<select name="dmz_denylan">'); + foreach ($lan_permutations_label as $key => $value) { + $sel = ($dmz_denylan === $key) ? ' selected="selected"' : ''; + putHtml('<option value="'.$key.'"'.$sel.'>'.$value.'</option>'); + } + putHtml('</select>'); + putHtml('LAN Interface(s)</td></tr>'); + + putHtml('<tr class="dtrow1"><td width="75" style="text-align: right;">'); $allowlans = getVARdef($vars, 'ALLOWLANS'); $sel = ($allowlans !== '') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="is_allowlans" name="is_allowlans"'.$sel.' /></td><td>Allow LAN to LAN for the'); @@ -1011,7 +1026,7 @@ $sel = ($ovpn_allowlan !== '') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="is_ovpnc_allowlan" name="is_ovpnc_allowlan"'.$sel.' /></td><td>Allow OpenVPN Client tunnel to the'); putHtml('<select name="ovpnc_allowlan">'); - foreach ($vpn_allowlan_label as $key => $value) { + foreach ($lan_permutations_label as $key => $value) { $sel = ($ovpn_allowlan === $key) ? ' selected="selected"' : ''; putHtml('<option value="'.$key.'"'.$sel.'>'.$value.'</option>'); } @@ -1023,7 +1038,7 @@ $sel = ($ovpn_allowlan !== '') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="is_ovpn_allowlan" name="is_ovpn_allowlan"'.$sel.' /></td><td>Allow OpenVPN Server tunnel to the'); putHtml('<select name="ovpn_allowlan">'); - foreach ($vpn_allowlan_label as $key => $value) { + foreach ($lan_permutations_label as $key => $value) { $sel = ($ovpn_allowlan === $key) ? ' selected="selected"' : ''; putHtml('<option value="'.$key.'"'.$sel.'>'.$value.'</option>'); } Modified: branches/1.0/package/webinterface/altweb/common/version.php =================================================================== --- branches/1.0/package/webinterface/altweb/common/version.php 2016-07-10 15:10:17 UTC (rev 7747) +++ branches/1.0/package/webinterface/altweb/common/version.php 2016-07-10 19:33:43 UTC (rev 7748) @@ -1,6 +1,6 @@ <?php // version.php for AstLinux Alternate Web Interface -$GUI_VERSION = '1.8.37'; +$GUI_VERSION = '1.8.38'; ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |