{"id":4738,"date":"2022-12-20T18:36:50","date_gmt":"2022-12-20T21:36:50","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/shorewallhosts-man5\/"},"modified":"2022-12-20T18:36:50","modified_gmt":"2022-12-20T21:36:50","slug":"shorewallhosts-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/shorewallhosts-man5\/","title":{"rendered":"SHOREWALL&minus;HOSTS (man5)"},"content":{"rendered":"<h1 align=\"center\">SHOREWALL\u2212HOSTS<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/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\">hosts \u2212 Shorewall 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=\"35%\">\n<p style=\"margin-top: 1em\"><b>\/etc\/shorewall[6]\/hosts<\/b><\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This file is used to define zones in terms of subnets and\/or individual IP addresses. Most simple setups don&#8217;t need to (should not) place anything in this file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The order of entries in this file is not significant in determining zone composition. Rather, the order that the zones are declared in <b><font color=\"#0000FF\">shorewall\u2212zones<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5) determines the order in which the records in this file are interpreted.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b><big>Warning<\/big><\/b> <br \/> The only time that you need this file is when you have more than one zone connected through a single interface.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b><big>Warning<\/big><\/b> <br \/> If you have an entry for a zone and interface in<\/font> <b><font color=\"#0000FF\">shorewall\u2212interfaces<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5) then do not include any entries in this file for that same (zone, interface) pair.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The columns in the file are as follows.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ZONE<\/b> \u2212 <i>zone\u2212name<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The name of a zone declared in<\/font> <b><font color=\"#0000FF\">shorewall\u2212zones<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5). You may not list the firewall zone in this column.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>HOST(S)<\/b> \u2212 <i>interface<\/i>:{[{<i>address\u2212or\u2212range<\/i>[<b>,<\/b><i>address\u2212or\u2212range<\/i>]&#8230;|<b>+<\/b><i>ipset<\/i>|<b>dynamic<\/b>}[<i>exclusion<\/i>]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The name of an interface defined in the<\/font> <b><font color=\"#0000FF\">shorewall\u2212interfaces<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5) file followed by a colon (&#8220;:&#8221;) and a comma\u2212separated list whose elements are either:<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">1. The IP <i>address<\/i> of a host.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">2. A network in CIDR format.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">3. An IP address range of the form <i>low.address<\/i>\u2212<i>high.address<\/i>. Your kernel and iptables must have iprange match support.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">4. The name of an <i>ipset<\/i>.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">5. The word <b>dynamic<\/b> which makes the zone dynamic in that you can use the <b>shorewall add<\/b> and <b>shorewall delete<\/b> commands to change to composition of the zone.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">You may also exclude certain hosts through use of an <i>exclusion<\/i> (see<\/font> <b><font color=\"#0000FF\">shorewall\u2212exclusion<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>OPTIONS<\/b> (Optional) \u2212 [<i>option<\/i>[<b>,<\/b><i>option<\/i>]&#8230;]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A comma\u2212separated list of options from the following list. The order in which you list the options is not significant but the list must have no embedded white\u2212space.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>blacklist<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Check packets arriving on this port against the<\/font> <b><font color=\"#0000FF\">shorewall\u2212blacklist<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">(5) file.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>broadcast<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Used when you want to include limited broadcasts (destination IP address 255.255.255.255) from the firewall to this zone. Only necessary when:<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">1. The network specified in the HOST(S) column does not include 255.255.255.255.<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">2. The zone does not have an entry for this interface in<\/font> <b><font color=\"#0000FF\">shorewall\u2212interfaces<\/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\"><b>destonly<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Normally used with the Multi\u2212cast IP address range (224.0.0.0\/4). Specifies that traffic will be sent to the specified net(s) but that no traffic will be received from the net(s).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>ipsec<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">The zone is accessed via a kernel 2.6 ipsec SA. Note that if the zone named in the ZONE column is specified as an IPSEC zone in the<\/font> <b><font color=\"#0000FF\">shorewall\u2212zones<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5) file then you do NOT need to specify the &#8216;ipsec&#8217; option here.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>maclist<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Connection requests from these hosts are compared against the contents of<\/font> <b><font color=\"#0000FF\">shorewall\u2212maclist<\/font><\/b> <small><font color=\"#000000\">[5]<\/font><\/small> <font color=\"#000000\">(5). If this option is specified, the interface must be an Ethernet NIC or equivalent and must be up before Shorewall is started.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>mss<\/b>=<i>mss<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Added in Shorewall 4.5.2. When present, causes the TCP mss for new connections to\/from the hosts given in the HOST(S) column to be clamped at the specified <i>mss<\/i>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>nosmurfs<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">This option only makes sense for ports on a bridge.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">Filter packets for smurfs (packets with a broadcast address as the source).<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">Smurfs will be optionally logged based on the setting of SMURF_LOG_LEVEL in<\/font> <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[6]<\/font><\/small> <font color=\"#000000\">(5). After logging, the packets are dropped.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>routeback<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Shorewall should set up the infrastructure to pass packets from this\/these address(es) back to themselves. This is necessary if hosts in this group use the services of a transparent proxy that is a member of the group or if DNAT is used to send requests originating from this group to a server in the group.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>tcpflags<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Packets arriving from these hosts are checked for certain illegal combinations of TCP flags. Packets found to have such a combination of flags are handled according to the setting of TCP_FLAGS_DISPOSITION after having been logged according to the setting of TCP_FLAGS_LOG_LEVEL.<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Example 1<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The firewall runs a PPTP server which creates a ppp interface for each remote client. The clients are assigned IP addresses in the network 192.168.3.0\/24 and in a zone named &#8216;vpn&#8217;.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">#ZONE HOST(S) OPTIONS <br \/> vpn ppp+:192.168.3.0\/24<\/font><\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall\/hosts<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall6\/hosts<\/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\">[7]<\/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=\"23%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-zones<\/font><\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall-zones.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=\"31%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-interfaces<\/font><\/p>\n<\/td>\n<td width=\"52%\"> <\/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\">3.<\/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\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-blacklist<\/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-blacklist.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=\"26%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-maclist<\/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-maclist.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\">6.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall.conf<\/font><\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall.conf.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\">7.<\/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>  hosts \u2212 Shorewall 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,1658],"class_list":["post-4738","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-shorewall-hosts"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4738","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=4738"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4738\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}