2008-12-11 01:03:00 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2008-12-11 20:24:34 +01:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
|
2008-12-11 01:03:00 +01:00
|
|
|
<refentry>
|
|
|
|
<refmeta>
|
2008-12-11 20:24:34 +01:00
|
|
|
<refentrytitle>shorewall6-nesting</refentrytitle>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
|
|
|
<manvolnum>5</manvolnum>
|
2014-01-16 17:32:57 +01:00
|
|
|
|
|
|
|
<refmiscinfo>Configuration Files</refmiscinfo>
|
2008-12-11 01:03:00 +01:00
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>nesting</refname>
|
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<refpurpose>shorewall6 Nested Zones</refpurpose>
|
2008-12-11 01:03:00 +01:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<arg choice="plain"
|
|
|
|
rep="norepeat"><replaceable>child-zone</replaceable>[:<replaceable>parent-zone</replaceable>[,<replaceable>parent-zone</replaceable>]...]</arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
2014-01-16 17:32:57 +01:00
|
|
|
<para>In <ulink
|
|
|
|
url="/manpages6/shorewall6-zones.html">shorewall6-zones</ulink>(5), a zone
|
|
|
|
may be declared to be a sub-zone of one or more other zones using the
|
2010-08-13 00:26:30 +02:00
|
|
|
above syntax. The <replaceable>child-zone</replaceable> may be neither the
|
|
|
|
firewall zone nor a vserver zone. The firewall zone may not appear as a
|
|
|
|
parent zone, although all vserver zones are handled as sub-zones of the
|
|
|
|
firewall zone.</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
|
|
|
<para>Where zones are nested, the CONTINUE policy in <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages6/shorewall6-policy.html">shorewall6-policy</ulink>(5)
|
|
|
|
allows hosts that are within multiple zones to be managed under the rules
|
|
|
|
of all of these zones.</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Example</title>
|
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para><filename>/etc/shorewall6/zones</filename>:</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
|
|
|
<programlisting> #ZONE TYPE OPTION
|
|
|
|
fw firewall
|
2008-12-11 20:24:34 +01:00
|
|
|
net ipv6
|
|
|
|
sam:net ipv6
|
|
|
|
loc ipv6</programlisting>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para><filename>/etc/shorewall6/interfaces</filename>:</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
|
|
|
<programlisting> #ZONE INTERFACE BROADCAST OPTIONS
|
2008-12-11 20:24:34 +01:00
|
|
|
- eth0 detect blacklist
|
2008-12-11 01:03:00 +01:00
|
|
|
loc eth1 detect</programlisting>
|
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para><filename>/etc/shorewall6/hosts</filename>:</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
|
|
|
<programlisting> #ZONE HOST(S) OPTIONS
|
2008-12-11 20:24:34 +01:00
|
|
|
net eth0:[::\]
|
|
|
|
sam eth0:[2001:19f0:feee::dead:beef:cafe]</programlisting>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para><filename>/etc/shorewall6/policy</filename>:</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
|
|
|
<programlisting> #SOURCE DEST POLICY LOG LEVEL
|
|
|
|
loc net ACCEPT
|
|
|
|
sam all CONTINUE
|
|
|
|
net all DROP info
|
|
|
|
all all REJECT info</programlisting>
|
|
|
|
|
|
|
|
<para>The second entry above says that when Sam is the client, connection
|
|
|
|
requests should first be processed under rules where the source zone is
|
|
|
|
sam and if there is no match then the connection request should be treated
|
|
|
|
under rules where the source zone is net. It is important that this policy
|
|
|
|
be listed BEFORE the next policy (net to all). You can have this policy
|
|
|
|
generated for you automatically by using the IMPLICIT_CONTINUE option in
|
2014-01-16 17:32:57 +01:00
|
|
|
<ulink
|
|
|
|
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5).</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>Partial <filename>/etc/shorewall6/rules</filename>:</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2015-12-04 23:53:26 +01:00
|
|
|
<programlisting> #ACTION SOURCE DEST PROTO DPORT
|
2008-12-11 01:03:00 +01:00
|
|
|
...
|
2008-12-11 20:24:34 +01:00
|
|
|
ACCEPT sam loc:2001:19f0:feee::3 tcp ssh
|
|
|
|
ACCEPT net loc:2001:19f0:feee::5 tcp www
|
2008-12-11 01:03:00 +01:00
|
|
|
...</programlisting>
|
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>Given these two rules, Sam can connect with ssh to
|
|
|
|
2001:19f0:feee::3. Like all hosts in the net zone, Sam can connect to TCP
|
|
|
|
port 80 on 2001:19f0:feee::5. The order of the rules is not
|
|
|
|
significant.</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>FILES</title>
|
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>/etc/shorewall6/zones</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>/etc/shorewall6/interfaces</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>/etc/shorewall6/hosts</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>/etc/shorewall6/policy</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>/etc/shorewall6/rules</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See ALSO</title>
|
|
|
|
|
2008-12-11 20:24:34 +01:00
|
|
|
<para>shorewall6(8), shorewall6-accounting(5), shorewall6-actions(5),
|
|
|
|
shorewall6-blacklist(5), shorewall6-hosts(5), shorewall6-interfaces(5),
|
2014-01-16 17:32:57 +01:00
|
|
|
shorewall6-maclist(5), shorewall6-netmap(5),shorewall6-params(5),
|
|
|
|
shorewall6-policy(5), shorewall6-providers(5), shorewall6-rtrules(5),
|
|
|
|
shorewall6-routestopped(5), shorewall6-rules(5), shorewall6.conf(5),
|
|
|
|
shorewall6-secmarks(5), shorewall6-tcclasses(5), shorewall6-tcdevices(5),
|
|
|
|
shorewall6-mangle(5), shorewall6-tos(5), shorewall6-tunnels(5),
|
|
|
|
shorewall6-zones(5)</para>
|
2008-12-11 01:03:00 +01:00
|
|
|
</refsect1>
|
2008-12-11 20:24:34 +01:00
|
|
|
</refentry>
|