~ubuntu-branches/debian/sid/shorewall/sid

« back to all changes in this revision

Viewing changes to Samples/one-interface/rules.annotated

  • Committer: Package Import Robot
  • Author(s): Roberto C. Sanchez
  • Date: 2013-05-03 08:17:42 UTC
  • mfrom: (1.3.52)
  • Revision ID: package-import@ubuntu.com-20130503081742-qo8p6k2z0dnbfqo8
Tags: 4.5.16.1-1
* New Upstream Version
* debian/patches/01_debian_configuration.patch: Refreshed
* debian/patches/02_correct_dnat_snat_behavior.patch: Removed
* Update lintian overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
# See the file README.txt for further details.
11
11
#------------------------------------------------------------------------------------------------------------
12
12
# For information on entries in this file, type "man shorewall-rules"
13
 
######################################################################################################################################################################################
 
13
######################################################################################################################################################################################################
14
14
15
15
# Entries in this file govern connection establishment by defining exceptions to
16
16
# the policies layed out in shorewall-policy(5). By default, subsequent requests
53
53
#     The only ACTIONs allowed in this section are ACCEPT, DROP, REJECT, LOG and
54
54
#     QUEUE
55
55
56
 
#     There is an implicit ACCEPT rule inserted at the end of this section.
 
56
#     There is an implicit rule added at the end of this section that invokes the
 
57
#     RELATED_DISPOSITION (shorewall.conf(5)).
 
58
 
59
# INVALID
 
60
 
61
#     Added in Shorewall 4.5.13. Packets in the INVALID state are processed by
 
62
#     rules in this section.
 
63
 
64
#     The only Actions allowed in this section are ACCEPT, DROP, REJECT, LOG and
 
65
#     QUEUE.
 
66
 
67
#     There is an implicit rule added at the end of this section that invokes the
 
68
#     INVALID_DISPOSITION (shorewall.conf(5)).
 
69
 
70
# UNTRACKED
 
71
 
72
#     Added in Shorewall 4.5.13. Packets in the UNTRACKED state are processed by
 
73
#     rules in this section.
 
74
 
75
#     The only Actions allowed in this section are ACCEPT, DROP, REJECT, LOG and
 
76
#     QUEUE.
 
77
 
78
#     There is an implicit rule added at the end of this section that invokes the
 
79
#     UNTRACKED_DISPOSITION (shorewall.conf(5)).
57
80
58
81
# NEW
59
82
116
139
#         like ACCEPT but exempts the rule from being suppressed by OPTIMIZE=1 in
117
140
#         shorewall.conf(5).
118
141
 
142
#     action
 
143
 
144
#         The name of an action declared in shorewall-actions(5) or in /usr/share
 
145
#         /shorewall/actions.std.
 
146
 
147
#     ADD(ipset:flags)
 
148
 
149
#         Added in Shorewall 4.4.12. Causes addresses and/or port numbers to be
 
150
#         added to the named ipset. The flags specify the address or tupple to be
 
151
#         added to the set and must match the type of ipset involved. For
 
152
#         example, for an iphash ipset, either the SOURCE or DESTINATION address
 
153
#         can be added using flags src or dst respectively (see the -A command in
 
154
#         ipset (8)).
 
155
 
156
#         ADD is non-terminating. Even if a packet matches the rule, it is passed
 
157
#         on to the next rule.
 
158
 
159
#     AUDIT[(accept|drop|reject)]
 
160
 
161
#         Added in Shorewall 4.5.10. Audits the packet with the specified type;
 
162
#         if the type is omitted, then drop is assumed. Require AUDIT_TARGET
 
163
#         support in the kernel and iptables.
 
164
119
165
#     A_ACCEPT, A_ACCEPT+ and A_ACCEPT!
120
166
121
167
#         Added in Shorewall 4.4.20. Audited versions of ACCEPT, ACCEPT+ and
122
168
#         ACCEPT! respectively. Require AUDIT_TARGET support in the kernel and
123
169
#         iptables.
124
170
125
 
#     NONAT
126
 
127
 
#         Excludes the connection from any subsequent DNAT[-] or REDIRECT[-]
128
 
#         rules but doesn't generate a rule to accept the traffic.
129
 
130
 
#     DROP
131
 
