From: <abe...@us...> - 2016-09-14 21:11:47
|
Revision: 7833 http://sourceforge.net/p/astlinux/code/7833 Author: abelbeck Date: 2016-09-14 21:11:45 +0000 (Wed, 14 Sep 2016) Log Message: ----------- web interface, Firewall sub-tab, add BLOCK_NETSET_DIR=/mnt/kd/blocklists support Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/firewall.php Modified: branches/1.0/package/webinterface/altweb/admin/firewall.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/firewall.php 2016-09-14 18:15:56 UTC (rev 7832) +++ branches/1.0/package/webinterface/altweb/admin/firewall.php 2016-09-14 21:11:45 UTC (rev 7833) @@ -22,6 +22,7 @@ // 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 +// 09-14-2016, Added BLOCK_NETSET_DIR support // // System location of /mnt/kd/rc.conf.d directory $FIREWALLCONFDIR = '/mnt/kd/rc.conf.d'; @@ -379,6 +380,10 @@ $value = 'BLOCK_HOSTS_FILE="/mnt/kd/blocked-hosts"'; fwrite($fp, $value."\n"); } + if (isset($_POST['block_netset_dir'])) { + $value = 'BLOCK_NETSET_DIR="/mnt/kd/blocklists"'; + fwrite($fp, $value."\n"); + } $value = 'BLOCKED_HOST_LOG='.(isset($_POST['log_blocked']) ? '1' : '0'); fwrite($fp, $value."\n"); @@ -1112,6 +1117,9 @@ putHtml('<tr class="dtrow1"><td width="75" style="text-align: right;">'); $sel = (getVARdef($vars, 'BLOCK_HOSTS_FILE') === '/mnt/kd/blocked-hosts') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="file_blocked" name="file_blocked"'.$sel.' /></td><td>Block Host/CIDR using the file /mnt/kd/blocked-hosts</td></tr>'); + putHtml('<tr class="dtrow1"><td width="75" style="text-align: right;">'); + $sel = (getVARdef($vars, 'BLOCK_NETSET_DIR') === '/mnt/kd/blocklists') ? ' checked="checked"' : ''; + putHtml('<input type="checkbox" value="block_netset_dir" name="block_netset_dir"'.$sel.' /></td><td>Block Host/CIDR using *.netset file(s) in the directory /mnt/kd/blocklists</td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: right;">'); $sel = (getVARdef($vars, 'BLOCKED_HOST_LOG') == 1) ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="log_blocked" name="log_blocked"'.$sel.' /></td><td>Log Denied attempts by a blocked host</td></tr>'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |