{"id":4361,"date":"2022-12-20T17:49:04","date_gmt":"2022-12-20T20:49:04","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/shorewall6conntrac-man5\/"},"modified":"2022-12-20T17:49:04","modified_gmt":"2022-12-20T20:49:04","slug":"shorewall6conntrac-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/shorewall6conntrac-man5\/","title":{"rendered":"SHOREWALL6&minus;CONNTRAC (man5)"},"content":{"rendered":"<h1 align=\"center\">SHOREWALL6\u2212CONNTRAC<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">conntrack \u2212 shorewall conntrack file<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\"><b>\/etc\/shorewall[6]\/conntrack<\/b><\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The original intent of the <b>notrack<\/b> file was to exempt certain traffic from Netfilter connection tracking. Traffic matching entries in the file were not to be tracked.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The role of the file was expanded in Shorewall 4.4.27 to include all rules that can be added in the Netfilter <b>raw<\/b> table. In 4.5.7, the file&#8217;s name was changed to <b>conntrack<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The file supports three different column layouts: FORMAT 1, FORMAT 2, and FORMAT 3 with FORMAT 1 being the default. The three differ as follows:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 in FORMAT 2 and 3, there is an additional leading ACTION column.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 in FORMAT 3, the SOURCE column accepts no zone name; rather the ACTION column allows a SUFFIX that determines the chain(s) that the generated rule will be added to.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When an entry in the following form is encountered, the format of the following entries are assumed to be of the specified <i>format<\/i>.<\/p>\n<p style=\"margin-left:17%;\"><b>?FORMAT<\/b> <i><br \/> format<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">where <i>format<\/i> is either <b>1<\/b>,<b>2<\/b> or <b>3<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Format 3 was introduced in Shorewall 4.5.10.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Comments may be attached to Netfilter rules generated from entries in this file through the use of ?COMMENT lines. These lines begin with ?COMMENT; the remainder of the line is treated as a comment which is attached to subsequent rules until another ?COMMENT line is found or until the end of the file is reached. To stop adding comments to rules, use a line containing only ?COMMENT.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">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).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ACTION<\/b> \u2212 {<b>NOTRACK<\/b>|<b>CT<\/b>:<b>helper<\/b>:<i>name<\/i>[(<i>arg<\/i>=<i>val<\/i>[,&#8230;])|<b>CT:ctevents:<\/b><i>event<\/i><b>[,&#8230;]|CT:expevents:new|CT:notrack<\/b>|DROP|LOG|ULOG(<i>ulog\u2212parameters<\/i>):NFLOG(<i>nflog\u2212parameters<\/i>)|IP[6]TABLES(<i>target<\/i>)}[<i>log\u2212level<\/i>[:<i>log\u2212tag<\/i>]][:<i>chain\u2212designator<\/i>]<\/p>\n<p style=\"margin-left:17%;\">This column is only present when FORMAT >= 2. Values other than NOTRACK or DROP require CT Targetsupport in your iptables and kernel.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 <b>NOTRACK<\/b> or <b>CT:notrack<\/b><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">Disables connection tracking for this packet. If a <i>log\u2212level<\/i> is specified, the packet will also be logged at that level.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 <b>CT:helper<\/b>:<i>name<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">Attach the helper identified by the <i>name<\/i> to this connection. This is more flexible than loading the conntrack helper with preset ports. If a <i>log\u2212level<\/i> is specified, the packet will also be logged at that level. Beginning with Shorewall 4.6.10, the helper name is optional<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">At this writing, the available helpers are:<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">amanda<\/p>\n<p style=\"margin-left:29%;\">Requires that the amanda netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">ftp<\/p>\n<p style=\"margin-left:29%;\">Requires that the FTP netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">irc<\/p>\n<p style=\"margin-left:29%;\">Requires that the IRC netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">netbios\u2212ns<\/p>\n<p style=\"margin-left:29%;\">Requires that the netbios_ns (sic) helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">RAS and Q.931<\/p>\n<p style=\"margin-left:29%;\">These require that the H323 netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">pptp<\/p>\n<p style=\"margin-left:29%;\">Requires that the pptp netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">sane<\/p>\n<p style=\"margin-left:29%;\">Requires that the SANE netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">sip<\/p>\n<p style=\"margin-left:29%;\">Requires that the SIP netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">snmp<\/p>\n<p style=\"margin-left:29%;\">Requires that the SNMP netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">tftp<\/p>\n<p style=\"margin-left:29%;\">Requires that the TFTP netfilter helper is present.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">May be followed by an option list of <i>arg<\/i>=<i>val<\/i> pairs in parentheses:<\/p>\n<p style=\"margin-left:29%; margin-top: 1em\">\u2022 <b>ctevents<\/b>=<i>event<\/i>[,&#8230;]<\/p>\n<p style=\"margin-left:29%; margin-top: 1em\">Only generate the specified conntrack events for this connection. Possible event types are: <b>new<\/b>, <b>related<\/b>, <b>destroy<\/b>, <b>reply<\/b>, <b>assured<\/b>, <b>protoinfo<\/b>, <b>helper<\/b>, <b>mark<\/b> (this is connection mark, not packet mark), <b>natseqinfo<\/b>, and <b>secmark<\/b>. If more than one <i>event<\/i> is listed, the <i>event<\/i> list must be enclosed in parentheses (e.g., ctevents=(new,related)).<\/p>\n<p style=\"margin-left:29%; margin-top: 1em\">\u2022 <b>expevents=new<\/b><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\">Only generate a <b>new<\/b> expectation events for this connection.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 ctevents:<i>event<\/i>[,&#8230;]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">Added in Shorewall 4.6.10. Only generate the specified conntrack events for this connection. Possible event types are: <b>new<\/b>, <b>related<\/b>, <b>destroy<\/b>, <b>reply<\/b>, <b>assured<\/b>, <b>protoinfo<\/b>, <b>helper<\/b>, <b>mark<\/b> (this is connection mark, not packet mark), <b>natseqinfo<\/b>, and <b>secmark<\/b>.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 expevents=new<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">Added in Shorewall 4.6.10. Only generate <b>new<\/b> expectation events for this connection.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 <b>DROP<\/b><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">Added in Shorewall 4.5.10. Silently discard the packet. If a <i>log\u2212level<\/i> is specified, the packet will also be logged at that level.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 <b>IP6TABLES<\/b>(<i>target<\/i>)<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">IPv6 only.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">Added in Shorewall 4.6.0. Allows you to specify any iptables <i>target<\/i> with target options (e.g., &#8220;IP6TABLES(AUDIT \u2212\u2212type drop)&#8221;). If the target is not one recognized by Shorewall, the following error message will be issued:<\/p>\n<p style=\"margin-left:29%;\">ERROR: Unknown target <br \/> (<i>target<\/i>)<\/p>\n<p style=\"margin-left:23%;\">This error message may be eliminated by adding <i>target<\/i> as a builtin action in <b><font color=\"#0000FF\">shorewall\u2212actions<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 <b>IPTABLES<\/b>(<i>target<\/i>)<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">IPv4 only.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">Added in Shorewall 4.6.0. Allows you to specify any iptables <i>target<\/i> with target options (e.g., &#8220;IPTABLES(AUDIT \u2212\u2212type drop)&#8221;). If the target is not one recognized by Shorewall, the following error message will be issued:<\/font><\/p>\n<p style=\"margin-left:29%;\"><font color=\"#000000\">ERROR: Unknown target <br \/> (<i>target<\/i>)<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">This error message may be eliminated by adding <i>target<\/i> as a builtin action in<\/font> <b><font color=\"#0000FF\">shorewall\u2212actions<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 <b>LOG<\/b><\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">Added in Shoreawll 4.6.0. Logs the packet using the specified <i>log\u2212level<\/i> and <i>log\u2212tag<\/i> (if any). If no log\u2212level is specified, then &#8216;info&#8217; is assumed.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 <b>NFLOG<\/b><\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">Added in Shoreawll 4.6.0. Queues the packet to a backend logging daemon using the NFLOG netfilter target with the specified <i>nflog\u2212parameters<\/i>.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 <b>ULOG<\/b><\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">IPv4 only. Added in Shoreawll 4.6.0. Queues the packet to a backend logging daemon using the ULOG netfilter target with the specified <i>ulog\u2212parameters<\/i>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">When FORMAT = 1, this column is not present and the rule is processed as if NOTRACK had been entered in this column.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 4.5.10, when FORMAT = 3, this column can end with a colon followed by a <i>chain\u2212designator<\/i>. The <i>chain\u2212designator<\/i> can be one of the following:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">P<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">The rule is added to the raw table PREROUTING chain. This is the default if no <i>chain\u2212designator<\/i> is present.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">O<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">The rule is added to the raw table OUTPUT chain.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">PO or OP<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">The rule is added to the raw table PREROUTING and OUTPUT chains.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">SOURCE (formats 1 and 2) \u2013 {<i>zone<\/i>[:<i>interface<\/i>][:<i>address\u2212list<\/i>]}<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">where <i>zone<\/i> is the name of a zone, <i>interface<\/i> is an interface to that zone, and <i>address\u2212list<\/i> is a comma\u2212separated list of addresses (may contain exclusion \u2212 see<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5)).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 4.5.7, <b>all<\/b> can be used as the <i>zone<\/i> name to mean all zones.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 4.5.10, <b>all\u2212<\/b> can be used as the <i>zone<\/i> name to mean all off\u2212firewall zones.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">SOURCE (format 3 prior to Shorewall 5.1.0) \u2013 {\u2212|<i>interface<\/i>[:<i>address\u2212list<\/i>]|<i>address\u2212list<\/i>}<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Where <i>interface<\/i> is an interface to that zone, and <i>address\u2212list<\/i> is a comma\u2212separated list of addresses (may contain exclusion \u2212 see<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5)).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SOURCE (format 3 on Shorewall 5.1.0 and later) \u2212 {\u2212|[<\/b><i>source\u2212spec<\/i><b>[,&#8230;]]}<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">where <i>source\u2212spec<\/i> is one of the following:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>interface<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Where interface is the logical name of an interface defined in<\/font> <b><font color=\"#0000FF\">shorewall\u2212interface<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>address<\/i>[,&#8230;][<i>exclusion<\/i>]<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">where <i>address<\/i> may be:<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 A host or network IP address.<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 A MAC address in Shorewall format (preceded by a tilde (&#8220;~&#8221;) and using dash (&#8220;\u2212&#8221;) as a separator.<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 The name of an ipset preceded by a plus sign (&#8220;+&#8221;). See<\/font> <b><font color=\"#0000FF\">shorewall\u2212ipsets<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\"><i>exclusion<\/i> is described in<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>interface<\/i>:<i>address<\/i>[,&#8230;][<i>exclusion<\/i>]<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">This form combines the preceding two and requires that both the incoming interface and source address match.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>exclusion<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">See<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5)<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 5.1.0, multiple <i>source\u2212spec<\/i>s separated by commas may be specified provided that the following alternative forms are used: (<i>address<\/i>[,&#8230;][<i>exclusion<\/i>])<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>interface<\/i>\ud83d\ude41<i>address<\/i>[,&#8230;][<i>exclusion<\/i>])<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">(<i>exclusion<\/i>)<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">DEST (Prior to Shorewall 5.1.0) \u2013 {\u2212|<i>interface<\/i>[:<i>address\u2212list<\/i>]|<i>address\u2212list<\/i>}<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">where <i>address\u2212list<\/i> is a comma\u2212separated list of addresses (may contain exclusion \u2212 see<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5)).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>DEST (Shorewall 5.1.0 and later) \u2212 {\u2212|<\/b><i>dest\u2212spec<\/i><b>[,&#8230;]}<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">where <i>dest\u2212spec<\/i> is one of the following:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>interface<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Where interface is the logical name of an interface defined in<\/font> <b><font color=\"#0000FF\">shorewall\u2212interface<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>address<\/i>[,&#8230;][<i>exclusion<\/i>]<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">where <i>address<\/i> may be:<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 A host or network IP address.<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 A MAC address in Shorewall format (preceded by a tilde (&#8220;~&#8221;) and using dash (&#8220;\u2212&#8221;) as a separator.<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 The name of an ipset preceded by a plus sign (&#8220;+&#8221;). See<\/font> <b><font color=\"#0000FF\">shorewall\u2212ipsets<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\"><i>exclusion<\/i> is described in<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>interface<\/i>:<i>address<\/i>[,&#8230;][<i>exclusion<\/i>]<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">This form combines the preceding two and requires that both the outgoing interface and destination address match.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>exclusion<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">See<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5)<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 5.1.0, multiple source\u2212specs separated by commas may be specified provided that the following alternative forms are used: (<i>address<\/i>[,&#8230;][<i>exclusion<\/i>])<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>interface<\/i>\ud83d\ude41<i>address<\/i>[,&#8230;][<i>exclusion<\/i>])<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">(<i>exclusion<\/i>)<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">PROTO \u2013 <i>protocol\u2212name\u2212or\u2212number<\/i>[,&#8230;]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A protocol name from \/etc\/protocols or a protocol number. tcp and 6 may be optionally followed by <b>:syn<\/b> to match only the SYN packet (first packet in the three\u2212way handshake).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 4.5.12, this column can accept a comma\u2212separated list of protocols and either <b>proto<\/b> or <b>protos<\/b> is accepted in the alternate input format.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 5.1.11, when <b>tcp<\/b> or <b>6<\/b> is specified and the ACTION is <b>CT<\/b>, the compiler will default to <b>:syn<\/b>. If you wish the rule to match packets with any valid combination of TCP flags, you may specify <b>tcp:all<\/b> or <b>6:all<\/b>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">DPORT \u2212 port\u2212number\/service\u2212name\u2212list<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A comma\u2212separated list of port numbers and\/or service names from \/etc\/services. May also include port ranges of the form <i>low\u2212port<\/i>:<i>high\u2212port<\/i> if your kernel and iptables include port range support.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">This column was formerly labelled DEST PORT(S).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">SPORT \u2212 port\u2212number\/service\u2212name\u2212list<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A comma\u2212separated list of port numbers and\/or service names from \/etc\/services. May also include port ranges of the form <i>low\u2212port<\/i>:<i>high\u2212port<\/i> if your kernel and iptables include port range support.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Beginning with Shorewall 4.5.15, you may place &#8216;=&#8217; in this column, provided that the DPORT column is non\u2212empty. This causes the rule to match when either the source port or the destination port in a packet matches one of the ports specified in DPORT. Use of &#8216;=&#8217; requires multi\u2212port match in your iptables and kernel.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">This column was formerly labelled SOURCE PORT(S).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">USER \u2013 [<i>user<\/i>][:<i>group<\/i>]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">This column was formerly named USER\/GROUP and may only be specified if the SOURCE <i>zone<\/i> is $FW. Specifies the effective user id and or group id of the process sending the traffic.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SWITCH \u2212 [!]<\/b><i>switch\u2212name<\/i><b>[={0|1}]<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Added in Shorewall 4.5.10 and allows enabling and disabling the rule without requiring <b>shorewall restart<\/b>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">The rule is enabled if the value stored in \/proc\/net\/nf_condition\/<i>switch\u2212name<\/i> is 1. The rule is disabled if that file contains 0 (the default). If &#8216;!&#8217; is supplied, the test is inverted such that the rule is enabled if the file contains 0.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Within the <i>switch\u2212name<\/i>, &#8216;@0&#8217; and &#8216;@{0}&#8217; are replaced by the name of the chain to which the rule is a added. The <i>switch\u2212name<\/i> (after &#8216;&#8230;&#8217; expansion) 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.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Switches are normally <b>off<\/b>. To turn a switch <b>on<\/b>:<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\"><b>echo 1 > <br \/> \/proc\/net\/nf_condition\/<\/b><i>switch\u2212name<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">To turn it <b>off<\/b> again:<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\"><b>echo 0 > <br \/> \/proc\/net\/nf_condition\/<\/b><i>switch\u2212name<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Switch settings are retained over <b>shorewall restart<\/b>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">When the <i>switch\u2212name<\/i> is followed by <b>=0<\/b> or <b>=1<\/b>, then the switch is initialized to off or on respectively by the <b>start<\/b> command. Other commands do not affect the switch setting.<\/font><\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv4 Example 1:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">#ACTION SOURCE DEST PROTO DPORT SPORT USER <br \/> CT:helper:ftp(expevents=new) fw \u2212 tcp 21<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv4 Example 2 (Shorewall 4.5.10 or later):<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Drop traffic to\/from all zones to IP address 1.2.3.4<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">?FORMAT 2 <br \/> #ACTION SOURCE DEST PROTO DPORT SPORT USER <br \/> DROP all\u2212:1.2.3.4 \u2212 <br \/> DROP all 1.2.3.4<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">or<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">?FORMAT 3 <br \/> #ACTION SOURCE DEST PROTO DPORT SPORT USER <br \/> DROP:P 1.2.3.4 \u2212 <br \/> DROP:PO \u2212 1.2.3.4<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv6 Example 1:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Use the FTP helper for TCP port 21 connections from the firewall itself.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">FORMAT 2 <br \/> #ACTION SOURCE DEST PROTO DPORT SPORT USER <br \/> CT:helper:ftp(expevents=new) fw \u2212 tcp 21<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv6 Example 2 (Shorewall 4.5.10 or later):<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Drop traffic to\/from all zones to IP address 2001:1.2.3::4<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">FORMAT 2 <br \/> #ACTION SOURCE DEST PROTO DPORT SPORT USER <br \/> DROP all\u2212:2001:1.2.3::4 \u2212 <br \/> DROP all 2001:1.2.3::4<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">or<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">FORMAT 3 <br \/> #ACTION SOURCE DEST PROTO DPORT SPORT USER <br \/> DROP:P 2001:1.2.3::4 \u2212 <br \/> DROP:PO \u2212 2001:1.2.3::4<\/font><\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall\/conntrack<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall6\/conntrack<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><font color=\"#0000FF\">https:\/\/shorewall.org\/configuration_file_basics.htm#Pairs<\/font><\/b> <small><font color=\"#000000\">[5]<\/font><\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">shorewall(8)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-actions<\/font><\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall-actions.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-exclusion<\/font><\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall-exclusion.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-interface<\/font><\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall-interfaces.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-ipsets<\/font><\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall-ipsets.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">5.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">https:\/\/shorewall.org\/configuration_file_basics.htm#Pairs<\/font><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/configuration_file_basics.htm#Pairs<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  conntrack \u2212 shorewall conntrack file <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1371],"class_list":["post-4361","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-shorewall-conntrack"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4361"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4361\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}