132
 
#         Ignore the request.
133
 
134
 
#     DROP!
135
 
136
 
#         like DROP but exempts the rule from being suppressed by OPTIMIZE=1 in
137
 
#         shorewall.conf(5).
138
 
139
171
#     A_DROP and A_DROP!
140
172
141
173
#         Added in Shorewall 4.4.20. Audited versions of DROP and DROP!
142
174
#         respectively. Require AUDIT_TARGET support in the kernel and iptables.
143
175
144
 
#     REJECT
145
 
146
 
#         disallow the request and return an icmp-unreachable or an RST packet.
147
 
148
 
#     REJECT!
149
 
150
 
#         like REJECT but exempts the rule from being suppressed by OPTIMIZE=1 in
151
 
#         shorewall.conf(5).
152
 
153
176
#     A_REJECT AND A_REJECT!
154
177
155
178
#         Added in Shorewall 4.4.20. Audited versions of REJECT and REJECT!
156
179
#         respectively. Require AUDIT_TARGET support in the kernel and iptables.
157
180
158
 
#     DNAT
159
 
160
 
#         Forward the request to another system (and optionally another port).
161
 
162
 
#     DNAT-
163
 
164
 
#         Advanced users only.
165
 
166
 
#         Like DNAT but only generates the DNAT iptables rule and not the
167
 
#         companion ACCEPT rule.
168
 
169
 
#     REDIRECT
170
 
171
 
#         Redirect the request to a server running on the firewall.
172
 
173
 
#     REDIRECT-
174
 
175
 
#         Advanced users only.
176
 
177
 
#         Like REDIRECT but only generates the REDIRECT iptables rule and not the
178
 
#         companion ACCEPT rule.
 
181
#     [?]COMMENT
 
182
 
183
#         the rest of the line will be attached as a comment to the Netfilter
 
184
#         rule(s) generated by the following entries. The comment will appear
 
185
#         delimited by "/* ... */" in the output of "shorewall show <chain>". To
 
186
#         stop the comment from being attached to further rules, simply include
 
187
#         COMMENT on a line by itself.
 
188
 
189
#         Note
 
190
 
191
#         Beginning with Shorewall 4.5.11, ?COMMENT is a synonym for COMMENT and
 
192
#         is preferred.
179
193
180
194
#     CONTINUE
181
195
193
207
#         like CONTINUE but exempts the rule from being suppressed by OPTIMIZE=1
194
208
#         in shorewall.conf(5).
195
209
196
 
#     LOG
197
 
198
 
#         Simply log the packet and continue with the next rule.
199
 
200
 
#     QUEUE
201
 
202
 
#         Queue the packet to a user-space application such as ftwall (http://
203
 
#         p2pwall.sf.net). The application may reinsert the packet for further
204
 
#         processing.
205
 
206
 
#     QUEUE!
207
 
208
 
#         like QUEUE but exempts the rule from being suppressed by OPTIMIZE=1 in
209
 
#         shorewall.conf(5).
210
 
211
 
#     NFLOG[(nflog-parameters)]
212
 
213
 
#         queues matching packets to a backend logging daemon via a netlink
214
 
#         socket then continues to the next rule. See http://www.shorewall.net/
215
 
#         shorewall_logging.html.
216
 
217
 
#     NFQUEUE[(queuenumber)]
218
 
219
 
#         Queues the packet to a user-space application using the nfnetlink_queue
220
 
#         mechanism. If a queuenumber is not specified, queue zero (0) is
221
 
#         assumed.
222
 
223
 
#     NFQUEUE![(queuenumber)]
224
 
225
 
#         like NFQUEUE but exempts the rule from being suppressed by OPTIMIZE=1
226
 
#         in shorewall.conf(5).
227
 
228
210
#     COUNT
229
211
230
212
#         Simply increment the rule's packet and byte count and pass the packet
231
213
#         to the next rule.
232
214
233
 
#     COMMENT
234
 
235
 
#         the rest of the line will be attached as a comment to the Netfilter
236
 
#         rule(s) generated by the following entries. The comment will appear
237
 
#         delimited by "/* ... */" in the output of "shorewall show <chain>". To
238
 
#         stop the comment from being attached to further rules, simply include
239
 
