<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>shorewall-zones</title><link rel="stylesheet" href="html.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="id257168"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>zones — Shorewall zone declaration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/etc/shorewall/zones</code> </p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id257199"></a><h2>Description</h2><p>The /etc/shorewall/zones file declares your network zones. You specify the hosts in each zone through entries in <code class="filename">/etc/shorewall/interfaces</code> or <code class="filename">/etc/shorewall/hosts</code>.</p><p>The columns in the file are as follows.</p><div class="variablelist"><dl><dt><span class="term"><span class="bold"><strong>ZONE</strong></span> - <span class="emphasis"><em>zone</em></span>[<span class="bold"><strong>:</strong></span><span class="emphasis"><em>parent-zone</em></span>[<span class="bold"><strong>,</strong></span><span class="emphasis"><em>parent-zone</em></span>]...]</span></dt><dd><p>Name of the <span class="emphasis"><em>zone</em></span>. The names "all", "none", "SOURCE" and "DEST" are reserved and may not be used as zone names. The maximum length of a zone name is determined by the setting of the LOGFORMAT option in <a class="ulink" href="shorewall.conf.html" target="_self">shorewall.conf</a>(5). With the default LOGFORMAT, zone names can be at most 5 characters long.</p><p>The order in which Shorewall matches addresses from packets to zones is determined by the order of zone declarations. Where a zone is nested in one or more other zones, you may either ensure that the nested zone precedes its parents in this file, or you may follow the (sub)zone name by ":" and a comma-separated list of the parent zones. The parent zones must have been declared in earlier records in this file. See <a class="ulink" href="shorewall-nesting.html" target="_self">shorewall-nesting</a>(5) for additional information.</p><p>Example:</p><pre class="programlisting">#ZONE TYPE OPTIONS IN OPTIONS OUT OPTIONS a ipv4 b ipv4 c:a,b ipv4</pre><p>Currently, Shorewall uses this information to reorder the zone list so that parent zones appear after their subzones in the list. The IMPLICIT_CONTINUE option in <a class="ulink" href="shorewall.conf.html" target="_self">shorewall.conf</a>(5) can also create implicit CONTINUE policies to/from the subzone.</p><p>In the future, Shorewall may make additional use of nesting information.</p></dd><dt><span class="term"><span class="bold"><strong>TYPE</strong></span></span></dt><dd><div class="variablelist"><dl><dt><span class="term"><span class="bold"><strong>ipv4</strong></span></span></dt><dd><p>This is the standard Shorewall zone type and is the default if you leave this column empty or if you enter "-" in the column. Communication with some zone hosts may be encrypted. Encrypted hosts are designated using the 'ipsec'option in <a class="ulink" href="shorewall-hosts.html" target="_self">shorewall-hosts</a>(5).</p></dd><dt><span class="term"><span class="bold"><strong>ipsec</strong></span></span></dt><dd><p>Communication with all zone hosts is encrypted. Your kernel and iptables must include policy match support.</p></dd><dt><span class="term"><span class="bold"><strong>firewall</strong></span></span></dt><dd><p>Designates the firewall itself. You must have exactly one 'firewall' zone. No options are permitted with a 'firewall' zone. The name that you enter in the ZONE column will be stored in the shell variable $FW which you may use in other configuration files to designate the firewall zone.</p></dd><dt><span class="term">bport (or bport4)</span></dt><dd><p>(Shorewall-perl only) The zone is associated with one or more ports on a single bridge.</p></dd></dl></div></dd><dt><span class="term"><span class="bold"><strong>OPTIONS, IN OPTIONS and OUT OPTIONS</strong></span> - [<span class="emphasis"><em>option</em></span>[<span class="bold"><strong>,</strong></span><span class="emphasis"><em>option</em></span>]...]</span></dt><dd><p>A comma-separated list of options. With the exception of the <code class="option">mss</code> option, these only apply to TYPE <code class="option">ipsec</code> zones.</p><div class="variablelist"><dl><dt><span class="term"><span class="bold"><strong>reqid=</strong></span><span class="emphasis"><em>number</em></span></span></dt><dd><p>where <span class="emphasis"><em>number</em></span> is specified using setkey(8) using the 'unique:<span class="emphasis"><em>number</em></span> option for the SPD level.</p></dd><dt><span class="term"><span class="bold"><strong>spi=</strong></span><number></span></dt><dd><p>where <span class="emphasis"><em>number</em></span> is the SPI of the SA used to encrypt/decrypt packets.</p></dd><dt><span class="term"><span class="bold"><strong>proto=</strong></span><span class="bold"><strong>ah</strong></span>|<span class="bold"><strong>esp</strong></span>|<span class="bold"><strong>ipcomp</strong></span></span></dt><dd><p>IPSEC Encapsulation Protocol</p></dd><dt><span class="term"><span class="bold"><strong>mss=</strong></span><span class="emphasis"><em>number</em></span></span></dt><dd><p>sets the MSS field in TCP packets. If you supply this option, you should also set FASTACCEPT=No in <a class="ulink" href="shorewall.conf.html" target="_self">shorewall.conf</a>(5) to insure that both the SYN and SYN,ACK packets have their MSS field adjusted.</p></dd><dt><span class="term"><span class="bold"><strong>mode=</strong></span><span class="bold"><strong>transport</strong></span>|<span class="bold"><strong>tunnel</strong></span></span></dt><dd><p>IPSEC mode</p></dd><dt><span class="term"><span class="bold"><strong>tunnel-src=</strong></span><span class="emphasis"><em>address</em></span>[/<span class="emphasis"><em>mask</em></span>]</span></dt><dd><p>only available with mode=tunnel</p></dd><dt><span class="term"><span class="bold"><strong>tunnel-dst=</strong></span><span class="emphasis"><em>address</em></span>[/<span class="emphasis"><em>mask</em></span>]</span></dt><dd><p>only available with mode=tunnel</p></dd><dt><span class="term"><span class="bold"><strong>strict</strong></span></span></dt><dd><p>Means that packets must match all rules.</p></dd><dt><span class="term"><span class="bold"><strong>next</strong></span></span></dt><dd><p>Separates rules; can only be used with strict</p></dd></dl></div><p>The options in the OPTIONS column are applied to both incoming and outgoing traffic. The IN OPTIONS are applied to incoming traffic (in addition to OPTIONS) and the OUT OPTIONS are applied to outgoing traffic.</p><p>If you wish to leave a column empty but need to make an entry in a following column, use "-".</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id257832"></a><h2>FILES</h2><p>/etc/shorewall/zones</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id257842"></a><h2>See ALSO</h2><p><a class="ulink" href="http://www.shorewall.net/Multiple_Zones.html" target="_self">http://www.shorewall.net/Multiple_Zones.html</a>.</p><p>shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall-interfaces(5), shorewall-ipsec(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-nesting(5), shorewall-netmap(5), shorewall-params(5), shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-route_routes(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5)</p></div></div></body></html>