<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
	<copyright>
		<![CDATA[
		/*
		    unbound_acls.xml
		    part of the Unbound package for pfSense (http://www.pfSense.com)
		    Copyright (C) 2011 Warren Baker (warren@decoy.co.za)
		    All rights reserved.
		                                                       						  */
		/* ========================================================================== */
		/*
		    Redistribution and use in source and binary forms, with or without
		    modification, are permitted provided that the following conditions are met:

		     1. Redistributions of source code must retain the above copyright notice,
		        this list of conditions and the following disclaimer.

		     2. Redistributions in binary form must reproduce the above copyright
		        notice, this list of conditions and the following disclaimer in the
		        documentation and/or other materials provided with the distribution.

		    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
		    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
		    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
		    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
		    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
		    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
		    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
		    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
		    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
		    POSSIBILITY OF SUCH DAMAGE.
		                                                                              */
		/* ========================================================================== */
		        ]]>
	</copyright>
	<description>Unbound is a validating, recursive, and caching DNS resolver.</description>
	<requirements/>
	<faq/>
	<name>unboundacls</name>
	<version>1.4.8</version>
	<title>Services: Unbound DNS Forwarder: Access Lists</title>
	<include_file>/usr/local/pkg/unbound.inc</include_file>
	<menu>
		<name>Unbound DNS</name>
		<tooltiptext>Setup Unbound specific settings</tooltiptext>
		<section>Services</section>
		<url>/pkg_edit.php?xml=unbound.xml&amp;id=0</url>
	</menu>
	<tabs>
		<tab>
			<text>Unbound DNS Settings</text>
			<url>/pkg_edit.php?xml=unbound.xml&amp;id=0</url>
		</tab>
		<tab>
			<text>Unbound DNS Advanced Settings</text>
			<url>/pkg_edit.php?xml=unbound_advanced.xml&amp;id=0</url>
		</tab>
		<tab>
			<text>Unbound DNS ACLs</text>
			<url>/pkg.php?xml=unbound_acls.xml</url>
			<active/>
			<no_drop_down/>
		</tab>
		<tab>
			<text>Unbound DNS Status</text>
			<url>/unbound_status.php</url>
		</tab>
	</tabs>
	<adddeleteeditpagefields>
		<columnitem>
			<fielddescr>ACL Name</fielddescr>
			<fieldname>aclname</fieldname>
		</columnitem>
		<columnitem>
			<fielddescr>Action</fielddescr>
			<fieldname>acl_action</fieldname>
		</columnitem>
		<columnitem>
			<fielddescr>Description</fielddescr>
			<fieldname>description</fieldname>
		</columnitem>
	</adddeleteeditpagefields>
	<fields>
		<field>
			<name>Edit Unbound ACL</name>
			<type>listtopic</type>
		</field>
		<field>
			<fieldname>aclname</fieldname>
			<fielddescr>ACL name</fielddescr>
			<description>Provide an ACL name.</description>
			<type>input</type>
			<required/>
		</field>
		<field>
			<fieldname>aclaction</fieldname>
			<fielddescr>Action</fielddescr>
			<description>&lt;br/&gt;Choose an action:&lt;br/&gt;&lt;br/&gt;
						&lt;b&gt;Allow:&lt;/b&gt; This action allows queries from hosts within the netblock(s) defined below.&lt;br/&gt;
						&lt;b&gt;Allow Snoop:&lt;/b&gt; This action allows recursive and nonrecursive access from hosts within the netblock(s) defined below. Used for cache snooping and ideally should only be configured for your administrative host.&lt;br/&gt;
						&lt;b&gt;Deny:&lt;/b&gt; This action stops queries from hosts within the netblock(s) defined below.&lt;br/&gt;
						&lt;b&gt;Refuse:&lt;/b&gt; This action also stops queries from hosts within the netblock(s) defined below, but sends a DNS rcode REFUSED error message back to the client.</description>
			<type>select</type>
			<options>
				<option><name>Allow</name><value>allow</value></option>
				<option><name>Allow Snoop</name><value>allow_snoop</value></option>
				<option><name>Refuse</name><value>refuse</value></option>
				<option><name>Deny</name><value>deny</value></option>
			</options>
			<required/>
		</field>
        <field>
			<type>rowhelper</type>
			<fielddescr>Network(s)</fielddescr>
			<required/>
			<rowhelper>
				<rowhelperfield>
					<fielddescr>Network</fielddescr>
					<fieldname>acl_network</fieldname>
					<description></description>
					<type>input</type>
					<size>20</size>
				</rowhelperfield>
				<rowhelperfield>
					<fielddescr>CIDR</fielddescr>
					<fieldname>mask</fieldname>
					<description>/</description>
					<type>select</type>
					<options>
						<option><name>32</name><value>32</value></option>
						<option><name>31</name><value>31</value></option>
						<option><name>30</name><value>30</value></option>
						<option><name>29</name><value>29</value></option>
						<option><name>28</name><value>28</value></option>
						<option><name>27</name><value>27</value></option>
						<option><name>26</name><value>26</value></option>
						<option><name>25</name><value>25</value></option>
						<option><name>24</name><value>24</value></option>
						<option><name>23</name><value>23</value></option>
						<option><name>22</name><value>22</value></option>
						<option><name>21</name><value>21</value></option>
						<option><name>20</name><value>20</value></option>
						<option><name>19</name><value>19</value></option>
						<option><name>18</name><value>18</value></option>
						<option><name>17</name><value>17</value></option>
						<option><name>16</name><value>16</value></option>
						<option><name>15</name><value>15</value></option>
						<option><name>14</name><value>14</value></option>
						<option><name>13</name><value>13</value></option>
						<option><name>12</name><value>12</value></option>
						<option><name>11</name><value>11</value></option>
						<option><name>10</name><value>10</value></option>
						<option><name>9</name><value>9</value></option>
						<option><name>8</name><value>8</value></option>
						<option><name>7</name><value>7</value></option>
						<option><name>6</name><value>6</value></option>
						<option><name>5</name><value>5</value></option>
						<option><name>4</name><value>4</value></option>
						<option><name>3</name><value>3</value></option>
						<option><name>2</name><value>2</value></option>
						<option><name>1</name><value>1</value></option>
						<option><name>0</name><value>0</value></option>
					</options>
				</rowhelperfield>
			</rowhelper>
		</field>
		<field>
			<fielddescr>Description</fielddescr>
			<fieldname>description</fieldname>
			<description>Enter a description for your reference.</description>
			<type>input</type>
			<size>25</size>
		</field>
	</fields>
	<custom_add_php_command>
	</custom_add_php_command>
	<custom_php_command_before_form/>
	<custom_php_validation_command>
		unbound_validate($_POST, true);
	</custom_php_validation_command>
	<custom_php_resync_config_command>
		unbound_reconfigure();
	</custom_php_resync_config_command>
</packagegui>