#         COMMENT on a line by itself.
240
 
241
 
#     action
242
 
243
 
#         The name of an action declared in shorewall-actions(5) or in /usr/share
244
 
#         /shorewall/actions.std.
 
215
#     DEL(ipset:flags)
 
216
 
217
#         Added in Shorewall 4.4.12. Causes an entry to be deleted from the named
 
218
#         ipset. The flags specify the address or tupple to be deleted from the
 
219
#         set and must match the type of ipset involved. For example, for an
 
220
#         iphash ipset, either the SOURCE or DESTINATION address can be deletec
 
221
#         using flags src or dst respectively (see the -D command in ipset (8)).
 
222
 
223
#         DEL is non-terminating. Even if a packet matches the rule, it is passed
 
224
#         on to the next rule.
 
225
 
226
#     DNAT
 
227
 
228
#         Forward the request to another system (and optionally another port).
 
229
 
230
#     DNAT-
 
231
 
232
#         Advanced users only.
 
233
 
234
#         Like DNAT but only generates the DNAT iptables rule and not the
 
235
#         companion ACCEPT rule.
 
236
 
237
#     DROP
 
238
 
239
#         Ignore the request.
 
240
 
241
#     DROP!
 
242
 
243
#         like DROP but exempts the rule from being suppressed by OPTIMIZE=1 in
 
244
#         shorewall.conf(5).
 
245
 
246
#     HELPER
 
247
 
248
#         Added in Shorewall 4.5.7. This action requires that the HELPER column
 
249
#         contains the name of the Netfilter helper to be associated with
 
250
#         connections matching this connection. May only be specified in the NEW
 
251
#         section and is useful for being able to specify a helper when the
 
252
#         applicable policy is ACCEPT. No destination zone should be specified in
 
253
#         HELPER rules.
 
254
 
255
#     INLINE[(action)]
 
256
 
257
#         Added in Shorewall 4.5.16. This action allows you to construct most of
 
258
#         the rule yourself using iptables syntax. The part that you specify must
 
259
#         follow a semicolon (';') and is completely free-form. If the target of
 
260
#         the rule (the part following 'j') is something that Shorewall supports
 
261
#         in the ACTION column, then you may enclose it in parentheses (e.g.,
 
262
#         INLINE(ACCEPT)). Otherwise, you can include it after the semicolon. In
 
263
#         this case, you must declare the target as a builtin action in
 
264
#         shorewall-actions(5).
 
265
 
266
#         Some considerations when using INLINE:
 
267
 
268
#           ● The p, s, d, i, o, policy, and state match (state or conntrack
 
269
#             --ctstate) matches will always appear in the front of the rule in
 
270
#             that order.
 
271
 
272
#           ● When multiple matches are specified, the compiler will keep them in
 
273
#             the order in which they appear (excluding the above listed ones),
 
274
#             but they will not necessarily be at the end of the generated rule.
 
275
#             For example, if addresses are specified in the SOURCE and/or DEST
 
276
#             columns, their generated matches will appear after those specified
 
277
#             using ';'.
 
278
 
279
#     LOG:level
 
280
 
281
#         Simply log the packet and continue with the next rule.
245
282
246
283
#     macro[(macrotarget)]
247
284
256
293
#         The older syntax where the macro name and the target are separated by a
257
294
#         slash (e.g. FTP/ACCEPT) is still allowed but is deprecated.
258
295
259
 
#     ADD(ipset:flags)
260
 
261
 
#         Added in Shorewall 4.4.12. Causes addresses and/or port numbers to be
262
 
#         added to the named ipset. The flags specify the address or tupple to be
263
 
#         added to the set and must match the type of ipset involved. For
264
 
#         example, for an iphash ipset, either the SOURCE or DESTINATION address
265
 
#         can be added using flags src or dst respectively (see the -A command in
266
 
#         ipset (8)).
267
 
268
 
#         ADD is non-terminating. Even if a packet matches the rule, it is passed
269
 
#         on to the next rule.
270
 
271
 
#     DEL(ipset:flags)
272
 
273
 
#         Added in Shorewall 4.4.12. Causes an entry to be deleted from the named
274
 
#         ipset. The flags specify the address or tupple to be deleted from the
275
 
