{"id":4527,"date":"2022-12-20T18:08:56","date_gmt":"2022-12-20T21:08:56","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/shorewalladdresses-man5\/"},"modified":"2022-12-20T18:08:56","modified_gmt":"2022-12-20T21:08:56","slug":"shorewalladdresses-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/shorewalladdresses-man5\/","title":{"rendered":"SHOREWALL&minus;ADDRESSES (man5)"},"content":{"rendered":"<h1 align=\"center\">SHOREWALL\u2212ADDRESSES<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SPECIFYING SOURCE AND DEST\">SPECIFYING SOURCE AND DEST<\/a><br \/> <a href=\"#IP ADDRESS RANGES\">IP ADDRESS RANGES<\/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\">addresses \u2212 Specifying addresses within a Shorewall configuration<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">In both Shorewall and Shorewall6, there are two basic types of addresses:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Host Address<\/p>\n<p style=\"margin-left:17%;\">This address type refers to a single host.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">In IPv4, the format is <i>i.j.k.l<\/i> where <i>i<\/i> through <i>l<\/i> are decimal numbers between 1 and 255.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">In IPv6, the format is <i>a:b:c:d:e:f:g:h<\/i> where <i>a<\/i> through <i>h<\/i> consist of 1 to 4 hexadecimal digits (leading zeros may be omitted). a single series of 0 addresses may be omitted. For example 2001:227:e857:1:0:0:0:0:1 may be written 2001:227:e857:1::1.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Network Address<\/p>\n<p style=\"margin-left:17%;\">A network address refers to 1 or more hosts and consists of a host address followed by a slash (&#8220;\/&#8221;) and a Variable Length Subnet Mask (VLSM). This is known as Classless Internet Domain Routing (CIDR) notation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The VLSM is a decimal number. For IPv4, it is in the range 0 through 32. For IPv6, the range is 0 through 128. The number represents the number of leading bits in the address that represent the network address; the remainder of the bits are a host address and are generally given as zero.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Examples:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">IPv4: 192.168.1.0\/24<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">IPv6: 2001:227:e857:1:0:0:0:0:1\/64<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In the Shorewall documentation and manpages, we have tried to make it clear which type of address is accepted in each specific case.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Because Shorewall uses a colon (&#8220;:&#8221;) as a separator in many contexts, IPv6 addresses are best written using the standard convention in which the address itself is enclosed in square brackets:<\/p>\n<p style=\"margin-left:17%;\">[2001:227:e857:1::1] <br \/> [2001:227:e857:1::]\/64<\/p>\n<h2>SPECIFYING SOURCE AND DEST <a name=\"SPECIFYING SOURCE AND DEST\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Entries in Shorewall configuration files often deal with the source (SOURCE) and destination (DEST) of connections and Shorewall implements a uniform way for specifying them.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A SOURCE or DEST consists of one to three parts separated by colons (&#8220;:&#8221;):<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">1. ZONE \u2014 The name of a zone declared in \/etc\/shorewall\/zones or \/etc\/shorewall6\/zones. This part is only available in the rules file (\/etc\/shorewall\/rules, \/etc\/shorewall\/blrules,\/etc\/shorewall6\/rules and \/etc\/shorewall6\/blrules).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">2. INTERFACE \u2014 The name of an interface that matches an entry in \/etc\/shorewall\/interfaces (\/etc\/shorewall6\/interfaces).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Beginning with Shorweall 5.2.1, the <i>interface<\/i> may be preceded with &#8216;!&#8217; which matches all interfaces except the one specified.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">3. ADDRESS LIST \u2014 A list of one or more addresses (host or network) or address ranges, separated by commas. In an IPv6 configuration, this list must be included in square or angled brackets (&#8220;[&#8230;]&#8221; or &#8220;<...>&#8220;). The list may have exclusion.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Examples.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">1. All hosts in the <b>net<\/b> zone \u2014 <b>net<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">2. Subnet 192.168.1.0\/29 in the <b>loc<\/b> zone \u2014 <b>loc:192.168.1.0\/29<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">3. All hosts in the net zone connecting through ppp0 \u2014 <b>net:ppp0<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">4. All hosts interfaced by eth3 \u2014 <b>eth3<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">5. Subnet 10.0.1.0\/24 interfacing through eth2 \u2014 <b>eth2:10.0.1.0\/24<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">6. Host 2002:ce7c:92b4:1:a00:27ff:feb1:46a9 in the <b>loc<\/b> zone \u2014 <b>loc:[2002:ce7c:92b4:1:a00:27ff:feb1:46a9]<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">7. The primary IP address of eth0 in the $FW zone \u2212 <b>$FW:&#038;eth0<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">8. All hosts in Vatican City \u2212 <b>net:^VA<\/b> (Requires the <i>GeoIP Match<\/i> capability).<\/p>\n<h2>IP ADDRESS RANGES <a name=\"IP ADDRESS RANGES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">If you kernel and iptables have <i>IP Range match support<\/i>, you may use IP address ranges in Shorewall configuration file entries; IP address ranges have the syntax <<i>low IP address<\/i>>\u2212<<i>high IP address<\/i>>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Example: 192.168.1.5\u2212192.168.1.12.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-top: 1em\">For more information about addressing, see the<b><font color=\"#0000FF\">Setup Guide<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">.<\/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=\"17%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Setup Guide<\/font><\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/manpages\/shorewall_setup_guide.htm#Addressing<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  addresses \u2212 Specifying addresses within a Shorewall configuration <\/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,1490],"class_list":["post-4527","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-shorewall-addresses"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4527","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=4527"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4527\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}