No embedded white-space is allowed.
Exclusion can appear after a list of addresses and/or address ranges. In that case, the final list of address is formed by taking the first list and then removing the addresses defined in the exclusion.
Beginning in Shorewall 4.4.13, the second form of exclusion is allowed after all and any in the SOURCE and DEST columns of m[blue]shorewall-rulesm[][1](5). It allows you to omit arbitrary zones from the list generated by those key words.
If you omit a sub-zone and there is an explicit or explicit CONTINUE policy, a connection to/from that zone can still be matched by the rule generated for a parent zone.
For example:
/etc/shorewall/zones:
#ZONE TYPE z1 ip z2:z1 ip ...
/etc/shorewall/policy:
#SOURCE DEST POLICY z1 net CONTINUE z2 net REJECT
/etc/shorewall/rules:
#ACTION SOURCE DEST PROTO DPORT ACCEPT all!z2 net tcp 22
In this case, SSH connections from z2 to net will be accepted by the generated z1 to net ACCEPT rule.
In most contexts, ipset names can be used as an address-or-range. Beginning with Shorewall 4.4.14, ipset lists enclosed in +[...] may also be included (see m[blue]shorewall-ipsetsm[][2] (5)). The semantics of these lists when used in an exclusion are as follows:
IPv4 Example 1 - All IPv4 addresses except 192.168.3.4
IPv4 Example 2 - All IPv4 addresses except the network 192.168.1.0/24 and the host 10.2.3.4
IPv4 Example 3 - All IPv4 addresses except the range 192.168.1.3-192.168.1.12 and the network 10.0.0.0/8
IPv4 Example 4 - The network 192.168.1.0/24 except hosts 192.168.1.3 and 192.168.1.9
Example 5 - All parent zones except loc
/etc/shorewall/hosts
/etc/shorewall/masq
/etc/shorewall/rules
shorewall(8)