#         set and must match the type of ipset involved. For example, for an
276
 
#         iphash ipset, either the SOURCE or DESTINATION address can be deletec
277
 
#         using flags src or dst respectively (see the -D command in ipset (8)).
278
 
279
 
#         DEL is non-terminating. Even if a packet matches the rule, it is passed
280
 
#         on to the next rule.
 
296
#     NFLOG[(nflog-parameters)]
 
297
 
298
#         Added in Shorewall 4.5.9.3. Queues matching packets to a backend
 
299
#         logging daemon via a netlink socket then continues to the next rule.
 
300
#         See http://www.shorewall.net/shorewall_logging.html.
 
301
 
302
#         Similar to LOG:NFLOG[(nflog-parameters)], except that the log level is
 
303
#         not changed when this ACTION is used in an action or macro body and the
 
304
#         invocation of that action or macro specifies a log level.
 
305
 
306
#     NFQUEUE[(queuenumber)]
 
307
 
308
#         Queues the packet to a user-space application using the nfnetlink_queue
 
309
#         mechanism. If a queuenumber is not specified, queue zero (0) is
 
310
#         assumed.
 
311
 
312
#     NFQUEUE![(queuenumber)]
 
313
 
314
#         like NFQUEUE but exempts the rule from being suppressed by OPTIMIZE=1
 
315
#         in shorewall.conf(5).
 
316
 
317
#     NONAT
 
318
 
319
#         Excludes the connection from any subsequent DNAT[-] or REDIRECT[-]
 
320
#         rules but doesn't generate a rule to accept the traffic.
 
321
 
322
#     QUEUE
 
323
 
324
#         Queue the packet to a user-space application such as ftwall (http://
 
325
#         p2pwall.sf.net). The application may reinsert the packet for further
 
326
#         processing.
 
327
 
328
#     QUEUE!
 
329
 
330
#         like QUEUE but exempts the rule from being suppressed by OPTIMIZE=1 in
 
331
#         shorewall.conf(5).
 
332
 
333
#     REJECT
 
334
 
335
#         disallow the request and return an icmp-unreachable or an RST packet.
 
336
 
337
#     REJECT!
 
338
 
339
#         like REJECT but exempts the rule from being suppressed by OPTIMIZE=1 in
 
340
#         shorewall.conf(5).
 
341
 
342
#     REDIRECT
 
343
 
344
#         Redirect the request to a server running on the firewall.
 
345
 
346
#     REDIRECT-
 
347
 
348
#         Advanced users only.
 
349
 
350
#         Like REDIRECT but only generates the REDIRECT iptables rule and not the
 
351
#         companion ACCEPT rule.
 
352
 
353
#     ULOG[(ulog-parameters)]
 
354
 
355
#         Added in Shorewall 4.5.10. Queues matching packets to a backend logging
 
356
#         daemon via a netlink socket then continues to the next rule. See http:/
 
357
#         /www.shorewall.net/shorewall_logging.html.
 
358
 
359
#         Similar to LOG:ULOG[(ulog-parameters)], except that the log level is
 
360
#         not changed when this ACTION is used in an action or macro body and the
 
361
#         invocation of that action or macro specifies a log level.
281
362
282
363
#     The target may optionally be followed by ":" and a syslog log level (e.g,
283
364
#     REJECT:info or Web(ACCEPT):debug). This causes the packet to be logged at
443
524
#      c. the SOURCE zone must be an ipv4 zone that is associated with only the
444
525
#         same bridge.
445
526
446
 
#         Except when all[+]|[-] is specified, the server may be further
447
 
#         restricted to a particular network, host or interface by appending ":"
448
 
#         and the network, host or interface. See SOURCE above.
449
 
450
 
#         You may exclude certain hosts from the set already defined through use
451
 
#         of an exclusion (see shorewall-exclusion(5)).
452
 
453
 
#         Restrictions:
454
 
455
 
#         1. MAC addresses are not allowed (this is a Netfilter restriction).
456
 
457
 
#         2. You may not specify both an interface and an address.
458
 
459
 
#         Like in the SOURCE column, you may specify a range of IP addresses
460
 
#         using the syntax lowaddress-highaddress. When the ACTION is DNAT or
461
 
#         DNAT-, the connections will be assigned to addresses in the range in a
462
 
