{"id":4426,"date":"2022-12-20T17:49:16","date_gmt":"2022-12-20T20:49:16","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/shorewallblrules-man5\/"},"modified":"2022-12-20T17:49:16","modified_gmt":"2022-12-20T20:49:16","slug":"shorewallblrules-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/shorewallblrules-man5\/","title":{"rendered":"SHOREWALL&minus;BLRULES (man5)"},"content":{"rendered":"<h1 align=\"center\">SHOREWALL\u2212BLRULES<\/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\">blrules \u2212 shorewall Blacklist 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=\"38%\">\n<p style=\"margin-top: 1em\"><b>\/etc\/shorewall[6]\/blrules<\/b><\/p>\n<\/td>\n<td width=\"51%\"> <\/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 perform blacklisting and whitelisting.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Rules in this file are applied depending on the setting of BLACKLIST in <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The format of rules in this file is the same as the format of rules in<\/font> <b><font color=\"#0000FF\">shorewall\u2212rules (5)<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">. The difference in the two files lies in the ACTION (first) column.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ACTION\u2212 {ACCEPT|BLACKLIST|blacklog|CONTINUE|DROP|A_DROP|REJECT|A_REJECT|WHITELIST|LOG|QUEUE|NFQUEUE[(<\/b><i>queuenumber<\/i><b>)]|[?]COMMENT|<\/b><i>action<\/i><b>|<\/b><i>macro<\/i><b>[(<\/b><i>target<\/i><b>)]}[:{<\/b><i>log\u2212level<\/i><b>|none}[!][:<\/b><i>tag<\/i><b>]]<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Specifies the action to be taken if the packet matches the rule. Must be one of the following.<\/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\">Added in Shorewall 4.5.3. This is actually a macro that expands as follows:<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 If BLACKLIST_LOGLEVEL is specified in<\/font> <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5), then the macro expands to <b>blacklog<\/b>.<\/font><\/p>\n<p style=\"margin-left:29%; margin-top: 1em\"><font color=\"#000000\">\u2022 Otherwise it expands to the action specified for BLACKLIST_DISPOSITION in<\/font> <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>blacklog<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">May only be used if BLACKLIST_LOGLEVEL is specified in<\/font> <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5). Logs, audits (if specified) and applies the BLACKLIST_DISPOSITION specified in<\/font> <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>ACCEPT|CONTINUE|WHITELIST<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Exempt the packet from the remaining rules in this file.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>DROP<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Ignore the packet.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">A_DROP<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Audited version of DROP. Requires AUDIT_TARGET support in the kernel and ip6tables.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>REJECT<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">disallow the packet and return an icmp\u2212unreachable or an RST packet.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">A_REJECT<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Audited versions of REJECT. Require AUDIT_TARGET support in the kernel and ip6tables.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>LOG<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Simply log the packet and continue with the next rule.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>QUEUE<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Queue the packet to a user\u2212space application such as ftwall (http:\/\/p2pwall.sf.net). The application may reinsert the packet for further processing.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>NFLOG<\/b>[(<i>nflog\u2212parameters<\/i>)]<\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">queues matching packets to a back end logging daemon via a netlink socket then continues to the next rule. See<\/font> <b><font color=\"#0000FF\">shorewall\u2212logging(5)<\/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\"><b>NFQUEUE<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">Queues the packet to a user\u2212space application using the nfnetlink_queue mechanism. If a <i>queuenumber<\/i> is not specified, queue zero (0) is assumed.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>?COMMENT<\/b><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">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 &#8220;\/* &#8230; *\/&#8221; in the output of &#8220;shorewall show <chain>&#8220;. To stop the comment from being attached to further rules, simply include ?COMMENT on a line by itself.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>action<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">The name of an <i>action<\/i> declared in<\/font> <b><font color=\"#0000FF\">shorewall\u2212actions<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">(5) or in \/usr\/share\/shorewall\/actions.std.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><i>macro<\/i><\/font><\/p>\n<p style=\"margin-left:23%;\"><font color=\"#000000\">The name of a macro defined in a file named macro.<i>macro<\/i>. If the macro accepts an action parameter (Look at the macro source to see if it has PARAM in the TARGET column) then the <i>macro<\/i> name is followed by the parenthesized <i>target<\/i> (<b>ACCEPT<\/b>, <b>DROP<\/b>, <b>REJECT<\/b>, &#8230;) to be substituted for the parameter.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">Example: FTP(ACCEPT).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">The <b>ACTION<\/b> may optionally be followed by &#8220;:&#8221; and a syslog log level (e.g, REJECT:info or Web(ACCEPT):debug). This causes the packet to be logged at the specified level.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">If the <b>ACTION<\/b> names an <i>action<\/i> declared in<\/font> <b><font color=\"#0000FF\">shorewall\u2212actions<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">(5) or in \/usr\/share\/shorewall\/actions.std then:<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 If the log level is followed by &#8220;!&#8217; then all rules in the action are logged at the log level.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 If the log level is not followed by &#8220;!&#8221; then only those rules in the action that do not specify logging are logged at the specified level.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 The special log level <b>none!<\/b> suppresses logging by the action.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">You may also specify <b>NFLOG<\/b> (must be in upper case) as a log level.This will log to the NFLOG target for routing to a separate log through use of ulogd (<\/font><b><font color=\"#0000FF\">shorewall\u2212logging.htm<\/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\">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<\/font> <b><font color=\"#0000FF\">shorewall.conf<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(5)).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">For the remaining columns, see<\/font> <b><font color=\"#0000FF\">shorewall\u2212rules (5)<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/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%;\"><font color=\"#000000\">Drop 6to4 packets from the net.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">DROP net:192.88.99.1 all<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv4 Example 2:<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Don&#8217;t subject packets from 70.90.191.120\/29 to the remaining rules in the file.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">WHITELIST net:70.90.191.120\/29 all<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv6 Example 1:<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Drop Teredo packets from the net.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">DROP net:[2001::\/32] all<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">IPv6 Example 2:<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Don&#8217;t subject packets from 2001:DB8::\/64 to the remaining rules in the file.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">WHITELIST net:[2001:DB8::\/64] all<\/font><\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall\/blrules<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/shorewall6\/blrules<\/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\/blacklisting_support.htm<\/font><\/b> <small><font color=\"#000000\">[5]<\/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\">[6]<\/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=\"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\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-rules (5)<\/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-rules.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=\"31%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">shorewall-logging(5)<\/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-logging.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=\"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\">5.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"71%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">https:\/\/shorewall.org\/blacklisting_support.htm<\/font><\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/shorewall.org\/blacklisting_support.htm<\/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=\"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>  blrules \u2212 shorewall Blacklist 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,1417],"class_list":["post-4426","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-shorewall-blrules"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4426","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=4426"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4426\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}