{"id":4503,"date":"2022-12-20T18:08:50","date_gmt":"2022-12-20T21:08:50","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/shorewallnetmap-man5\/"},"modified":"2022-12-20T18:08:50","modified_gmt":"2022-12-20T21:08:50","slug":"shorewallnetmap-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/shorewallnetmap-man5\/","title":{"rendered":"SHOREWALL&minus;NETMAP (man5)"},"content":{"rendered":"<h1 align=\"center\">SHOREWALL\u2212NETMAP<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/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\">netmap \u2212 Shorewall NETMAP definition 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=\"37%\">\n<p style=\"margin-top: 1em\"><b>\/etc\/shorewall[6]\/netmap<\/b><\/p>\n<\/td>\n<td width=\"52%\"> <\/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 map addresses in one network to corresponding addresses in a second network.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><big>Warning<\/big><\/b> <br \/> To use this file, your kernel and iptables must have NETMAP support included.<\/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>TYPE<\/b> \u2212 <b>{DNAT<\/b>|<b>SNAT}<\/b><\/p>\n<p style=\"margin-left:17%;\">If DNAT, traffic entering INTERFACE and addressed to NET1 has its destination address rewritten to the corresponding address in NET2.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">If SNAT, traffic leaving INTERFACE with a source address in NET1 has it&#8217;s source address rewritten to the corresponding address in NET2.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>NET1<\/b> \u2212 <i>network\u2212address<\/i><\/p>\n<p style=\"margin-left:17%;\">Network in CIDR format (e.g., 192.168.1.0\/24). Beginning with Shorewall 4.4.24, <b><font color=\"#0000FF\">exclusion<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">is supported.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>INTERFACE<\/b> \u2212 <i>interface<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The name of a network interface. The interface must be defined in<\/font> <b><font color=\"#0000FF\">shorewall\u2212interfaces<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5). Shorewall allows loose matches to wildcard entries in<\/font> <b><font color=\"#0000FF\">shorewall\u2212interfaces<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(5). For example, ppp0 in this file will match a<\/font> <b><font color=\"#0000FF\">shorewall\u2212interfaces<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(8) entry that defines ppp+.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>NET2<\/b> \u2212 <i>network\u2212address<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Network in CIDR format<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>NET3 (Optional)<\/b> \u2212 <i>network\u2212address<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Added in Shorewall 4.4.11. If specified, qualifies INTERFACE. It specifies a SOURCE network for DNAT rules and a DESTINATION network for SNAT rules.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>PROTO<\/b> \u2212 <i>protocol\u2212number\u2212or\u2212name<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Optional \u2212\u2212 added in Shorewall 4.4.23.2. Only packets specifying this protocol will have their IP header modified.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>DPORT<\/b> \u2212 <i>port\u2212number\u2212or\u2212name\u2212list<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Optional \u2212 added in Shorewall 4.4.23.2. Destination Ports. A comma\u2212separated list of Port names (from services(5)), <i>port number<\/i>s or <i>port range<\/i>s; if the protocol is <b>icmp<\/b>, this column is interpreted as the destination icmp\u2212type(s). ICMP types may be specified as a numeric type, a numeric type and code separated by a slash (e.g., 3\/4), or a typename. See<\/font> <b><font color=\"#0000FF\">https:\/\/shorewall.org\/configuration_file_basics.htm#ICMP<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">If the protocol is <b>ipp2p<\/b>, this column is interpreted as an ipp2p option without the leading &#8220;\u2212\u2212&#8221; (example <b>bit<\/b> for bit\u2212torrent). If no PORT is given, <b>ipp2p<\/b> is assumed.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">An entry in this field requires that the PROTO column specify icmp (1), tcp (6), udp (17), sctp (132) or udplite (136). Use &#8216;\u2212&#8217; if any of the following field is supplied.<\/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\"><b>SPORT<\/b> \u2212 <i>port\u2212number\u2212or\u2212name\u2212list<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Optional \u2212\u2212 added in Shorewall 4.4.23.2. Source port(s). If omitted, any source port is acceptable. Specified as a comma\u2212separated list of port names, port numbers or port ranges.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">An entry in this field requires that the PROTO column specify tcp (6), udp (17), sctp (132) or udplite (136). Use &#8216;\u2212&#8217; if any of the following fields is supplied.<\/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<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall\/netmap<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall6\/netmap<\/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\/netmap.html<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small><\/p>\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=\"14%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">exclusion<\/font><\/p>\n<\/td>\n<td width=\"69%\"> <\/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\">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=\"83%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">https:\/\/shorewall.org\/configuration_file_basics.htm#ICMP<\/font><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/configuration_file_basics.htm#ICMP<\/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=\"51%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">https:\/\/shorewall.org\/netmap.html<\/font><\/p>\n<\/td>\n<td width=\"32%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/netmap.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>  netmap \u2212 Shorewall NETMAP definition 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,1471],"class_list":["post-4503","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-shorewall-netmap"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4503","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=4503"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4503\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}