#         round-robin fashion.
463
 
464
 
#         If you kernel and iptables have ipset match support then you may give
465
 
#         the name of an ipset prefaced by "+". The ipset name may be optionally
466
 
#         followed by a number from 1 to 6 enclosed in square brackets ([]) to
467
 
#         indicate the number of levels of destination bindings to be matched.
468
 
#         Only one of the SOURCE and DEST columns may specify an ipset name.
469
 
470
 
#         Beginning with Shorewall 4.4.17, the primary IP address of a firewall
471
 
#         interface can be specified by an apersand ('&') followed by the logical
472
 
#         name of the interface as found in the INTERFACE column of
473
 
#         shorewall-interfaces (5).
474
 
475
 
#         The port that the server is listening on may be included and separated
476
 
#         from the server's IP address by ":". If omitted, the firewall will not
477
 
#         modifiy the destination port. A destination port may only be included
478
 
#         if the ACTION is DNAT or REDIRECT.
479
 
480
 
#         Example:
481
 
482
 
#             loc:192.168.1.3:3128 specifies a local server at IP address
483
 
#             192.168.1.3 and listening on port 3128.
484
 
485
 
#         The port may be specified as a service name. You may specify a port
486
 
#         range in the form lowport-highport to cause connections to be assigned
487
 
#         to ports in the range in round-robin fashion. When a port range is
488
 
#         specified, lowport and highport must be given as integers; service
489
 
#         names are not permitted. Additionally, the port range may be optionally
490
 
#         followed by :random which causes assignment to ports in the list to be
491
 
#         random.
492
 
493
 
#         If the ACTION is REDIRECT or REDIRECT-, this column needs only to
494
 
#         contain the port number on the firewall that the request should be
495
 
#         redirected to. That is equivalent to specifying $FW::port.
 
527
#     Except when all[+]|[-] is specified, the server may be further restricted
 
528
#     to a particular network, host or interface by appending ":" and the
 
529
#     network, host or interface. See SOURCE above.
 
530
 
531
#     You may exclude certain hosts from the set already defined through use of
 
532
#     an exclusion (see shorewall-exclusion(5)).
 
533
 
534
#     Restriction: MAC addresses are not allowed (this is a Netfilter
 
535
#     restriction).
 
536
 
537
#     Like in the SOURCE column, you may specify a range of IP addresses using
 
538
#     the syntax lowaddress-highaddress. When the ACTION is DNAT or DNAT-, the
 
539
#     connections will be assigned to addresses in the range in a round-robin
 
540
#     fashion.
 
541
 
542
#     If you kernel and iptables have ipset match support then you may give the
 
543
#     name of an ipset prefaced by "+". The ipset name may be optionally followed
 
544
#     by a number from 1 to 6 enclosed in square brackets ([]) to indicate the
 
545
#     number of levels of destination bindings to be matched. Only one of the
 
546
#     SOURCE and DEST columns may specify an ipset name.
 
547
 
548
#     Beginning with Shorewall 4.4.17, the primary IP address of a firewall
 
549
#     interface can be specified by an apersand ('&') followed by the logical
 
550
#     name of the interface as found in the INTERFACE column of
 
551
#     shorewall-interfaces (5).
 
552
 
553
#     The port that the server is listening on may be included and separated from
 
554
#     the server's IP address by ":". If omitted, the firewall will not modifiy
 
555
#     the destination port. A destination port may only be included if the ACTION
 
556
#     is DNAT or REDIRECT.
 
557
 
558
#     Example:
 
559
 
560
#         loc:192.168.1.3:3128 specifies a local server at IP address 192.168.1.3
 
561
#         and listening on port 3128.
 
562
 
563
#     The port may be specified as a service name. You may specify a port range
 
564
#     in the form lowport-highport to cause connections to be assigned to ports
 
565
#     in the range in round-robin fashion. When a port range is specified,
 
566
#     lowport and highport must be given as integers; service names are not
 
567
#     permitted. Additionally, the port range may be optionally followed by
 
568
#     :random which causes assignment to ports in the list to be random.
 
569
 
570
#     If the ACTION is REDIRECT or REDIRECT-, this column needs only to contain
 
571
#     the port number on the firewall that the request should be redirected to.
 
