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

« back to all changes in this revision

Viewing changes to configfiles/tcrules.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:
37
37
38
38
# The format is specified by a line as follows:
39
39
40
 
#     FORMAT {1|2}
 
40
#     [?]FORMAT {1|2}
 
41
 
42
# The optional '?' was introduced in Shorewall 4.5.11 and ?FORMAT is the
 
43
# preferred form; the form without the '?' is deprecated.
41
44
42
45
# The columns in the file are as follows (where the column name is followed by a
43
46
# different name in parentheses, the different name is used in the alternate
81
84
#         mark the connection rather than the packet.
82
85
83
86
#         The mark value may be optionally followed by "/" and a mask value (used
84
 
#         to determine those bits of the connection mark to actually be set). The
85
 
#         mark and optional mask are then followed by one of:
86
 
87
 
#         C
88
 
89
 
#             Mark the connection in the chain determined by the setting of
90
 
#             MARK_IN_FORWARD_CHAIN
91
 
92
 
#         CF
93
 
94
 
#             Mark the connection in the FORWARD chain
95
 
96
 
#         CP
97
 
98
 
#             Mark the connection in the PREROUTING chain.
99
 
100
 
#         CT
101
 
102
 
#             Mark the connecdtion in the POSTROUTING chain
103
 
104
 
#         CI
105
 
106
 
#             Mark the connection in the INPUT chain. This option is included for
107
 
#             completeness and has no applicability to traffic shaping or policy
108
 
#             routing.
109
 
110
 
#         Special considerations for If HIGH_ROUTE_MARKS=Yes in shorewall.conf(5
111
 
#         ).
112
 
113
 
#         If HIGH_ROUTE_MARKS=Yes, then you may also specify a value in the range
114
 
#         0x0100-0xFF00 with the low-order byte being zero. Such values may only
115
 
#         be used in the PREROUTING chain (value followed by :P or you have set
116
 
#         MARK_IN_FORWARD_CHAIN=No in shorewall.conf(5) and have not followed the
117
 
#         value with :F) or the OUTPUT chain (SOURCE is $FW). With
118
 
#         HIGH_ROUTE_MARKS=Yes, non-zero mark values less that 256 are not
119
 
#         permitted. Shorewall prohibits non-zero mark values less that 256 in
120
 
#         the OUTPUT chain when HIGH_ROUTE_MARKS=Yes. While earlier versions
121
 
#         allow such values in the OUTPUT chain, it is strongly recommended that
122
 
#         with HIGH_ROUTE_MARKS=Yes, you use the POSTROUTING chain to apply
123
 
#         traffic shaping marks/classification.
124
 
125
 
#      2. A classification Id (classid) of the form major:minor where major and
 
87
#         to determine those bits of the connection mark to actually be set).
 
88
#         When a mask is specified, the result of logically ANDing the mark value
 
89
#         with the mask must be the same as the mark value.
 
90
 
91
#         The mark and optional mask are then followed by one of:
 
92
 
93
#         C
 
94
 
95
#             Mark the connection in the chain determined by the setting of
 
96
#             MARK_IN_FORWARD_CHAIN
 
97
 
98
#         CF
 
99
 
100
#             Mark the connection in the FORWARD chain
 
101
 
102
#         CP
 
103
 
104
#             Mark the connection in the PREROUTING chain.
 
105
 
106
#         CT
 
107
 
108
#             Mark the connecdtion in the POSTROUTING chain
 
109
 
110
#         CI
 
111
 
112
#             Mark the connection in the INPUT chain. This option is included for
 
113
#             completeness and has no applicability to traffic shaping or policy
 
114
#             routing.
 
115
 
116
#      2. A mark range which is a pair of integers separated by a dash ("-").
 
117
#         Added in Shorewall 4.5.9.
 
118
 
119
#         May be optionally followed by a slash ("/") and a mask and requires the
 
120
#         Statistics Match capability in iptables and kernel. Marks in the
 
121
#         specified range are assigned to packets on a round-robin fashion.
 
