1SHOREWALL-POLICY(5)             [FIXME: manual]            SHOREWALL-POLICY(5)
2
3
4

NAME

6       policy - Shorewall policy file
7

SYNOPSIS

9       /etc/shorewall/policy
10

DESCRIPTION

12       This file defines the high-level policy for connections between zones
13       defined in shorewall-zones[1](5).
14
15           Important
16           The order of entries in this file is important
17
18           This file determines what to do with a new connection request if we
19           don't get a match from the /etc/shorewall/rules file . For each
20           source/destination pair, the file is processed in order until a
21           match is found ("all" will match any client or server).
22
23           Important
24           Intra-zone policies are pre-defined
25
26           For $FW and for all of the zones defined in /etc/shorewall/zones,
27           the POLICY for connections from the zone to itself is ACCEPT (with
28           no logging or TCP connection rate limiting) but may be overridden
29           by an entry in this file. The overriding entry must be explicit
30           (cannot use "all" in the SOURCE or DEST).
31
32           Similarly, if you have IMPLICIT_CONTINUE=Yes in shorewall.conf,
33           then the implicit policy to/from any sub-zone is CONTINUE. These
34           implicit CONTINUE policies may also be overridden by an explicit
35           entry in this file.
36
37       The columns in the file are as follows.
38
39       SOURCE - zone|$FW|all
40           Source zone. Must be the name of a zone defined in
41           shorewall-zones[1](5), $FW or "all".
42
43       DEST - zone|$FW|all
44           Destination zone. Must be the name of a zone defined in
45           shorewall-zones[1](5), $FW or "all". If the DEST is a bport zone,
46           then the SOURCE must be "all", another bport zone associated with
47           the same bridge, or it must be an ipv4 zone that is associated with
48           only the same bridge.
49
50       POLICY -
51       {ACCEPT|DROP|REJECT|CONTINUE|QUEUE|NFQUEUE[(queuenumber)]|NONE}[:{default-action-or-macro|None}]
52           Policy if no match from the rules file is found.
53
54           If the policy is neither CONTINUE nor NONE then the policy may be
55           followed by ":" and one of the following:
56
57            1. The word "None" or "none". This causes any default action
58               defined in shorewall.conf[2](5) to be omitted for this policy.
59
60            2. The name of an action (requires that USE_ACTIONS=Yes in
61               shorewall.conf[2](5)). That action will be invoked before the
62               policy is enforced.
63
64            3. The name of a macro. The rules in that macro will be applied
65               before the policy is enforced. This does not require
66               USE_ACTIONS=Yes.
67
68
69           Possible policies are:
70
71           ACCEPT
72               Accept the connection.
73
74           DROP
75               Ignore the connection request.
76
77           REJECT
78               For TCP, send RST. For all other, send an "unreachable" ICMP.
79
80           QUEUE
81               Queue the request for a user-space application such as
82               Snort-inline.
83
84           NFQUEUE
85               Queue the request for a user-space application using the
86               nfnetlink_queue mechanism. If a queuenumber is not given, queue
87               zero (0) is assumed.
88
89           CONTINUE
90               Pass the connection request past any other rules that it might
91               also match (where the source or destination zone in those rules
92               is a superset of the SOURCE or DEST in this policy). See
93               shorewall-nesting[3](5) for additional information.
94
95           NONE
96               Assume that there will never be any packets from this SOURCE to
97               this DEST. Shorewall will not create any infrastructure to
98               handle such packets and you may not have any rules with this
99               SOURCE and DEST in the /etc/shorewall/rules file. If such a
100               packet is received, the result is undefined. NONE may not be
101               used if the SOURCE or DEST columns contain the firewall zone
102               ($FW) or "all".
103
104       LOG LEVEL (Optional) - [log-level|ULOG|NFLOG]
105           If supplied, each connection handled under the default POLICY is
106           logged at that level. If not supplied, no log message is generated.
107           See syslog.conf(5) for a description of log levels.
108
109           You may also specify ULOG or NFLOG (must be in upper case). This
110           will log to the ULOG or NFLOG target and will send to a separate
111           log through use of ulogd
112           (http://www.netfilter.org/projects/ulogd/index.html).
113
114           If you don't want to log but need to specify the following column,
115           place "-" here.
116
117       BURST:LIMIT - [{s|d}:[[name]:]]]rate/{second|minute}[:burst]
118           If passed, specifies the maximum TCP connection rate and the size
119           of an acceptable burst. If not specified, TCP connections are not
120           limited. If the burst parameter is omitted, a value of 5 is
121           assumed.
122
123           When s: or d: is specified, the rate applies per source IP address
124           or per destination IP address respectively. The name may be chosen
125           by the user and specifies a hash table to be used to count matching
126           connections. If not give, the name shorewall is assumed. Where more
127           than one POLICY specifies the same name, the connections counts for
128           the policies are aggregated and the individual rates apply to the
129           aggregated count.
130
131       CONNLIMIT - limit[:mask]
132           May be used to limit the number of simultaneous connections from
133           each individual host to limit connections. While the limit is only
134           checked on connections to which this policy could apply, the number
135           of current connections is calculated over all current connections
136           from the SOURCE host. By default, the limit is applied to each host
137           individually but can be made to apply to networks of hosts by
138           specifying a mask. The mask specifies the width of a VLSM mask to
139           be applied to the source address; the number of current connections
140           is then taken over all hosts in the subnet source-address/mask.
141

EXAMPLE

143        1. All connections from the local network to the internet are allowed
144
145        2. All connections from the internet are ignored but logged at syslog
146           level KERNEL.INFO.
147
148        3. All other connection requests are rejected and logged at level
149           KERNEL.INFO.
150
151                   #SOURCE         DEST            POLICY          LOG           BURST:LIMIT
152                   #                                               LEVEL
153                   loc             net             ACCEPT
154                   net             all             DROP            info
155                   #
156                   # THE FOLLOWING POLICY MUST BE LAST
157                   #
158                   all             all             REJECT          info
159

FILES

161       /etc/shorewall/policy
162

SEE ALSO

164       shorewall(8), shorewall-accounting(5), shorewall-actions(5),
165       shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5),
166       shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5),
167       shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
168       shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5),
169       shorewall-route_rules(5), shorewall-routestopped(5),
170       shorewall-rules(5), shorewall.conf(5), shorewall-secmarks(5),
171       shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5),
172       shorewall-tos(5), shorewall-tunnels(5), shorewall-zones(5)
173

NOTES

175        1. shorewall-zones
176           http://www.shorewall.net/manpages/shorewall-zones.html
177
178        2. shorewall.conf
179           http://www.shorewall.net/manpages/shorewall.conf.html
180
181        3. shorewall-nesting
182           http://www.shorewall.net/manpages/shorewall-nesting.html
183
184
185
186[FIXME: source]                   09/16/2011               SHOREWALL-POLICY(5)
Impressum