572
#     That is equivalent to specifying $FW::port.
496
573
497
574
# PROTO- {-|tcp:syn|ipp2p|ipp2p:udp|ipp2p:all|protocol-number|protocol-name|all}
498
575
540
617
#     acceptable. Specified as a comma- separated list of port names, port
541
618
#     numbers or port ranges.
542
619
 
620
#     Beginning with Shorewall 4.5.15, you may place '=' in this column, provided
 
621
#     that the DEST PORT(S) column is non-empty. This causes the rule to match
 
622
#     when either the source port or the destination port in a packet matches one
 
623
#     of the ports specified in DEST PORTS(S). Use of '=' requires multiport
 
624
#     match in your iptables and kernel.
 
625
543
626
#     Warning
544
627
545
628
#     Unless you really understand IP, you should leave this column empty or
546
629
#     place a dash (-) in the column. Most people who try to use this column get
547
630
#     it wrong.
548
631
549
 
#         If you don't want to restrict client ports but need to specify an
550
 
#         ORIGINAL DEST in the next column, then place "-" in this column.
551
 
552
 
#         If your kernel contains multi-port match support, then only a single
553
 
#         Netfilter rule will be generated if in this list and the DEST PORT(S)
554
 
#         list above:
555
 
556
 
#         1. There are 15 or less ports listed.
557
 
558
 
#         2. No port ranges are included or your kernel and iptables contain
559
 
#         extended multiport match support.
 
632
#     If you don't want to restrict client ports but need to specify an ORIGINAL
 
633
#     DEST in the next column, then place "-" in this column.
 
634
 
635
#     If your kernel contains multi-port match support, then only a single
 
636
#     Netfilter rule will be generated if in this list and the DEST PORT(S) list
 
637
#     above:
 
638
 
639
#     1. There are 15 or less ports listed.
 
640
 
641
#     2. No port ranges are included or your kernel and iptables contain extended
 
642
#     multiport match support.
560
643
561
644
# ORIGINAL DEST (origdest) - [-|address[,address]...[exclusion]|exclusion]
562
645
613
696
614
697
#     Example: s:ssh:3/min:5
615
698
616
 
# USER/GROUP (user) - [!][user-name-or-number][:group-name-or-number][+
617
 
#     program-name]
 
699
# USER/GROUP (user) - [!][user-name-or-number][:group-name-or-number][,...]
618
700
619
701
#     This optional column may only be non-empty if the SOURCE is the firewall
620
702
#     itself.
623
705
#     generating the output is running under the effective user and/or group
624
706
#     specified (or is NOT running under that id if "!" is given).
625
707
 
708
#     Beginning with Shorewall 4.5.8, multiple user or group names/ids separated
 
709
#     by commas may be specified.
 
710
626
711
#     Examples:
627
712
628
713
#     joe
637
722
638
723
#         program must not be run by a member of the 'kids' group
639
724
640
 
#     +upnpd
641
 
642
 
#         program named upnpd
643
 
644
 
#         Important
645
 
646
 
#         The ability to specify a program name was removed from Netfilter in
647
 
#         kernel version 2.6.14.
 
725
#     2001-2099
 
726
 
727
#         UIDs 2001 through 2099 (Shorewall 4.5.6 and later)
648
728
649
729
# MARK - [!]value[/mask][:C]
650
730
735
815
#     Added in Shorewall 4.4.15. Not used in IPv4 configurations. If you with to
736
816
#     supply a value for one of the later columns, enter '-' in this column.
737
817
738
 
# SWITCH - [!]switch-name
 
818
# SWITCH - [!]switch-name[={0|1}]
739
819
740
820
#     Added in Shorewall 4.4.24 and allows enabling and disabling the rule
741
821
#     without requiring shorewall restart.
743
823
#     The rule is enabled if the value stored in /proc/net/nf_condition/
744
824
#     switch-name is 1. The rule is disabled if that file contains 0 (the
745
825
#     default). If '!' is supplied, the test is inverted such that the rule is
746
 
#     enabled if the file contains 0. switch-name must begin with a letter and be
747
 
#     composed of letters, decimal digits, underscores or hyphens. Switch names
748
 
#     must be 30 characters or less in length.
 
826
#     enabled if the file contains 0.
 