122
 
123
#         When a mask is specified, the result of logically ANDing each mark
 
124
#         value with the mask must be the same as the mark value. The least
 
125
#         significant bit in the mask is used as an increment. For example, if
 
126
#         '0x200-0x400/0xff00' is specified, then the assigned mark values are
 
127
#         0x200, 0x300 and 0x400 in equal proportions. If no mask is specified,
 
128
#         then ( 2 ** MASK_BITS ) - 1 is assumed (MASK_BITS is set in
 
129
#         shorewall.conf(5)).
 
130
 
131
#         May optionally be followed by :P, :F,:T or :I where :P indicates that
 
132
#         marking should occur in the PREROUTING chain, :F indicates that marking
 
133
#         should occur in the FORWARD chain, :I indicates that marking should
 
134
#         occur in the INPUT chain (added in Shorewall 4.4.13), and :T indicates
 
135
#         that marking should occur in the POSTROUTING chain. If neither :P, :F
 
136
#         nor :T follow the mark value then the chain is determined as follows:
 
137
 
138
#         - If the SOURCE is $FW[:address-or-range[,address-or-range]...], then
 
139
#         the rule is inserted into the OUTPUT chain. When HIGH_ROUTE_MARKS=Yes,
 
140
#         only high mark values may be assigned there. Packet marking rules for
 
141
#         traffic shaping of packets originating on the firewall must be coded in
 
142
#         the POSTROUTING chain (see below).
 
143
 
144
#         - Otherwise, the chain is determined by the setting of
 
145
#         MARK_IN_FORWARD_CHAIN in shorewall.conf(5).
 
146
 
147
#         Please note that :I is included for completeness and affects neither
 
148
#         traffic shaping nor policy routing.
 
149
 
150
#         If your kernel and iptables include CONNMARK support then you can also
 
151
#         mark the connection rather than the packet.
 
152
 
153
#         The mark range and optional mask can then followed by one of:
 
154
 
155
#         C
 
156
 
157
#             Mark the connection in the chain determined by the setting of
 
158
#             MARK_IN_FORWARD_CHAIN
 
159
 
160
#         CF
 
161
 
162
#             Mark the connection in the FORWARD chain
 
163
 
164
#         CP
 
165
 
166
#             Mark the connection in the PREROUTING chain.
 
167
 
168
#         CT
 
169
 
170
#             Mark the connecdtion in the POSTROUTING chain
 
171
 
172
#         CI
 
173
 
174
#             Mark the connection in the INPUT chain. This option is included for
 
175
#             completeness and has no applicability to traffic shaping or policy
 
176
#             routing.
 
177
 
178
#      3. A classification Id (classid) of the form major:minor where major and
126
179
#         minor are integers. Corresponds to the 'class' specification in these
127
180
#         traffic shaping modules:
128
181
157
210
158
211
#             POSTROUTING chain (default).
159
212
160
 
#      3. RESTORE[/mask] -- restore the packet's mark from the connection's mark
161
 
#         using the supplied mask if any. Your kernel and iptables must include
162
 
#         CONNMARK support.
163
 
164
 
#         As in 1) above, may be followed by :P or :F
165
 
166
 
#      4. SAVE[/mask] -- save the packet's mark to the connection's mark using
167
 
#         the supplied mask if any. Your kernel and iptables must include
168
 
#         CONNMARK support.
169
 
170
 
#         As in 1) above, may be followed by :P or :F
171
 
172
 
#      5. CONTINUE Don't process any more marking rules ‒in the table.
 
213
#      4. CHECKSUM
 
214
 
215
#         Added in Shorewall 4.5.9. Compute and fill in the checksum in a packet
 
216
#         that lacks a checksum. This is particularly useful if you need to work
 
217
#         around old applications, such as dhcp clients, that do not work well
 
218
#         with checksum offloads, but you don't want to disable checksum offload
 
219
#         in your device.
 
220
 
221
#         Requires 'Checksum Target' support in your kernel and iptables.
 
