'\" t .\" Title: shorewall-rules .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 06/28/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "SHOREWALL\-RULES" "5" "06/28/2012" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * 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" rules \- Shorewall rules file .SH "SYNOPSIS" .HP \w'\fB/etc/shorewall/rules\fR\ 'u \fB/etc/shorewall/rules\fR .SH "DESCRIPTION" .PP Entries in this file govern connection establishment by defining exceptions to the policies layed out in \m[blue]\fBshorewall\-policy\fR\m[]\&\s-2\u[1]\d\s+2(5)\&. By default, subsequent requests and responses are automatically allowed using connection tracking\&. For any particular (source,dest) pair of zones, the rules are evaluated in the order in which they appear in this file and the first terminating match is the one that determines the disposition of the request\&. All rules are terminating except LOG and COUNT rules\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBWarning\fR .ps -1 .br .PP If you masquerade or use SNAT from a local system to the internet, you cannot use an ACCEPT rule to allow traffic from the internet to that system\&. You \fBmust\fR use a DNAT rule instead\&. .sp .5v .RE .PP The rules file is divided into sections\&. Each section is introduced by a "Section Header" which is a line beginning with SECTION and followed by the section name\&. .PP Sections are as follows and must appear in the order listed: .PP \fBALL\fR .RS 4 This section was added in Shorewall 4\&.4\&.23\&. Rules in this section are applied, regardless of the connection tracking state of the packet\&. .RE .PP \fBESTABLISHED\fR .RS 4 Packets in the ESTABLISHED state are processed by rules in this section\&. .sp The only ACTIONs allowed in this section are ACCEPT, DROP, REJECT, LOG and QUEUE .sp There is an implicit ACCEPT rule inserted at the end of this section\&. .RE .PP \fBRELATED\fR .RS 4 Packets in the RELATED state are processed by rules in this section\&. .sp The only ACTIONs allowed in this section are ACCEPT, DROP, REJECT, LOG and QUEUE .sp There is an implicit ACCEPT rule inserted at the end of this section\&. .RE .PP \fBNEW\fR .RS 4 Packets in the NEW, INVALID and UNTRACKED states are processed by rules in this section\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP If you are not familiar with Netfilter to the point where you are comfortable with the differences between the various connection tracking states, then it is suggested that you omit the \fBESTABLISHED\fR and \fBRELATED\fR sections and place all of your non\-blacklisting rules in the NEW section (That\*(Aqs after the line that reads SECTION NEW\*(Aq)\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBWarning\fR .ps -1 .br .PP If you specify FASTACCEPT=Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) then the \fBALL, ESTABLISHED\fR and \fBRELATED\fR sections must be empty\&. .PP An except is made if you are running Shorewall 4\&.4\&.27 or later and you have specified a non\-defualt value for RELATED_DISPOSITION or RELATED_LOG_LEVEL\&. In that case, you may have rules in the RELATED section of this file\&. .sp .5v .RE .PP You may omit any section that you don\*(Aqt need\&. If no Section Headers appear in the file then all rules are assumed to be in the NEW section\&. .PP When defining rules that rewrite the destination IP address and/or port number (namely DNAT and REDIRECT rules), it is important to keep straight which columns in the file specify the packet before rewriting and which specify how the packet will look after rewriting\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The DEST column specifies the final destination for the packet after rewriting and can include the final IP address and/or port number\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The remaining columns specify characteristics of the packet before rewriting\&. In particular, the ORIGINAL DEST column gives the original destination IP address of the packet and the DEST PORT(S) column give the original destination port(s)\&. .RE .PP The columns in the file are as follows (where the column name is followed by a different name in parentheses, the different name is used in the alternate specification syntax)\&. .PP \fBACTION\fR \- \fB\fItarget\fR\fR\fB[:\fR{\fIlog\-level\fR|\fBnone\fR}[\fB\fB!\fR\fR][\fB:\fR\fItag\fR]] .RS 4 Specifies the action to be taken if the connection request matches the rule\&. \fItarget\fR must be one of the following\&. .PP \fBACCEPT\fR .RS 4 Allow the connection request\&. .RE .PP \fBACCEPT+\fR .RS 4 like ACCEPT but also excludes the connection from any subsequent matching \fBDNAT\fR[\fB\-\fR] or \fBREDIRECT\fR[\fB\-\fR] rules\&. .RE .PP \fBACCEPT!\fR .RS 4 like ACCEPT but exempts the rule from being suppressed by OPTIMIZE=1 in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .RE .PP A_ACCEPT, A_ACCEPT+ and A_ACCEPT! .RS 4 Added in Shorewall 4\&.4\&.20\&. Audited versions of ACCEPT, ACCEPT+ and ACCEPT! respectively\&. Require AUDIT_TARGET support in the kernel and iptables\&. .RE .PP \fBNONAT\fR .RS 4 Excludes the connection from any subsequent \fBDNAT\fR[\-] or \fBREDIRECT\fR[\-] rules but doesn\*(Aqt generate a rule to accept the traffic\&. .RE .PP \fBDROP\fR .RS 4 Ignore the request\&. .RE .PP \fBDROP!\fR .RS 4 like DROP but exempts the rule from being suppressed by OPTIMIZE=1 in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .RE .PP A_DROP and A_DROP! .RS 4 Added in Shorewall 4\&.4\&.20\&. Audited versions of DROP and DROP! respectively\&. Require AUDIT_TARGET support in the kernel and iptables\&. .RE .PP \fBREJECT\fR .RS 4 disallow the request and return an icmp\-unreachable or an RST packet\&. .RE .PP \fBREJECT!\fR .RS 4 like REJECT but exempts the rule from being suppressed by OPTIMIZE=1 in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .RE .PP A_REJECT AND A_REJECT! .RS 4 Added in Shorewall 4\&.4\&.20\&. Audited versions of REJECT and REJECT! respectively\&. Require AUDIT_TARGET support in the kernel and iptables\&. .RE .PP \fBDNAT\fR .RS 4 Forward the request to another system (and optionally another port)\&. .RE .PP \fBDNAT\-\fR .RS 4 Advanced users only\&. .sp Like \fBDNAT\fR but only generates the \fBDNAT\fR iptables rule and not the companion \fBACCEPT\fR rule\&. .RE .PP \fBREDIRECT\fR .RS 4 Redirect the request to a server running on the firewall\&. .RE .PP \fBREDIRECT\-\fR .RS 4 Advanced users only\&. .sp Like \fBREDIRECT\fR but only generates the \fBREDIRECT\fR iptables rule and not the companion \fBACCEPT\fR rule\&. .RE .PP \fBCONTINUE\fR .RS 4 For experts only\&. .sp Do not process any of the following rules for this (source zone,destination zone)\&. If the source and/or destination IP address falls into a zone defined later in \m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[3]\d\s+2(5) or in a parent zone of the source or destination zones, then this connection request will be passed to the rules defined for that (those) zone(s)\&. See \m[blue]\fBshorewall\-nesting\fR\m[]\&\s-2\u[4]\d\s+2(5) for additional information\&. .RE .PP \fBCONTINUE!\fR .RS 4 like CONTINUE but exempts the rule from being suppressed by OPTIMIZE=1 in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .RE .PP \fBLOG\fR .RS 4 Simply log the packet and continue with the next rule\&. .RE .PP \fBQUEUE\fR .RS 4 Queue the packet to a user\-space application such as ftwall (http://p2pwall\&.sf\&.net)\&. The application may reinsert the packet for further processing\&. .RE .PP \fBQUEUE!\fR .RS 4 like QUEUE but exempts the rule from being suppressed by OPTIMIZE=1 in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .RE .PP \fBNFLOG\fR[(\fInflog\-parameters\fR)] .RS 4 queues matching packets to a backend logging daemon via a netlink socket then continues to the next rule\&. See \m[blue]\fBhttp://www\&.shorewall\&.net/shorewall_logging\&.html\fR\m[]\&\s-2\u[5]\d\s+2\&. .RE .PP \fBNFQUEUE\fR[(\fIqueuenumber\fR)] .RS 4 Queues the packet to a user\-space application using the nfnetlink_queue mechanism\&. If a \fIqueuenumber\fR is not specified, queue zero (0) is assumed\&. .RE .PP \fBNFQUEUE![(\fR\fB\fIqueuenumber\fR\fR\fB)]\fR .RS 4 like NFQUEUE but exempts the rule from being suppressed by OPTIMIZE=1 in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .RE .PP \fBCOUNT\fR .RS 4 Simply increment the rule\*(Aqs packet and byte count and pass the packet to the next rule\&. .RE .PP \fBCOMMENT\fR .RS 4 the rest of the line will be attached as a comment to the Netfilter rule(s) generated by the following entries\&. The comment will appear delimited by "/* \&.\&.\&. */" in the output of "shorewall show "\&. To stop the comment from being attached to further rules, simply include COMMENT on a line by itself\&. .RE .PP \fIaction\fR .RS 4 The name of an \fIaction\fR declared in \m[blue]\fBshorewall\-actions\fR\m[]\&\s-2\u[6]\d\s+2(5) or in /usr/share/shorewall/actions\&.std\&. .RE .PP \fImacro\fR\fB[(\fR\fB\fImacrotarget\fR\fR\fB)]\fR .RS 4 The name of a macro defined in a file named macro\&.\fImacro\fR\&. If the macro accepts an action parameter (Look at the macro source to see if it has PARAM in the TARGET column) then the \fImacro\fR name is followed by the parenthesized \fImacrotarget\fR (\fBACCEPT\fR, \fBDROP\fR, \fBREJECT\fR, \&.\&.\&.) to be substituted for the parameter\&. .sp Example: FTP(ACCEPT)\&. .sp The older syntax where the macro name and the target are separated by a slash (e\&.g\&. FTP/ACCEPT) is still allowed but is deprecated\&. .RE .PP \fBADD(\fR\fB\fIipset\fR\fR\fB:\fR\fB\fIflags\fR\fR\fB)\fR .RS 4 Added in Shorewall 4\&.4\&.12\&. Causes addresses and/or port numbers to be added to the named \fIipset\fR\&. The \fIflags\fR specify the address or tupple to be added to the set and must match the type of ipset involved\&. For example, for an iphash ipset, either the SOURCE or DESTINATION address can be added using \fIflags\fR \fBsrc\fR or \fBdst\fR respectively (see the \-A command in ipset (8))\&. .sp ADD is non\-terminating\&. Even if a packet matches the rule, it is passed on to the next rule\&. .RE .PP \fBDEL(\fR\fB\fIipset\fR\fR\fB:\fR\fB\fIflags\fR\fR\fB)\fR .RS 4 Added in Shorewall 4\&.4\&.12\&. Causes an entry to be deleted from the named \fIipset\fR\&. The \fIflags\fR specify the address or tupple to be deleted from the set and must match the type of ipset involved\&. For example, for an iphash ipset, either the SOURCE or DESTINATION address can be deletec using \fIflags\fR \fBsrc\fR or \fBdst\fR respectively (see the \-D command in ipset (8))\&. .sp DEL is non\-terminating\&. Even if a packet matches the rule, it is passed on to the next rule\&. .RE .sp The \fItarget\fR may optionally be followed by ":" and a syslog log level (e\&.g, REJECT:info or Web(ACCEPT):debug)\&. This causes the packet to be logged at the specified level\&. Note that if the \fBACTION\fR involves destination network address translation (DNAT, REDIRECT, etc\&.) then the packet is logged \fBbefore\fR the destination address is rewritten\&. .sp If the \fBACTION\fR names an \fIaction\fR declared in \m[blue]\fBshorewall\-actions\fR\m[]\&\s-2\u[6]\d\s+2(5) or in /usr/share/shorewall/actions\&.std then: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If the log level is followed by "!\*(Aq then all rules in the action are logged at the log level\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If the log level is not followed by "!" then only those rules in the action that do not specify logging are logged at the specified level\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The special log level \fBnone!\fR suppresses logging by the action\&. .RE .sp You may also specify \fBULOG\fR or \fBNFLOG\fR (must be in upper case) as a log level\&.This will log to the ULOG or NFLOG target for routing to a separate log through use of ulogd (\m[blue]\fBhttp://www\&.netfilter\&.org/projects/ulogd/index\&.html\fR\m[])\&. .sp Actions specifying logging may be followed by a log tag (a string of alphanumeric characters) which is appended to the string generated by the LOGPREFIX (in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5))\&. .sp Example: ACCEPT:info:ftp would include \*(Aqftp \*(Aq at the end of the log prefix generated by the LOGPREFIX setting\&. .RE .PP \fBSOURCE\fR \- {\fIzone\fR|\fIzone\-list\fR[+]|{\fBall\fR|\fBany\fR}[\fB+\fR][\fB\-\fR]}\fB[:\fR\fIinterface\fR][\fB:\fR{\fIaddress\-or\-range\fR[,\fIaddress\-or\-range\fR]\&.\&.\&.[\fIexclusion\fR]|\fIexclusion\fR|\fB+\fR\fIipset\fR|\fI^countrycode\-list\fR} .RS 4 Source hosts to which the rule applies\&. May be a \fIzone\fR declared in /etc/shorewall/zones, \fB$FW\fR to indicate the firewall itself, \fBall\fR, \fBall+\fR, \fBall\-\fR, \fBall+\-\fR or \fBnone\fR\&. .sp Beginning with Shorewall 4\&.4\&.13, you may use a \fIzone\-list \fRwhich consists of a comma\-separated list of zones declared in \m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[3]\d\s+2 (5)\&. Ths \fIzone\-list\fR may be optionally followed by "+" to indicate that the rule is to apply to intra\-zone traffic as well as inter\-zone traffic\&. .sp When \fBnone\fR is used either in the \fBSOURCE\fR or \fBDEST\fR column, the rule is ignored\&. .sp \fBall\fR means "All Zones", including the firewall itself\&. \fBall\-\fR means "All Zones, except the firewall itself"\&. When \fBall\fR[\fB\-\fR] is used either in the \fBSOURCE\fR or \fBDEST\fR column intra\-zone traffic is not affected\&. When \fBall+\fR[\fB\-\fR] is "used, intra\-zone traffic is affected\&. Beginning with Shorewall 4\&.4\&.13, exclusion is supported \-\- see see \m[blue]\fBshorewall\-exclusion\fR\m[]\&\s-2\u[7]\d\s+2(5)\&. .sp Except when \fBall\fR[\fB+\fR][\fB\-\fR] or \fBany\fR[\fB+\fR][\fB\-\fR] is specified, clients may be further restricted to a list of networks and/or hosts by appending ":" and a comma\-separated list of network and/or host addresses\&. Hosts may be specified by IP or MAC address; mac addresses must begin with "~" and must use "\-" as a separator\&. .sp The above restriction on \fBall\fR[\fB+\fR][\fB\-\fR] and \fBany\fR[\fB+\fR][\fB\-\fR] is removed in Shorewall\-4\&.4\&.13\&. .sp \fBany\fR is equivalent to \fBall\fR when there are no nested zones\&. When there are nested zones, \fBany\fR only refers to top\-level zones (those with no parent zones)\&. Note that \fBany\fR excludes all vserver zones, since those zones are nested within the firewall zone\&. .sp Hosts may also be specified as an IP address range using the syntax \fIlowaddress\fR\-\fIhighaddress\fR\&. This requires that your kernel and iptables contain iprange match support\&. If your kernel and iptables have ipset match support then you may give the name of an ipset prefaced by "+"\&. The ipset name may be optionally followed by a number from 1 to 6 enclosed in square brackets ([]) to indicate the number of levels of source bindings to be matched\&. .sp Beginning with Shorewall 4\&.4\&.17, the primary IP address of a firewall interface can be specified by an apersand (\*(Aq&\*(Aq) followed by the logican name of the interface as found in the INTERFACE column of \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[8]\d\s+2 (5)\&. .sp Beginning with Shorewall 4\&.5\&.4, A \fIcountrycode\-list\fR may be specified\&. A countrycode\-list is a comma\-separated list of up to 15 two\-character ISO\-3661 country codes enclosed in square brackets (\*(Aq[\&.\&.\&.]\*(Aq) and preceded by a caret (\*(Aq^\*(Aq)\&. When a single country code is given, the square brackets may be omitted\&. A list of country codes supported by Shorewall may be found at \m[blue]\fBhttp://www\&.shorewall\&.net/ISO\-3661\&.html\fR\m[]\&. Specifying a \fIcountrycode\-list\fR requires GeoIP Match support in your iptables and Kernel\&. .sp You may exclude certain hosts from the set already defined through use of an \fIexclusion\fR (see \m[blue]\fBshorewall\-exclusion\fR\m[]\&\s-2\u[7]\d\s+2(5))\&. .sp Examples: .PP dmz:192\&.168\&.2\&.2 .RS 4 Host 192\&.168\&.2\&.2 in the DMZ .RE .PP net:155\&.186\&.235\&.0/24 .RS 4 Subnet 155\&.186\&.235\&.0/24 on the Internet .RE .PP loc:192\&.168\&.1\&.1,192\&.168\&.1\&.2 .RS 4 Hosts 192\&.168\&.1\&.1 and 192\&.168\&.1\&.2 in the local zone\&. .RE .PP loc:~00\-A0\-C9\-15\-39\-78 .RS 4 Host in the local zone with MAC address 00:A0:C9:15:39:78\&. .RE .PP net:192\&.0\&.2\&.11\-192\&.0\&.2\&.17 .RS 4 Hosts 192\&.0\&.2\&.11\-192\&.0\&.2\&.17 in the net zone\&. .RE .PP net:!192\&.0\&.2\&.11\-192\&.0\&.2\&.17 .RS 4 All hosts in the net zone except for 192\&.0\&.2\&.11\-192\&.0\&.2\&.17\&. .RE .PP net:155\&.186\&.235\&.0/24!155\&.186\&.235\&.16/28 .RS 4 Subnet 155\&.186\&.235\&.0/24 on the Internet except for 155\&.186\&.235\&.16/28 .RE .PP $FW:ð0 .RS 4 The primary IP address of eth0 in the firewall zone (Shorewall 4\&.4\&.17 and later)\&. .RE .RE .PP \fBDEST\fR \- {\fIzone\fR|\fIzone\-list\fR[+]|{\fBall\fR|\fBany\fR}[\fB+\fR][\fB\-\fR]}\fB[:{\fR\fIinterface\fR|\fIaddress\-or\-range\fR[,\fIaddress\-or\-range\fR]\&.\&.\&.[\fIexclusion\fR]|\fIexclusion\fR|\fB+\fR\fIipset\fR|\fI^countrycode\-list\fR}][\fB:\fR\fIport\fR[:\fBrandom\fR]] .RS 4 Location of Server\&. May be a zone declared in \m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[3]\d\s+2(5), $\fBFW\fR to indicate the firewall itself, \fBall\fR\&. \fBall+\fR or \fBnone\fR\&. .sp Beginning with Shorewall 4\&.4\&.13, you may use a \fIzone\-list \fRwhich consists of a comma\-separated list of zones declared in \m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[3]\d\s+2 (5)\&. Ths \fIzone\-list\fR may be optionally followed by "+" to indicate that the rule is to apply to intra\-zone traffic as well as inter\-zone traffic\&. .sp Beginning with Shorewall 4\&.5\&.4, A \fIcountrycode\-list\fR may be specified\&. A countrycode\-list is a comma\-separated list of up to 15 two\-character ISO\-3661 country codes enclosed in square brackets (\*(Aq[\&.\&.\&.]\*(Aq) and preceded by a caret (\*(Aq^\*(Aq)\&. When a single country code is given, the square brackets may be omitted\&. A list of country codes supported by Shorewall may be found at \m[blue]\fBhttp://www\&.shorewall\&.net/ISO\-3661\&.html\fR\m[]\&. Specifying a \fIcountrycode\-list\fR requires GeoIP Match support in your iptables and Kernel\&. .sp When \fBnone\fR is used either in the \fBSOURCE\fR or \fBDEST\fR column, the rule is ignored\&. .sp When \fBall\fR is used either in the \fBSOURCE\fR or \fBDEST\fR column intra\-zone traffic is not affected\&. When \fBall+\fR is used, intra\-zone traffic is affected\&. Beginning with Shorewall 4\&.4\&.13, exclusion is supported \-\- see see \m[blue]\fBshorewall\-exclusion\fR\m[]\&\s-2\u[7]\d\s+2(5)\&. .sp \fBany\fR is equivalent to \fBall\fR when there are no nested zones\&. When there are nested zones, \fBany\fR only refers to top\-level zones (those with no parent zones)\&. .sp The \fIzone\fR should be omitted in DNAT\-, REDIRECT\- and NONAT rules\&. .sp If the DEST \fIzone\fR is a bport zone, then either: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} the SOURCE must be \fBall[+][\-]\fR, or .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} the SOURCE \fIzone\fR must be another bport zone associated with the same bridge, or .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} the SOURCE \fIzone\fR must be an ipv4 zone that is associated with only the same bridge\&. .RE .sp .sp Except when \fBall\fR[\fB+]|[\-\fR] is specified, the server may be further restricted to a particular network, host or interface by appending ":" and the network, host or interface\&. See \fBSOURCE\fR above\&. .sp You may exclude certain hosts from the set already defined through use of an \fIexclusion\fR (see \m[blue]\fBshorewall\-exclusion\fR\m[]\&\s-2\u[7]\d\s+2(5))\&. .sp Restrictions: .sp 1\&. MAC addresses are not allowed (this is a Netfilter restriction)\&. .sp 2\&. You may not specify both an interface and an address\&. .sp Like in the \fBSOURCE\fR column, you may specify a range of IP addresses using the syntax \fIlowaddress\fR\-\fIhighaddress\fR\&. When the \fBACTION\fR is \fBDNAT\fR or \fBDNAT\-\fR, the connections will be assigned to addresses in the range in a round\-robin fashion\&. .sp If you kernel and iptables have ipset match support then you may give the name of an ipset prefaced by "+"\&. The ipset name may be optionally followed by a number from 1 to 6 enclosed in square brackets ([]) to indicate the number of levels of destination bindings to be matched\&. Only one of the \fBSOURCE\fR and \fBDEST\fR columns may specify an ipset name\&. .sp Beginning with Shorewall 4\&.4\&.17, the primary IP address of a firewall interface can be specified by an apersand (\*(Aq&\*(Aq) followed by the logical name of the interface as found in the INTERFACE column of \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[8]\d\s+2 (5)\&. .sp The \fIport\fR that the server is listening on may be included and separated from the server\*(Aqs IP address by ":"\&. If omitted, the firewall will not modifiy the destination port\&. A destination port may only be included if the \fBACTION\fR is \fBDNAT\fR or \fBREDIRECT\fR\&. .PP Example: .RS 4 \fBloc:192\&.168\&.1\&.3:3128\fR specifies a local server at IP address 192\&.168\&.1\&.3 and listening on port 3128\&. .RE .sp The \fIport\fR may be specified as a service name\&. You may specify a port range in the form \fIlowport\-highport\fR to cause connections to be assigned to ports in the range in round\-robin fashion\&. When a port range is specified, \fIlowport\fR and \fIhighport\fR must be given as integers; service names are not permitted\&. Additionally, the port range may be optionally followed by \fB:random\fR which causes assignment to ports in the list to be random\&. .sp If the \fBACTION\fR is \fBREDIRECT\fR or \fBREDIRECT\-\fR, this column needs only to contain the port number on the firewall that the request should be redirected to\&. That is equivalent to specifying \fB$FW\fR::\fIport\fR\&. .RE .PP \fBPROTO\fR\- {\fB\-\fR|\fBtcp:syn\fR|\fBipp2p\fR|\fBipp2p:udp\fR|\fBipp2p:all\fR|\fIprotocol\-number\fR|\fIprotocol\-name\fR|\fBall}\fR .RS 4 Optional Protocol \- \fBipp2p\fR* requires ipp2p match support in your kernel and iptables\&. \fBtcp:syn\fR implies \fBtcp\fR plus the SYN flag must be set and the RST,ACK and FIN flags must be reset\&. .sp Beginning with Shorewall 4\&.4\&.19, this column can contain a comma\-separated list of protocol\-numbers and/or protocol names\&. .RE .PP \fBDEST PORT(S) (dport)\fR \- {\fB\-\fR|\fIport\-name\-number\-or\-range\fR[\fB,\fR\fIport\-name\-number\-or\-range\fR]\&.\&.\&.} .RS 4 Optional destination Ports\&. A comma\-separated list of Port names (from services(5)), port numbers or port ranges; if the protocol is \fBicmp\fR, this column is interpreted as the destination icmp\-type(s)\&. ICMP types may be specified as a numeric type, a numberic type and code separated by a slash (e\&.g\&., 3/4), or a typename\&. See \m[blue]\fBhttp://www\&.shorewall\&.net/configuration_file_basics\&.htm#ICMP\fR\m[]\&. Note that prior to Shorewall 4\&.4\&.19, only a single ICMP type may be listsed\&. .sp If the protocol is \fBipp2p\fR, this column is interpreted as an ipp2p option without the leading "\-\-" (example \fBbit\fR for bit\-torrent)\&. If no port is given, \fBipp2p\fR is assumed\&. .sp A port range is expressed as \fIlowport\fR:\fIhighport\fR\&. .sp This column is ignored if \fBPROTO\fR = \fBall\fR but must be entered if any of the following columns are supplied\&. In that case, it is suggested that this field contain a dash (\fB\-\fR)\&. .sp If your kernel contains multi\-port match support, then only a single Netfilter rule will be generated if in this list and the \fBCLIENT PORT(S)\fR list below: .sp 1\&. There are 15 or less ports listed\&. .sp 2\&. No port ranges are included or your kernel and iptables contain extended multiport match support\&. .RE .PP \fBSOURCE PORT(S)\fR (sport) \- {\fB\-\fR|\fIport\-name\-number\-or\-range\fR[\fB,\fR\fIport\-name\-number\-or\-range\fR]\&.\&.\&.} .RS 4 Optional port(s) used by the client\&. If omitted, any source port is acceptable\&. Specified as a comma\- separated list of port names, port numbers or port ranges\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBWarning\fR .ps -1 .br Unless you really understand IP, you should leave this column empty or place a dash (\fB\-\fR) in the column\&. Most people who try to use this column get it wrong\&. .sp .5v .RE If you don\*(Aqt want to restrict client ports but need to specify an \fBORIGINAL DEST\fR in the next column, then place "\-" in this column\&. .sp If your kernel contains multi\-port match support, then only a single Netfilter rule will be generated if in this list and the \fBDEST PORT(S)\fR list above: .sp 1\&. There are 15 or less ports listed\&. .sp 2\&. No port ranges are included or your kernel and iptables contain extended multiport match support\&. .RE .PP \fBORIGINAL DEST\fR (origdest) \- [\fB\-\fR|\fIaddress\fR[,\fIaddress\fR]\&.\&.\&.[\fIexclusion\fR]|\fIexclusion\fR] .RS 4 Optional\&. If ACTION is \fBDNAT\fR[\fB\-\fR] or \fBREDIRECT\fR[\fB\-\fR] then if this column is included and is different from the IP address given in the \fBDEST\fR column, then connections destined for that address will be forwarded to the IP and port specified in the \fBDEST\fR column\&. .sp A comma\-separated list of addresses may also be used\&. This is most useful with the \fBREDIRECT\fR target where you want to redirect traffic destined for particular set of hosts\&. Finally, if the list of addresses begins with "!" (\fIexclusion\fR) then the rule will be followed only if the original destination address in the connection request does not match any of the addresses listed\&. .sp Beginning with Shorewall 4\&.4\&.17, the primary IP address of a firewall interface can be specified by an apersand (\*(Aq&\*(Aq) followed by the logical name of the interface as found in the INTERFACE column of \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[8]\d\s+2 (5)\&. .sp For other actions, this column may be included and may contain one or more addresses (host or network) separated by commas\&. Address ranges are not allowed\&. When this column is supplied, rules are generated that require that the original destination address matches one of the listed addresses\&. This feature is most useful when you want to generate a filter rule that corresponds to a \fBDNAT\-\fR or \fBREDIRECT\-\fR rule\&. In this usage, the list of addresses should not begin with "!"\&. .sp It is also possible to specify a set of addresses then exclude part of those addresses\&. For example, \fB192\&.168\&.1\&.0/24!192\&.168\&.1\&.16/28\fR specifies the addresses 192\&.168\&.1\&.0\-182\&.168\&.1\&.15 and 192\&.168\&.1\&.32\-192\&.168\&.1\&.255\&. See \m[blue]\fBshorewall\-exclusion\fR\m[]\&\s-2\u[7]\d\s+2(5)\&. .sp See \m[blue]\fBhttp://shorewall\&.net/PortKnocking\&.html\fR\m[]\&\s-2\u[9]\d\s+2 for an example of using an entry in this column with a user\-defined action rule\&. .RE .PP \fBRATE LIMIT\fR (rate) \- [\fB\-\fR|[{\fIs\fR|\fBd\fR}:[[\fIname\fR]:]]]\fIrate\fR\fB/\fR{\fBsec\fR|\fBmin\fR|\fBhour\fR|\fBday\fR}[:\fIburst\fR] .RS 4 You may optionally rate\-limit the rule by placing a value in this column: .sp \fIrate\fR is the number of connections per interval (\fBsec\fR or \fBmin\fR) and \fIburst\fR is the largest burst permitted\&. If no \fIburst\fR is given, a value of 5 is assumed\&. There may be no no whitespace embedded in the specification\&. .sp Example: \fB10/sec:20\fR .sp When \fBs:\fR or \fBd:\fR is specified, the rate applies per source IP address or per destination IP address respectively\&. The \fIname\fR may be chosen by the user and specifies a hash table to be used to count matching connections\&. If not given, the name \fBshorewallN\fR (where N is a unique integer) is assumed\&. Where more than one rule specifies the same name, the connections counts for the rules are aggregated and the individual rates apply to the aggregated count\&. .sp Example: \fBs:ssh:3/min:5\fR .RE .PP \fBUSER/GROUP\fR (user) \- [\fB!\fR][\fIuser\-name\-or\-number\fR][\fB:\fR\fIgroup\-name\-or\-number\fR][\fB+\fR\fIprogram\-name\fR] .RS 4 This optional column may only be non\-empty if the SOURCE is the firewall itself\&. .sp When this column is non\-empty, the rule applies only if the program generating the output is running under the effective \fIuser\fR and/or \fIgroup\fR specified (or is NOT running under that id if "!" is given)\&. .sp Examples: .PP joe .RS 4 program must be run by joe .RE .PP :kids .RS 4 program must be run by a member of the \*(Aqkids\*(Aq group .RE .PP !:kids .RS 4 program must not be run by a member of the \*(Aqkids\*(Aq group .RE .PP +upnpd .RS 4 program named upnpd .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br The ability to specify a program name was removed from Netfilter in kernel version 2\&.6\&.14\&. .sp .5v .RE .RE .RE .PP \fBMARK\fR \- [\fB!\fR]\fIvalue\fR[/\fImask\fR][\fB:C\fR] .RS 4 Defines a test on the existing packet or connection mark\&. The rule will match only if the test returns true\&. .sp If you don\*(Aqt want to define a test but need to specify anything in the following columns, place a "\-" in this field\&. .PP ! .RS 4 Inverts the test (not equal) .RE .PP \fIvalue\fR .RS 4 Value of the packet or connection mark\&. .RE .PP \fImask\fR .RS 4 A mask to be applied to the mark before testing\&. .RE .PP \fB:C\fR .RS 4 Designates a connection mark\&. If omitted, the packet mark\*(Aqs value is tested\&. .RE .RE .PP \fBCONNLIMIT\fR \- [\fB!\fR]\fIlimit\fR[:\fImask\fR] .RS 4 May be used to limit the number of simultaneous connections from each individual host to \fIlimit\fR connections\&. Requires connlimit match in your kernel and iptables\&. While the limit is only checked on rules specifying CONNLIMIT, the number of current connections is calculated over all current connections from the SOURCE host\&. By default, the limit is applied to each host but can be made to apply to networks of hosts by specifying a \fImask\fR\&. The \fImask\fR specifies the width of a VLSM mask to be applied to the source address; the number of current connections is then taken over all hosts in the subnet \fIsource\-address\fR/\fImask\fR\&. When\fB !\fR is specified, the rule matches when the number of connection exceeds the \fIlimit\fR\&. .RE .PP \fBTIME\fR \- \fItimeelement\fR[&\fItimelement\fR\&.\&.\&.] .RS 4 May be used to limit the rule to a particular time period each day, to particular days of the week or month, or to a range defined by dates and times\&. Requires time match support in your kernel and iptables\&. .sp \fItimeelement\fR may be: .PP timestart=\fIhh\fR:\fImm\fR[:\fIss\fR] .RS 4 Defines the starting time of day\&. .RE .PP timestop=\fIhh\fR:\fImm\fR[:\fIss\fR] .RS 4 Defines the ending time of day\&. .RE .PP utc .RS 4 Times are expressed in Greenwich Mean Time\&. .RE .PP localtz .RS 4 Deprecated by the Netfilter team in favor of \fBkerneltz\fR\&. Times are expressed in Local Civil Time (default)\&. .RE .PP kerneltz .RS 4 Added in Shorewall 4\&.5\&.2\&. Times are expressed in Local Kernel Time (requires iptables 1\&.4\&.12 or later)\&. .RE .PP weekdays=ddd[,ddd]\&.\&.\&. .RS 4 where \fIddd\fR is one of \fBMon\fR, \fBTue\fR, \fBWed\fR, \fBThu\fR, \fBFri\fR, \fBSat\fR or \fBSun\fR .RE .PP monthdays=dd[,dd],\&.\&.\&. .RS 4 where \fIdd\fR is an ordinal day of the month .RE .PP datestart=\fIyyyy\fR[\-\fImm\fR[\-\fIdd\fR[\fBT\fR\fIhh\fR[:\fImm\fR[:\fIss\fR]]]]] .RS 4 Defines the starting date and time\&. .RE .PP datestop=\fIyyyy\fR[\-\fImm\fR[\-\fIdd\fR[\fBT\fR\fIhh\fR[:\fImm\fR[:\fIss\fR]]]]] .RS 4 Defines the ending date and time\&. .RE .RE .PP \fBHEADERS\fR .RS 4 Added in Shorewall 4\&.4\&.15\&. Not used in IPv4 configurations\&. If you with to supply a value for one of the later columns, enter \*(Aq\-\*(Aq in this column\&. .RE .PP \fBSWITCH \- [!]\fR\fB\fIswitch\-name\fR\fR .RS 4 Added in Shorewall 4\&.4\&.24 and allows enabling and disabling the rule without requiring \fBshorewall restart\fR\&. .sp The rule is enabled if the value stored in /proc/net/nf_condition/\fIswitch\-name\fR is 1\&. The rule is disabled if that file contains 0 (the default)\&. If \*(Aq!\*(Aq is supplied, the test is inverted such that the rule is enabled if the file contains 0\&. \fIswitch\-name\fR must begin with a letter and be composed of letters, decimal digits, underscores or hyphens\&. Switch names must be 30 characters or less in length\&. .sp Switches are normally \fBoff\fR\&. To turn a switch \fBon\fR: .RS 4 \fBecho 1 > /proc/net/nf_condition/\fR\fB\fIswitch\-name\fR\fR .RE To turn it \fBoff\fR again: .RS 4 \fBecho 0 > /proc/net/nf_condition/\fR\fB\fIswitch\-name\fR\fR .RE Switch settings are retained over \fBshorewall restart\fR\&. .RE .SH "EXAMPLES" .PP Example 1: .RS 4 Accept SMTP requests from the DMZ to the internet .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST ACCEPT dmz net tcp smtp .fi .if n \{\ .RE .\} .RE .PP Example 2: .RS 4 Forward all ssh and http connection requests from the internet to local system 192\&.168\&.1\&.3 .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST DNAT net loc:192\&.168\&.1\&.3 tcp ssh,http .fi .if n \{\ .RE .\} .RE .PP Example 3: .RS 4 Forward all http connection requests from the internet to local system 192\&.168\&.1\&.3 with a limit of 3 per second and a maximum burst of 10 .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE # PORT PORT(S) DEST LIMIT DNAT net loc:192\&.168\&.1\&.3 tcp http \- \- 3/sec:10 .fi .if n \{\ .RE .\} .RE .PP Example 4: .RS 4 Redirect all locally\-originating www connection requests to port 3128 on the firewall (Squid running on the firewall system) except when the destination address is 192\&.168\&.2\&.2 .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST REDIRECT loc 3128 tcp www \- !192\&.168\&.2\&.2 .fi .if n \{\ .RE .\} .RE .PP Example 5: .RS 4 All http requests from the internet to address 130\&.252\&.100\&.69 are to be forwarded to 192\&.168\&.1\&.3 .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST DNAT net loc:192\&.168\&.1\&.3 tcp 80 \- 130\&.252\&.100\&.69 .fi .if n \{\ .RE .\} .RE .PP Example 6: .RS 4 You want to accept SSH connections to your firewall only from internet IP addresses 130\&.252\&.100\&.69 and 130\&.252\&.100\&.70 .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST ACCEPT net:130\&.252\&.100\&.69,130\&.252\&.100\&.70 $FW \e tcp 22 .fi .if n \{\ .RE .\} .RE .PP Example 7: .RS 4 You wish to accept connections from the internet to your firewall on port 2222 and you want to forward them to local system 192\&.168\&.1\&.3, port 22 .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST DNAT net loc:192\&.168\&.1\&.3:22 tcp 2222 .fi .if n \{\ .RE .\} .RE .PP Example 8: .RS 4 You want to redirect connection requests to port 80 randomly to the port range 81\-90\&. .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL # PORT PORT(S) DEST REDIRECT net $FW::81\-90:random tcp www .fi .if n \{\ .RE .\} .RE .PP Example 9: .RS 4 Shorewall does not impose as much structure on the Netfilter rules in the \*(Aqnat\*(Aq table as it does on those in the filter table\&. As a consequence, when using Shorewall versions before 4\&.1\&.4, care must be exercised when using DNAT and REDIRECT rules with zones defined with wildcard interfaces (those ending with \*(Aq+\*(Aq\&. Here is an example: .sp \m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[3]\d\s+2(8): .sp .if n \{\ .RS 4 .\} .nf #ZONE TYPE OPTIONS fw firewall net ipv4 dmz ipv4 loc ipv4 .fi .if n \{\ .RE .\} .sp \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[8]\d\s+2(8): .sp .if n \{\ .RS 4 .\} .nf #ZONE INTERFACE BROADCAST OPTIONS net ppp0 loc eth1 detect dmz eth2 detect \- ppp+ # Addresses are assigned from 192\&.168\&.3\&.0/24 .fi .if n \{\ .RE .\} .sp \m[blue]\fBshorewall\-host\fR\m[]\&\s-2\u[10]\d\s+2(8): .sp .if n \{\ .RS 4 .\} .nf #ZONE HOST(S) OPTIONS loc ppp+:192\&.168\&.3\&.0/24 .fi .if n \{\ .RE .\} .sp rules: .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST # PORT(S) REDIRECT loc 3128 tcp 80 .fi .if n \{\ .RE .\} .sp Note that it would have been tempting to simply define the loc zone entirely in shorewall\-interfaces(8): .sp .if n \{\ .RS 4 .\} .nf #******************* INCORRECT ***************** #ZONE INTERFACE BROADCAST OPTIONS net ppp0 loc eth1 detect loc ppp+ dmz eth2 .fi .if n \{\ .RE .\} .sp This would have made it impossible to run a internet\-accessible web server in the DMZ because all traffic entering ppp+ interfaces would have been redirected to port 3128 on the firewall and there would have been no net\->fw ACCEPT rule for that traffic\&. .RE .PP Example 10: .RS 4 Add the tupple (source IP, dest port, dest IP) of an incoming SSH connection to the ipset S: .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST # PORT(S) ADD(+S:dst,src,dst) net fw tcp 22 .fi .if n \{\ .RE .\} .RE .PP Example 11: .RS 4 You wish to limit SSH connections from remote systems to 1/min with a burst of three (to allow for limited retry): .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE # PORT(S) PORT(S) DEST LIMIT SSH(ACCEPT) net all \- \- \- \- s:1/min:3 .fi .if n \{\ .RE .\} .RE .PP Example 12: .RS 4 Forward port 80 to dmz host $BACKUP if switch \*(Aqprimary_down\*(Aq is on\&. .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS SWITCH # PORT(S) PORT(S) DEST LIMIT GROUP DNAT net dmz:$BACKUP tcp 80 \- \- \- \- \- \- \- \- primary_down .fi .if n \{\ .RE .\} .RE .PP Example 13: .RS 4 Drop all email from the \fIAnonymous Proxy\fR and \fISatellite Provider\fR address ranges: .sp .if n \{\ .RS 4 .\} .nf #ACTION SOURCE DEST PROTO DEST # PORT(S) DROP net:^A1,A2 fw tcp 22 .fi .if n \{\ .RE .\} .RE .SH "FILES" .PP /etc/shorewall/rules .SH "SEE ALSO" .PP \m[blue]\fBhttp://www\&.shorewall\&.net/ipsets\&.html\fR\m[] .PP \m[blue]\fBhttp://www\&.shorewall\&.net/configuration_file_basics\&.htm#Pairs\fR\m[]\&\s-2\u[11]\d\s+2 .PP \m[blue]\fBhttp://www\&.shorewall\&.net/shorewall_logging\&.html\fR\m[] .PP shorewall(8), shorewall\-accounting(5), shorewall\-actions(5), shorewall\-blacklist(5), shorweall\-blrules(5), shorewall\-hosts(5), shorewall_interfaces(5), shorewall\-ipsets(5), shorewall\-maclist(5), shorewall\-masq(5), shorewall\-nat(5), shorewall\-netmap(5), shorewall\-params(5), shorewall\-policy(5), shorewall\-providers(5), shorewall\-proxyarp(5), shorewall\-rtrules(5), shorewall\-routestopped(5), shorewall\&.conf(5), shorewall\-secmarks(5), shorewall\-tcclasses(5), shorewall\-tcdevices(5), shorewall\-tcrules(5), shorewall\-tos(5), shorewall\-tunnels(5), shorewall\-zones(5) .SH "NOTES" .IP " 1." 4 shorewall-policy .RS 4 \%http://www.shorewall.net/manpages/shorewall-policy.html .RE .IP " 2." 4 shorewall.conf .RS 4 \%http://www.shorewall.net/manpages/shorewall.conf.html .RE .IP " 3." 4 shorewall-zones .RS 4 \%http://www.shorewall.net/manpages/shorewall-zones.html .RE .IP " 4." 4 shorewall-nesting .RS 4 \%http://www.shorewall.net/manpages/shorewall-nesting.html .RE .IP " 5." 4 http://www.shorewall.net/shorewall_logging.html .RS 4 \%http://www.shorewall.net/shorewall.logging.html .RE .IP " 6." 4 shorewall-actions .RS 4 \%http://www.shorewall.net/manpages/shorewall-actions.html .RE .IP " 7." 4 shorewall-exclusion .RS 4 \%http://www.shorewall.net/manpages/shorewall-exclusion.html .RE .IP " 8." 4 shorewall-interfaces .RS 4 \%http://www.shorewall.net/manpages/shorewall-interfaces.html .RE .IP " 9." 4 http://shorewall.net/PortKnocking.html .RS 4 \%http://www.shorewall.net/manpages/../PortKnocking.html .RE .IP "10." 4 shorewall-host .RS 4 \%http://www.shorewall.net/manpages/shorewall-hosts.html .RE .IP "11." 4 http://www.shorewall.net/configuration_file_basics.htm#Pairs .RS 4 \%http://shorewall.net/configuration_file_basics.htm#Pairs .RE