827
 
828
#     Within the switch-name, '@0' and '@{0}' are replaced by the name of the
 
829
#     chain to which the rule is a added. The switch-name (after '@...'
 
830
#     expansion) must begin with a letter and be composed of letters, decimal
 
831
#     digits, underscores or hyphens. Switch names must be 30 characters or less
 
832
#     in length.
749
833
750
834
#     Switches are normally off. To turn a switch on:
751
835
757
841
758
842
#     Switch settings are retained over shorewall restart.
759
843
 
844
#     Beginning with Shoreawll 4.5.10, when the switch-name is followed by =0 or
 
845
#     =1, then the switch is initialized to off or on respectively by the start
 
846
#     command. Other commands do not affect the switch setting.
 
847
 
848
# HELPER - [helper]
 
849
 
850
#     Added in Shorewall 4.5.7.
 
851
 
852
#     In the NEW section, causes the named conntrack helper to be associated with
 
853
#     this connection; the contents of this column are ignored unless ACTION is
 
854
#     ACCEPT*, DNAT* or REDIRECT*.
 
855
 
856
#     In the RELATED section, will only match if the related connection has the
 
857
#     named helper associated with it.
 
858
 
859
#     The helper may be one of:
 
860
 
861
#     amanda
 
862
#     ftp
 
863
#     irc
 
864
#     netbios-ns
 
865
#     pptp
 
866
#     Q.931
 
867
#     RAS
 
868
#     sane
 
869
#     sip
 
870
#     snmp
 
871
#     tftp
 
872
 
873
#     If the HELPERS option is specified in shorewall.conf(5), then any module
 
874
#     specified in this column must be listed in the HELPERS setting.
 
875
760
876
# Examples
761
877
762
878
# Example 1:
915
1031
916
1032
#             #ACTION                       SOURCE           DEST           PROTO       DEST
917
1033
#             #                                                                         PORT(S)
918
 
#             DROP                          net:^A1,A2       fw             tcp         22
919
 
920
 
######################################################################################################################################################################################
921
 
#ACTION         SOURCE          DEST            PROTO   DEST    SOURCE          ORIGINAL        RATE            USER/   MARK    CONNLIMIT       TIME         HEADERS         SWITCH
 
1034
#             DROP                          net:^A1,A2       fw             tcp         25
 
1035
 
1036
# Example 14:
 
1037
 
1038
#     You want to generate your own rule involving iptables targets and matches
 
1039
#     not supported by Shorewall.
 
1040
 
1041
#             #ACTION                       SOURCE           DEST           PROTO       DEST
 
1042
#             #                                                                         PORT(S)
 
1043
#             INLINE                        $FW              net ; -p 6 -m mickey-mouse --name test -m set --match-set set1 src -m mickey-mouse --name test2 -j SECCTX --name test3
 
1044
 
1045
#     The above will generate the following iptables-restore input:
 
1046
 
1047
#             -A fw2net -p 6 -m mickey-mouse --name test -m set --match-set set1 src -m mickey-mouse --name test2 -j SECCTX --name test3
 
1048
 
1049
#     Note that SECCTX must be defined as a builtin action in shorewall-actions
 
1050
#     (5):
 
1051
 
1052
#             #ACTION            OPTIONS
 
1053
#             SECCTX             builtin
 
1054
 
1055
######################################################################################################################################################################################################
 
1056
#ACTION         SOURCE          DEST            PROTO   DEST    SOURCE          ORIGINAL        RATE            USER/   MARK    CONNLIMIT       TIME            HEADERS         SWITCH          HELPER
922
1057
#                                                       PORT    PORT(S)         DEST            LIMIT           GROUP
923
1058
#SECTION ALL
924
1059
#SECTION ESTABLISHED
925
1060
#SECTION RELATED
 
1061
#SECTION INVALID
 
1062
#SECTION UNTRACKED
926
1063
SECTION NEW
 
1064
# Drop packets in the INVALID state
 
1065
Invalid(DROP)  net              $FW             tcp
927
1066
# Drop Ping from the "bad" net zone.. and prevent your log from being flooded..
928
1067
Ping(DROP)      net             $FW
929
1068
# Permit all ICMP traffic FROM the firewall TO the net zone