222
 
223
#      5. [?]COMMENT -- the rest of the line will be attached as a comment to the
 
224
#         Netfilter rule(s) generated by the following entries. The comment will
 
225
#         appear delimited by "/* ... */" in the output of shorewall show mangle
 
226
 
227
#         To stop the comment from being attached to further rules, simply
 
228
#         include COMMENT on a line by itself.
 
229
 
230
#         Note
 
231
 
232
#         Beginning with Shorewall 4.5.11, ?COMMENT is a synonym for COMMENT and
 
233
#         is preferred.
 
234
 
235
#      6. CONTINUE Don't process any more marking rules ‒in the table.
173
236
174
237
#         As in 1) above, may be followed by :P or :F. Currently, CONTINUE may
175
238
#         not be used with exclusion (see the SOURCE and DEST columns below);
176
239
#         that restriction will be removed when iptables/Netfilter provides the
177
240
#         necessary support.
178
241
179
 
#      6. SAME Some websites run applications that require multiple connections
180
 
#         from a client browser. Where multiple 'balanced' providers are
181
 
#         configured, this can lead to problems when some of the connections are
182
 
#         routed through one provider and some through another. The SAME target
183
 
#         allows you to work around that problem. SAME may be used in the
184
 
#         PREROUTING and OUTPUT chains. When used in PREROUTING, it causes
185
 
#         matching connections from an individual local system to all use the
186
 
#         same provider. For example:
187
 
188
 
#         #ACTION           SOURCE         DEST         PROTO      DEST
189
 
#         #                                                        PORT(S)
190
 
#         SAME:P            192.168.1.0/24 0.0.0.0/0    tcp        80,443
191
 
192
 
#         If a host in 192.168.1.0/24 attempts a connection on TCP port 80 or 443
193
 
#         and it has sent a packet on either of those ports in the last five
194
 
#         minutes then the new connection will use the same provider as the
195
 
#         connection over which that last packet was sent.
196
 
197
 
#         When used in the OUTPUT chain, it causes all matching connections to an
198
 
#         individual remote system to all use the same provider. For example:
199
 
200
 
#         #ACTION           SOURCE         DEST         PROTO      DEST
201
 
#         #                                                        PORT(S)
202
 
#         SAME              $FW            0.0.0.0/0    tcp        80,443
203
 
204
 
#         If the firewall attempts a connection on TCP port 80 or 443 and it has
205
 
#         sent a packet on either of those ports in the last five minutes to the
206
 
#         same remote system then the new connection will use the same provider
207
 
#         as the connection over which that last packet was sent.
208
 
209
 
#      7. COMMENT -- the rest of the line will be attached as a comment to the
210
 
#         Netfilter rule(s) generated by the following entries. The comment will
211
 
#         appear delimited by "/* ... */" in the output of shorewall show mangle
212
 
213
 
#         To stop the comment from being attached to further rules, simply
214
 
#         include COMMENT on a line by itself.
215
 
216
 
#      8. IPMARK ‒ Assigns a mark to each matching packet based on the either the
 
242
#      7. DIVERT
 
243
 
244
#         Added in Shorewall 4.5.4 and only available when FORMAT is 2. Two
 
245
#         DIVERT rule should preceed the TPROXY rule and should select DEST PORT
 
246
#         tcp 80 and SOURCE PORT tcp 80 respectively (assuming that tcp port 80
 
247
#         is being proxied). DIVERT avoids sending packets to the TPROXY target
 
248
#         once a socket connection to Squid3 has been established by TPROXY.
 
249
#         DIVERT marks the packet with a unique mark and exempts it from any
 
250
#         rules that follow.
 
251
 
252
#      8. DSCP(dscp)
 
253
 
254
#         Added in Shorewall 4.5.1. Sets the Differentiated Services Code Point
 
255
#         field in the IP header. The dscp value may be given as an even number
 
256
#         (hex or decimal) or as the name of a DSCP class. Valid class names and
 
