1SHOREWALL-ACTIONS(5) Configuration Files SHOREWALL-ACTIONS(5)
2
3
4
6 actions - Shorewall action declaration file
7
9 /etc/shorewall[6]/actions
10
12 This file allows you to define new ACTIONS for use in rules (see
13 shorewall-rules(5)[1]). You define the iptables rules to be performed
14 in an ACTION in /etc/shorewall/action.action-name.
15
16 Columns are:
17
18 NAME
19 The name of the action. ACTION names should begin with an
20 upper-case letter to distinguish them from Shorewall-generated
21 chain names and be composed of letters, digits or numbers. If you
22 intend to log from the action then the name must be no longer than
23 11 characters in length if you use the standard LOGFORMAT.
24
25 OPTIONS
26 Added in Shorewall 4.5.10. Available options are:
27
28 audit
29 Added in Shorewall 5.0.7. When this option is specified, the
30 action is expected to have at least two parameters; the first
31 is a target and the second is either 'audit' or omitted. If the
32 second is 'audit', then the first must be an auditable target
33 (ACCEPT, DROP or REJECT).
34
35 builtin
36 Added in Shorewall 4.5.16. Defines the action as a rule target
37 that is supported by your iptables but is not directly
38 supported by Shorewall. The action may be used as the rule
39 target in an INLINE rule in shorewall-rules[1](5).
40
41 Beginning with Shorewall 4.6.0, the Netfilter table(s) in which
42 the builtin can be used may be specified: filter, nat, mangle
43 and raw. If no table name(s) are given, then filter is assumed.
44 The table names follow builtin and are separated by commas; for
45 example, "FOOBAR builtin,filter,mangle" would specify FOOBAR as
46 a builtin target that can be used in the filter and mangle
47 tables.
48
49 Beginning with Shorewall 4.6.4, you may specify the terminating
50 option with builtin to indicate to the Shorewall optimizer that
51 the action is terminating (the current packet will not be
52 passed to the next rule in the chain).
53
54 inline
55 Causes the action body (defined in action.action-name) to be
56 expanded in-line like a macro rather than in its own chain. You
57 can list Shorewall Standard Actions in this file to specify the
58 inline option.
59
60 Caution
61 Some of the Shorewall standard actions cannot be used
62 in-line and will generate a warning and the compiler will
63 ignore inline if you try to use them that way:
64 DropSmurfs
65 IfEvent
66 Invalid (Prior to Shorewall 4.5.13)
67 NotSyn (Prior to Shorewall 4.5.13)
68 RST (Prior to Shorewall 4.5.13)
69 TCPFlags
70
71 logjump
72 Added in Shorewall 5.0.8. Performs the same function as nolog
73 (below), with the addition that the jump to the actions chain
74 is logged if a log level is specified on the action invocation.
75 For inline actions, this option is identical to nolog.
76
77 mangle
78 Added in Shorewall 5.0.7. Specifies that this action is to be
79 used in shorewall-mangle(5)[2] rather than
80 shorewall-rules(5)[1].
81
82 nat
83 Added in Shorewall 5.0.13. Specifies that this action is to be
84 used in shorewall-snat(5)[3] rather than shorewall-rules(5)[1].
85 The mangle and nat options are mutually exclusive.
86
87 noinline
88 Causes any later inline option for the same action to be
89 ignored with a warning.
90
91 nolog
92 Added in Shorewall 4.5.11. When this option is specified, the
93 compiler does not automatically apply the log level and/or tag
94 from the invocation of the action to all rules inside of the
95 action. Rather, it simply sets the $_loglevel and $_logtag
96 shell variables which can be used within the action body to
97 apply those logging options only to a subset of the rules.
98
99 proto=protocol
100 Added in Shorewall 5.1.10. Specifies that the action is only
101 usable with the specified protocol (name or number). When the
102 action is invoked with no protocol specified in the PROTO
103 column, or if the action is used as a Policy Action, the named
104 protocol will be assumed. If a protocol is specified in the
105 PROTO column of an invocation, then it must match the named
106 protocol.
107
108 The proto option has no effect if the inline or builtin option
109 is specified. A warning is issued if proto is specified along
110 with builtin.
111
112 dport=portorservice
113 Added in Shorewall 5.2.6. Requires that the proto option be
114 previously given and indicates that this action may only be
115 applied to flows with the specified protocol and portorservice.
116 portorservice may be a valid port number or the name of a
117 service defined in /etc/services to be usable with the
118 specified protocol. If a port or service is specified in the
119 DPORT column of an invocation, then it must match the named
120 portorservice.
121
122 section
123 Added in Shorewall 5.1.1. When specified, this option causes
124 the rules file section name and a comma to be prepended to the
125 parameters passed to the action (if any). Note that this means
126 that the first parameter passed to the action by the user is
127 actually the second parameter to the action. If the action is
128 invoked out of the blrules file, 'BLACKLIST' is used as the
129 section name.
130
131 Given that neither the snat nor the mangle file is sectioned,
132 this parameter has no effect when mangle or nat is specified.
133
134 state={UNTRACKED|NEW|ESTABLISHED|RELATED|INVALID}
135 Added in Shorewall 5.0.7. Reserved for use by Shorewall in
136 actions.std.
137
138 terminating
139 Added in Shorewall 4.6.4. When used with builtin, indicates
140 that the built-in action is termiating (i.e., if the action is
141 jumped to, the next rule in the chain is not evaluated).
142
144 /etc/shorewall/actions
145
146 /etc/shorewall6/actions
147
149 https://shorewall.org/Actions.html[4]
150
151 shorewall(8)
152
154 1. shorewall-rules(5)
155 https://shorewall.org/manpages/shorewall-rules.html
156
157 2. shorewall-mangle(5)
158 https://shorewall.org/manpages/shorewall-mangle.html
159
160 3. shorewall-snat(5)
161 https://shorewall.org/manpages/shorewall-snat.html
162
163 4. https://shorewall.org/Actions.html
164 https://shorewall.org/Actions.html
165
166
167
168Configuration Files 09/24/2020 SHOREWALL-ACTIONS(5)