'\" t .\" Title: shorewall6-nesting .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 03/16/2017 .\" Manual: Configuration Files .\" Source: Configuration Files .\" Language: English .\" .TH "SHOREWALL6\-NESTING" "5" "03/16/2017" "Configuration Files" "Configuration Files" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" nesting \- shorewall6 Nested Zones .SH "SYNOPSIS" .HP \w'\ 'u \fIchild\-zone\fR[:\fIparent\-zone\fR[,\fIparent\-zone\fR]\&.\&.\&.] .SH "DESCRIPTION" .PP In \m[blue]\fBshorewall6\-zones\fR\m[]\&\s-2\u[1]\d\s+2(5), a zone may be declared to be a sub\-zone of one or more other zones using the above syntax\&. The \fIchild\-zone\fR 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\&. .PP Where zones are nested, the CONTINUE policy in \m[blue]\fBshorewall6\-policy\fR\m[]\&\s-2\u[2]\d\s+2(5) allows hosts that are within multiple zones to be managed under the rules of all of these zones\&. .SH "EXAMPLE" .PP /etc/shorewall6/zones: .sp .if n \{\ .RS 4 .\} .nf #ZONE TYPE OPTION fw firewall net ipv6 sam:net ipv6 loc ipv6 .fi .if n \{\ .RE .\} .PP /etc/shorewall6/interfaces: .sp .if n \{\ .RS 4 .\} .nf #ZONE INTERFACE BROADCAST OPTIONS \- eth0 detect blacklist loc eth1 detect .fi .if n \{\ .RE .\} .PP /etc/shorewall6/hosts: .sp .if n \{\ .RS 4 .\} .nf #ZONE HOST(S) OPTIONS net eth0:[::\e] sam eth0:[2001:19f0:feee::dead:beef:cafe] .fi .if n \{\ .RE .\} .PP /etc/shorewall6/policy: .sp .if n \{\ .RS 4 .\} .nf #SOURCE DEST POLICY LOG LEVEL loc net ACCEPT sam all CONTINUE net all DROP info all all REJECT info .fi .if n \{\ .RE .\} .PP 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 \m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)\&. .PP Partial /etc/shorewall6/rules: .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DPORT \&.\&.\&. ACCEPT sam loc:2001:19f0:feee::3 tcp ssh ACCEPT net loc:2001:19f0:feee::5 tcp www \&.\&.\&. .fi .if n \{\ .RE .\} .PP 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\&. .SH "FILES" .PP /etc/shorewall6/zones .PP /etc/shorewall6/interfaces .PP /etc/shorewall6/hosts .PP /etc/shorewall6/policy .PP /etc/shorewall6/rules .SH "SEE ALSO" .PP shorewall6(8), shorewall6\-accounting(5), shorewall6\-actions(5), shorewall6\-blacklist(5), shorewall6\-hosts(5), shorewall6\-interfaces(5), 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) .SH "NOTES" .IP " 1." 4 shorewall6-zones .RS 4 \%http://www.shorewall.net/manpages6/shorewall6-zones.html .RE .IP " 2." 4 shorewall6-policy .RS 4 \%http://www.shorewall.net/manpages6/shorewall6-policy.html .RE .IP " 3." 4 shorewall6.conf .RS 4 \%http://www.shorewall.net/manpages6/shorewall6.conf.html .RE