257
#         their associated hex numeric values are:
 
258
 
259
#             CS0  => 0x00
 
260
#             CS1  => 0x08
 
261
#             CS2  => 0x10
 
262
#             CS3  => 0x18
 
263
#             CS4  => 0x20
 
264
#             CS5  => 0x28
 
265
#             CS6  => 0x30
 
266
#             CS7  => 0x38
 
267
#             BE   => 0x00
 
268
#             AF11 => 0x0a
 
269
#             AF12 => 0x0c
 
270
#             AF13 => 0x0e
 
271
#             AF21 => 0x12
 
272
#             AF22 => 0x14
 
273
#             AF23 => 0x16
 
274
#             AF31 => 0x1a
 
275
#             AF32 => 0x1c
 
276
#             AF33 => 0x1e
 
277
#             AF41 => 0x22
 
278
#             AF42 => 0x24
 
279
#             AF43 => 0x26
 
280
#             EF   => 0x2e
 
281
 
282
#         To indicate more than one class, add their hex values together and
 
283
#         specify the result.
 
284
 
285
#         May be optionally followed by ':' and a capital letter designating the
 
286
#         chain where classification is to occur.
 
287
 
288
#         F
 
289
 
290
#             FORWARD chain.
 
291
 
292
#         T
 
293
 
294
#             POSTROUTING chain (default).
 
295
 
296
#      9. IMQ(number)
 
297
 
298
#         Added in Shorewall 4.5.1. Specifies that the packet should be passed to
 
299
#         the IMQ identified by number. Requires IMQ Target support in your
 
300
#         kernel and iptables.
 
301
 
302
#     10. IPMARK ‒ Assigns a mark to each matching packet based on the either the
217
303
#         source or destination IP address. By default, it assigns a mark value
218
304
#         equal to the low-order 8 bits of the source address. Default values
219
305
#         are:
282
368
#         as in the example above so that all of your minor classes will have a
283
369
#         value > 256.
284
370
285
 
#      9. DIVERT
286
 
287
 
#         Added in Shorewall 4.5.4 and only available when FORMAT is 2. Two
288
 
#         DIVERT rule should preceed the TPROXY rule and should select DEST PORT
289
 
#         tcp 80 and SOURCE PORT tcp 80 respectively (assuming that tcp port 80
290
 
#         is being proxied). DIVERT avoids sending packets to the TPROXY target
291
 
#         once a socket connection to Squid3 has been established by TPROXY.
292
 
#         DIVERT marks the packet with a unique mark and exempts it from any
293
 
#         rules that follow.
294
 
295
 
#     10. TPROXY(mark[,[port][,[address]]]) -- FORMAT 1
296
 
297
 
#         Transparently redirects a packet without altering the IP header.
298
 
#         Requires a local provider to be defined in shorewall-providers(5).
299
 
300
 
#         There are three parameters to TPROXY - only the first (mark) is
301
 
#         required:
302
 
303
 
#           ● mark - the MARK value corresponding to the local provider in
304
 
#             shorewall-providers(5).
305
 
306
 
#           ● port - the port on which the proxy server is listening. If omitted,
307
 
#             the original destination port.
308
 
309
 
#           ● address - a local (to the firewall) IP address on which the proxy
310
 
#             server is listening. If omitted, the IP address of the interface on
311
 
#             which the request arrives.
312
 
313
 
#     11. TPROXY([port][,address]) -- FORMAT 2
314
 
315
 
#         Transparently redirects a packet without altering the IP header.
316
 
#         Requires a tproxy provider to be defined in shorewall-providers(5).
317
 
318
 
#         There are three parameters to TPROXY - neither is required:
319
 
320
 
#           ● port - the port on which the proxy server is listening. If omitted,
321
 
#             the original destination port.
322
 
323
 
#           ● address - a local (to the firewall) IP address on which the proxy
324
 
#             server is listening. If omitted, the IP address of the interface on
325
 
#             which the request arrives.
326
 
327
 
#     12. TTL([-|+]number)
328
 
