| SHOREWALL-NESTING(5) | [FIXME: manual] | SHOREWALL-NESTING(5) |
NAME¶
nesting - Shorewall Nested ZonesSYNOPSIS¶
child-zone[:parent-zone[,parent-zone]...]
DESCRIPTION¶
In shorewall-zones[1](5), a zone may be declared to be a sub-zone of one or more other zones using the above syntax. The child-zone 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. Where zones are nested, the CONTINUE policy in shorewall-policy[2](5) allows hosts that are within multiple zones to be managed under the rules of all of these zones.EXAMPLE¶
/etc/shorewall/zones: #ZONE TYPE OPTION
fw firewall
net ipv4
sam:net ipv4
loc ipv4
#ZONE INTERFACE BROADCAST OPTIONS
- eth0 detect dhcp,norfc1918
loc eth1 detect
#ZONE HOST(S) OPTIONS
net eth0:0.0.0.0/0
sam eth0:206.191.149.197
#SOURCE DEST POLICY LOG LEVEL
loc net ACCEPT
sam all CONTINUE
net all DROP info
all all REJECT info
#ACTION SOURCE DEST PROTO DEST PORT(S)
...
DNAT sam loc:192.168.1.3 tcp ssh
DNAT net loc:192.168.1.5 tcp www
...
#ACTION SOURCE DEST PROTO DEST PORT(S)
...
ACCEPT+ sam $FW tcp ssh
DNAT net loc:192.168.1.3 tcp ssh
...
#ZONE INTERFACE BROADCAST OPTIONS
net ppp0
loc eth1
loc ppp+
dmz eth2
•DNAT and REDIRECT rules generate two
Netfilter rules: a 'nat' table rule that rewrites the destination IP address
and/or port number, and a 'filter' table rule that ACCEPTs the rewritten
connection.
•Policies only affect the 'filter'
table.
As a consequence, the following rules will have unexpected behavior:
#ACTION SOURCE DEST PROTO DEST
# PORT(S)
ACCEPT net dmz tcp 80
REDIRECT loc 3128 tcp 80
#ZONE TYPE OPTION
fw firewall
loc ipv4
net:loc ipv4
dmz ipv4
#ACTION SOURCE DEST PROTO DEST
# PORT(S)
ACCEPT net dmz tcp 80
REDIRECT loc:192.168.2.0/23 3128 tcp 80
#ZONE INTERFACE BROADCAST OPTIONS
net ppp0
loc eth1
- ppp+
dmz eth2
#ZONE HOST(S) OPTIONS
loc ppp+:192.168.2.0/23
FILES¶
/etc/shorewall/zones /etc/shorewall/interfaces /etc/shorewall/hosts /etc/shorewall/policy /etc/shorewall/rulesSEE ALSO¶
shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5), shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-netmap(5), shorewall-params(5), shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5), shorewall-zones(5)NOTES¶
- 1.
- shorewall-zones
- 2.
- shorewall-policy
- 3.
- shorewall.conf
| 06/28/2012 | [FIXME: source] |