'\" t .\" Title: shorewall-actions .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 09/24/2020 .\" Manual: Configuration Files .\" Source: Configuration Files .\" Language: English .\" .TH "SHOREWALL\-ACTIONS" "5" "09/24/2020" "Configuration Files" "Configuration Files" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" actions \- Shorewall action declaration file .SH "SYNOPSIS" .HP \w'\fB/etc/shorewall[6]/actions\fR\ 'u \fB/etc/shorewall[6]/actions\fR .SH "DESCRIPTION" .PP This file allows you to define new ACTIONS for use in rules (see \m[blue]\fBshorewall\-rules(5)\fR\m[]\&\s-2\u[1]\d\s+2)\&. You define the iptables rules to be performed in an ACTION in /etc/shorewall/action\&.\fIaction\-name\fR\&. .PP Columns are: .PP NAME .RS 4 The name of the action\&. ACTION names should begin with an upper\-case letter to distinguish them from Shorewall\-generated chain names and be composed of letters, digits or numbers\&. If you intend to log from the action then the name must be no longer than 11 characters in length if you use the standard LOGFORMAT\&. .RE .PP OPTIONS .RS 4 Added in Shorewall 4\&.5\&.10\&. Available options are: .PP \fBaudit\fR .RS 4 Added in Shorewall 5\&.0\&.7\&. When this option is specified, the action is expected to have at least two parameters; the first is a target and the second is either \*(Aqaudit\*(Aq or omitted\&. If the second is \*(Aqaudit\*(Aq, then the first must be an auditable target (ACCEPT, DROP or REJECT)\&. .RE .PP \fBbuiltin\fR .RS 4 Added in Shorewall 4\&.5\&.16\&. Defines the action as a rule target that is supported by your iptables but is not directly supported by Shorewall\&. The action may be used as the rule target in an INLINE rule in \m[blue]\fBshorewall\-rules\fR\m[]\&\s-2\u[1]\d\s+2(5)\&. .sp Beginning with Shorewall 4\&.6\&.0, the Netfilter table(s) in which the \fBbuiltin\fR can be used may be specified: \fBfilter\fR, \fBnat\fR, \fBmangle\fR and \fBraw\fR\&. If no table name(s) are given, then \fBfilter\fR is assumed\&. The table names follow \fBbuiltin\fR and are separated by commas; for example, "FOOBAR builtin,filter,mangle" would specify FOOBAR as a builtin target that can be used in the filter and mangle tables\&. .sp Beginning with Shorewall 4\&.6\&.4, you may specify the \fBterminating\fR option with \fBbuiltin\fR to indicate to the Shorewall optimizer that the action is terminating (the current packet will not be passed to the next rule in the chain)\&. .RE .PP \fBinline\fR .RS 4 Causes the action body (defined in action\&.\fIaction\-name\fR) to be expanded in\-line like a macro rather than in its own chain\&. You can list Shorewall Standard Actions in this file to specify the \fBinline\fR option\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br Some of the Shorewall standard actions cannot be used in\-line and will generate a warning and the compiler will ignore \fBinline\fR if you try to use them that way: .RS 4 DropSmurfs .RE .RS 4 IfEvent .RE .RS 4 Invalid (Prior to Shorewall 4\&.5\&.13) .RE .RS 4 NotSyn (Prior to Shorewall 4\&.5\&.13) .RE .RS 4 RST (Prior to Shorewall 4\&.5\&.13) .RE .RS 4 TCPFlags .RE .sp .5v .RE .RE .PP \fBlogjump\fR .RS 4 Added in Shorewall 5\&.0\&.8\&. Performs the same function as \fBnolog\fR (below), with the addition that the jump to the actions chain is logged if a log level is specified on the action invocation\&. For inline actions, this option is identical to \fBnolog\fR\&. .RE .PP \fBmangle\fR .RS 4 Added in Shorewall 5\&.0\&.7\&. Specifies that this action is to be used in \m[blue]\fBshorewall\-mangle(5)\fR\m[]\&\s-2\u[2]\d\s+2 rather than \m[blue]\fBshorewall\-rules(5)\fR\m[]\&\s-2\u[1]\d\s+2\&. .RE .PP \fBnat\fR .RS 4 Added in Shorewall 5\&.0\&.13\&. Specifies that this action is to be used in \m[blue]\fBshorewall\-snat(5)\fR\m[]\&\s-2\u[3]\d\s+2 rather than \m[blue]\fBshorewall\-rules(5)\fR\m[]\&\s-2\u[1]\d\s+2\&. The \fBmangle\fR and \fBnat\fR options are mutually exclusive\&. .RE .PP \fBnoinline\fR .RS 4 Causes any later \fBinline\fR option for the same action to be ignored with a warning\&. .RE .PP \fBnolog\fR .RS 4 Added in Shorewall 4\&.5\&.11\&. When this option is specified, the compiler does not automatically apply the log level and/or tag from the invocation of the action to all rules inside of the action\&. Rather, it simply sets the $_loglevel and $_logtag shell variables which can be used within the action body to apply those logging options only to a subset of the rules\&. .RE .PP \fBproto\fR=\fIprotocol\fR .RS 4 Added in Shorewall 5\&.1\&.10\&. Specifies that the action is only usable with the specified \fIprotocol\fR (name or number)\&. When the action is invoked with no protocol specified in the PROTO column, or if the action is used as a Policy Action, the named \fIprotocol\fR will be assumed\&. If a protocol is specified in the PROTO column of an invocation, then it must match the named \fIprotocol\fR\&. .sp The \fBproto\fR option has no effect if the \fBinline\fR or \fBbuiltin\fR option is specified\&. A warning is issued if \fBproto\fR is specified along with \fBbuiltin\fR\&. .RE .PP \fBdport\fR=\fIportorservice\fR .RS 4 Added in Shorewall 5\&.2\&.6\&. Requires that the \fBproto\fR option be previously given and indicates that this action may only be applied to flows with the specified \fIprotocol\fR and \fIportorservice\fR\&. \fIportorservice\fR may be a valid port number or the name of a service defined in /etc/services to be usable with the specified \fIprotocol\fR\&. If a port or service is specified in the DPORT column of an invocation, then it must match the named \fIportorservice\fR\&. .RE .PP \fBsection\fR .RS 4 Added in Shorewall 5\&.1\&.1\&. When specified, this option causes the rules file section name and a comma to be prepended to the parameters passed to the action (if any)\&. Note that this means that the first parameter passed to the action by the user is actually the second parameter to the action\&. If the action is invoked out of the blrules file, \*(AqBLACKLIST\*(Aq is used as the section name\&. .sp Given that neither the snat nor the mangle file is sectioned, this parameter has no effect when \fBmangle\fR or \fBnat\fR is specified\&. .RE .PP \fBstate\fR={\fBUNTRACKED\fR|\fBNEW\fR|\fBESTABLISHED\fR|\fBRELATED\fR|\fBINVALID\fR} .RS 4 Added in Shorewall 5\&.0\&.7\&. Reserved for use by Shorewall in actions\&.std\&. .RE .PP \fBterminating\fR .RS 4 Added in Shorewall 4\&.6\&.4\&. When used with \fBbuiltin\fR, indicates that the built\-in action is termiating (i\&.e\&., if the action is jumped to, the next rule in the chain is not evaluated)\&. .RE .RE .SH "FILES" .PP /etc/shorewall/actions .PP /etc/shorewall6/actions .SH "SEE ALSO" .PP \m[blue]\fBhttps://shorewall\&.org/Actions\&.html\fR\m[]\&\s-2\u[4]\d\s+2 .PP shorewall(8) .SH "NOTES" .IP " 1." 4 shorewall-rules(5) .RS 4 \%https://shorewall.org/manpages/shorewall-rules.html .RE .IP " 2." 4 shorewall-mangle(5) .RS 4 \%https://shorewall.org/manpages/shorewall-mangle.html .RE .IP " 3." 4 shorewall-snat(5) .RS 4 \%https://shorewall.org/manpages/shorewall-snat.html .RE .IP " 4." 4 https://shorewall.org/Actions.html .RS 4 \%https://shorewall.org/Actions.html .RE