329
 
#         Added in Shorewall 4.4.24. May be option followed by :F but the
330
 
#         resulting rule is always added to the FORWARD chain. If + is included,
331
 
#         packets matching the rule will have their TTL incremented by number.
332
 
#         Similarly, if - is included, matching packets have their TTL
333
 
#         decremented by number. If neither + nor - is given, the TTL of matching
334
 
#         packets is set to number. The valid range of values for number is
335
 
#         1-255.
336
 
337
 
#     13. IMQ(number)
338
 
339
 
#         Added in Shorewall 4.5.1. Specifies that the packet should be passed to
340
 
#         the IMQ identified by number. Requires IMQ Target support in your
341
 
#         kernel and iptables.
342
 
343
 
#     14. DSCP(dscp)
344
 
345
 
#         Added in Shorewall 4.5.1. Sets the Differentiated Services Code Point
346
 
#         field in the IP header. The dscp value may be given as an even number
347
 
#         (hex or decimal) or as the name of a DSCP class. Valid class names and
348
 
#         their associated hex numeric values are:
349
 
350
 
#             CS0  => 0x00
351
 
#             CS1  => 0x08
352
 
#             CS2  => 0x10
353
 
#             CS3  => 0x18
354
 
#             CS4  => 0x20
355
 
#             CS5  => 0x28
356
 
#             CS6  => 0x30
357
 
#             CS7  => 0x38
358
 
#             BE   => 0x00
359
 
#             AF11 => 0x0a
360
 
#             AF12 => 0x0c
361
 
#             AF13 => 0x0e
362
 
#             AF21 => 0x12
363
 
#             AF22 => 0x14
364
 
#             AF23 => 0x16
365
 
#             AF31 => 0x1a
366
 
#             AF32 => 0x1c
367
 
#             AF33 => 0x1e
368
 
#             AF41 => 0x22
369
 
#             AF42 => 0x24
370
 
#             AF43 => 0x26
371
 
#             EF   => 0x2e
372
 
373
 
#         May be optionally followed by ':' and a capital letter designating the
374
 
#         chain where classification is to occur.
375
 
376
 
#         F
377
 
378
 
#             FORWARD chain.
379
 
380
 
#         T
381
 
382
 
#             POSTROUTING chain (default).
 
371
#     11. RESTORE[/mask] -- restore the packet's mark from the connection's mark
 
372
#         using the supplied mask if any. Your kernel and iptables must include
 
373
#         CONNMARK support.
 
374
 
375
#         As in 1) above, may be followed by :P or :F
 
376
 
377
#     12. SAME Some websites run applications that require multiple connections
 
378
#         from a client browser. Where multiple 'balanced' providers are
 
379
#         configured, this can lead to problems when some of the connections are
 
380
#         routed through one provider and some through another. The SAME target
 
381
#         allows you to work around that problem. SAME may be used in the
 
382
#         PREROUTING and OUTPUT chains. When used in PREROUTING, it causes
 
383
#         matching connections from an individual local system to all use the
 
384
#         same provider. For example:
 
385
 
386
#         #ACTION           SOURCE         DEST         PROTO      DEST
 
387
#         #                                                        PORT(S)
 
388
#         SAME:P            192.168.1.0/24 0.0.0.0/0    tcp        80,443
 
389
 
390
#         If a host in 192.168.1.0/24 attempts a connection on TCP port 80 or 443
 
391
#         and it has sent a packet on either of those ports in the last five
 
392
#         minutes then the new connection will use the same provider as the
 
393
#         connection over which that last packet was sent.
 
394
 
395
#         When used in the OUTPUT chain, it causes all matching connections to an
 
396
#         individual remote system to all use the same provider. For example:
 
397
 
398
#         #ACTION           SOURCE         DEST         PROTO      DEST
 
399
#         #                                                        PORT(S)
 
400
#         SAME              $FW            0.0.0.0/0    tcp        80,443
 
401
 
402
#         If the firewall attempts a connection on TCP port 80 or 443 and it has
 
403
#         sent a packet on either of those ports in the last five minutes to the
 
404
#         same remote system then the new connection will use the same provider
 
405
#         as the connection over which that last packet was sent.
 
406
 
407
#     13. SAVE[/mask] -- save the packet's mark to the connection's mark using
 
408
#         the supplied mask if any. Your kernel and iptables must include
 
409
#         CONNMARK support.
 
410
 
411
#         As in 1) above, may be followed by :P or :F
 
412
 
413
#     14. STATE {NEW|RELATED|ESTABLISHED|INVALID} [,...]
 
414
 
415
#         Added in Shorewall 4.5.9. The rule will only match if the packet's
 
416
#         connection is in one of the listed states.
383
417
384
418
#     15. TOS(tos[/mask])
385
419
394
428
#         Minimize-Cost        => 0x02,
395
429
#         Normal-Service       => 0x00
396
430
 
431
#         To indicate more than one class, add their hex values together and
 
432
#         specify the result.
 
433
397
434
#         When tos is given as a number, it may be optionally followed by '/' and
398
435
#         a mask. When no mask is given, the value 0xff is assumed. When tos is
399
436
#         given as a type name, the mask 0x3f is assumed.
412
449
413
450
#             POSTROUTING chain.
414
451
 
452
#     16. TPROXY(mark[,[port][,[address]]]) -- FORMAT 1
 
453
 
454
#         Transparently redirects a packet without altering the IP header.
 
455
#         Requires a local provider to be defined in shorewall-providers(5).
 
456
 
457
#         There are three parameters to TPROXY - only the first (mark) is
 
458
#         required:
 
459
 
460
#           ● mark - the MARK value corresponding to the local provider in
 
461
#             shorewall-providers(5).
 
462
 
463
#           ● port - the port on which the proxy server is listening. If omitted,
 
464
#             the original destination port.
 
465
 
466
#           ● address - a local (to the firewall) IP address on which the proxy
 
467
#             server is listening. If omitted, the IP address of the interface on
 
468
#             which the request arrives.
 
469
 
470
#     17. TPROXY([port][,address]) -- FORMAT 2
 
471
 
472
#         Transparently redirects a packet without altering the IP header.
 
473
#         Requires a tproxy provider to be defined in shorewall-providers(5).
 
474
 
475
#         There are three parameters to TPROXY - neither is required:
 
476
 
477
#           ● port - the port on which the proxy server is listening. If omitted,
 
478
#             the original destination port.
 
479
 
480
#           ● address - a local (to the firewall) IP address on which the proxy
 
481
#             server is listening. If omitted, the IP address of the interface on
 
482
#             which the request arrives.
 
483
 
484
#     18. TTL([-|+]number)
 
485
 
486
#         Added in Shorewall 4.4.24.
 
487
 
488
#         Prior to Shorewall 4.5.7.2, may be optionally followed by :F but the
 
489
#         resulting rule is always added to the FORWARD chain. Beginning with
 
490
#         Shorewall 4.5.7.s, it may be optionally followed by :P, in which case
 
491
#         the rule is added to the PREROUTING chain.
 
492
 
493
#         If + is included, packets matching the rule will have their TTL
 
494
#         incremented by number. Similarly, if - is included, matching packets
 
495
#         have their TTL decremented by number. If neither + nor - is given, the
 
496
#         TTL of matching packets is set to number. The valid range of values for
 
497
#         number is 1-255.
 
498
415
499
# SOURCE - {-|{interface|$FW}|[{interface|$FW}:]address-or-range[,
416
500
#     address-or-range]...}[exclusion]
417
501
470
554
#     You may exclude certain hosts from the set already defined through use of
471
555
#     an exclusion (see shorewall-exclusion(5)).
472
556
473
 
# PROTO - {-|tcp:syn|ipp2p|ipp2p:udp|ipp2p:all|protocol-number|protocol-name|all}
 
557
# PROTO - {-|{tcp:syn|ipp2p|ipp2p:udp|ipp2p:all|protocol-number|protocol-name|
 
558
#     all}[,...]}
474
559
475
560
#     Protocol - ipp2p requires ipp2p match support in your kernel and iptables.
476
561
 
562
#     Beginning with Shorewall 4.5.12, this column can accept a comma-separated
 
563
#     list of protocols.
 
564
477
565
# PORT(S) (dport) - [-|port-name-number-or-range[,port-name-number-or-range]...]
478
566
479
567
#     Optional destination Ports. A comma-separated list of Port names (from
502
590
#     (17), sctp (132) or udplite (136). Use '-' if any of the following fields
503
591
#     is supplied.
504
592
 
593
#     Beginning with Shorewall 4.5.15, you may place '=' in this column, provided
 
594
#     that the DEST PORT(S) column is non-empty. This causes the rule to match
 
595
#     when either the source port or the destination port in a packet matches one
 
596
#     of the ports specified in DEST PORTS(S). Use of '=' requires multiport
 
597
#     match in your iptables and kernel.
 
598
505
599
# USER - [!][user-name-or-number][:group-name-or-number][+program-name]
506
600
507
601
#     This optional column may only be non-empty if the SOURCE is the firewall
561
655
562
656
# LENGTH - [length|[min]:[max]]
563
657
564
 
#     Optional - packet Length. This field, if present allow you to match the
565
 
#     length of a packet against a specific value or range of values. You must
566
 
#     have iptables length support for this to work. A range is specified in the
567
 
#     form min:max where either min or max (but not both) may be omitted. If min
568
 
#     is omitted, then 0 is assumed; if max is omitted, than any packet that is
569
 
#     min or longer will match.
 
658
#     Optional - packet payload length. This field, if present allow you to match
 
659
#     the length of a packet payload (Layer 4 data ) against a specific value or
 
660
#     range of values. You must have iptables length support for this to work. A
 
661
#     range is specified in the form min:max where either min or max (but not
 
662
#     both) may be omitted. If min is omitted, then 0 is assumed; if max is
 
663
#     omitted, than any packet that is min or longer will match.
570
664
571
665
# TOS - tos
572
666
611
705
# HELPER - helper
612
706
613
707
#     Names a Netfiler protocol helper module such as ftp, sip, amanda, etc. A
614
 
#     packet will match if it was accepted by the named helper module. You can
615
 
#     also append "-" and a port number to the helper module name (e.g., ftp-21)
616
 
#     to specify the port number that the original connection was made on.
 
708
#     packet will match if it was accepted by the named helper module.
617
709
618
710
#     Example: Mark all FTP data connections with mark 4:
619
711
689
781
#     packet is P2P, set the packet mark to 4. If the packet mark has been set,
690
782
#     save it to the connection mark.
691
783
 
784
# Example 2:
 
785
 
786
#     SNAT outgoing connections on eth0 from 192.168.1.0/24 in round-robin
 
787
#     fashion between addresses 1.1.1.1, 1.1.1.3, and 1.1.1.9 (Shorewall 4.5.9
 
788
#     and later).
 
789
 
790
#     /etc/shorewall/tcrules:
 
791
 
792
#            #ACTION   SOURCE         DEST         PROTO   PORT(S)       SOURCE  USER    TEST
 
793
#            #                                                           PORT(S)
 
794
#            1-3:CF    192.168.1.0/24 eth0 ; state=NEW
 
795
 
796
#     /etc/shorewall/masq:
 
797
 
798
#            #INTERFACE SOURCE         ADDRESS     ...
 
799
#            eth0       192.168.1.0/24 1.1.1.1 ; mark=1:C
 
800
#            eth0       192.168.1.0/24 1.1.1.3 ; mark=2:C
 
801
#            eth0       192.168.1.0/24 1.1.1.4 ; mark=3:C
 
802
692
803
##########################################################################################################################################
693
 
FORMAT 2
 
804
?FORMAT 2
694
805
##########################################################################################################################################