2006-11-16 01:16:15 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-02-04 00:56:17 +01:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
|
2006-11-16 01:16:15 +01:00
|
|
|
<refentry>
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>shorewall-blacklist</refentrytitle>
|
|
|
|
|
|
|
|
<manvolnum>5</manvolnum>
|
2014-01-16 17:32:57 +01:00
|
|
|
|
|
|
|
<refmiscinfo>Configuration Files</refmiscinfo>
|
2006-11-16 01:16:15 +01:00
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>blacklist</refname>
|
|
|
|
|
|
|
|
<refpurpose>Shorewall Blacklist file</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>/etc/shorewall/blacklist</command>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
2012-08-07 16:56:16 +02:00
|
|
|
<para>The blacklist file is used to perform static blacklisting by source
|
|
|
|
address (IP or MAC), or by application. The use of this file is deprecated
|
|
|
|
and beginning with Shorewall 4.5.7, the file is no longer
|
|
|
|
installed.</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
2011-10-02 20:45:55 +02:00
|
|
|
<para>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).</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term><emphasis role="bold">ADDRESS/SUBNET</emphasis> (networks) -
|
|
|
|
{<emphasis role="bold">-</emphasis>|<emphasis
|
2006-11-22 19:22:28 +01:00
|
|
|
role="bold">~</emphasis><emphasis>mac-address</emphasis>|<emphasis>ip-address</emphasis>|<emphasis>address-range</emphasis>|<emphasis
|
|
|
|
role="bold">+</emphasis><emphasis>ipset</emphasis>}</term>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Host address, network address, MAC address, IP address range
|
|
|
|
(if your kernel and iptables contain iprange match support) or ipset
|
2011-05-15 19:43:42 +02:00
|
|
|
name prefaced by "+" (if your kernel supports ipset match).
|
|
|
|
Exclusion (<ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-exclusion.html">shorewall-exclusion</ulink>(5))
|
|
|
|
is supported.</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
|
|
|
<para>MAC addresses must be prefixed with "~" and use "-" as a
|
|
|
|
separator.</para>
|
|
|
|
|
|
|
|
<para>Example: ~00-A0-C9-15-39-78</para>
|
|
|
|
|
|
|
|
<para>A dash ("-") in this column means that any source address will
|
|
|
|
match. This is useful if you want to blacklist a particular
|
2007-01-28 19:28:13 +01:00
|
|
|
application using entries in the PROTOCOL and PORTS columns.</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term><emphasis role="bold">PROTOCOL</emphasis> (proto) - {<emphasis
|
2009-02-04 00:56:17 +01:00
|
|
|
role="bold">-</emphasis>|[!]<emphasis>protocol-number</emphasis>|[!]<emphasis>protocol-name</emphasis>}</term>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
|
|
|
<listitem>
|
2011-10-02 20:45:55 +02:00
|
|
|
<para>Optional - If specified, must be a protocol number or a
|
|
|
|
protocol name from protocols(5).</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term><emphasis role="bold">PORTS</emphasis> - {<emphasis
|
2009-02-04 00:56:17 +01:00
|
|
|
role="bold">-</emphasis>|[!]<emphasis>port-name-or-number</emphasis>[,<emphasis>port-name-or-number</emphasis>]...}</term>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
|
|
|
<listitem>
|
2011-10-02 20:45:55 +02:00
|
|
|
<para>Optional - may only be specified if the protocol is TCP (6) or
|
|
|
|
UDP (17). A comma-separated list of destination port numbers or
|
|
|
|
service names from services(5).</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2010-09-16 18:40:28 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term>OPTIONS - {-|{dst|src|whitelist|audit}[,...]}</term>
|
2010-09-16 18:40:28 +02:00
|
|
|
|
|
|
|
<listitem>
|
2011-10-02 20:45:55 +02:00
|
|
|
<para>Optional - added in 4.4.12. If specified, indicates whether
|
|
|
|
traffic <emphasis>from</emphasis> ADDRESS/SUBNET (<emphasis
|
2010-09-16 18:40:28 +02:00
|
|
|
role="bold">src</emphasis>) or traffic <emphasis>to</emphasis>
|
|
|
|
ADDRESS/SUBNET (<emphasis role="bold">dst</emphasis>) should be
|
|
|
|
blacklisted. The default is <emphasis role="bold">src</emphasis>. If
|
|
|
|
the ADDRESS/SUBNET column is empty, then this column has no effect
|
|
|
|
on the generated rule.</para>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>In Shorewall 4.4.12, the keywords from and to were used in
|
|
|
|
place of src and dst respectively. Blacklisting was still
|
|
|
|
restricted to traffic <emphasis>arriving</emphasis> on an
|
|
|
|
interface that has the 'blacklist' option set. So to block traffic
|
|
|
|
from your local network to an internet host, you had to specify
|
|
|
|
<option>blacklist</option> on your internal interface in <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>
|
2010-09-16 18:40:28 +02:00
|
|
|
(5).</para>
|
|
|
|
</note>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>Beginning with Shorewall 4.4.13, entries are applied based
|
|
|
|
on the <emphasis role="bold">blacklist</emphasis> setting in
|
|
|
|
<ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5):</para>
|
2010-09-16 18:40:28 +02:00
|
|
|
|
|
|
|
<orderedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>'blacklist' in the OPTIONS or IN_OPTIONS column. Traffic
|
2010-09-16 18:46:46 +02:00
|
|
|
from this zone is passed against the entries in this file that
|
|
|
|
have the <emphasis role="bold">src</emphasis> option
|
2010-09-16 18:40:28 +02:00
|
|
|
(specified or defaulted).</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>'blacklist' in the OPTIONS or OUT_OPTIONS column.
|
2010-11-24 00:01:20 +01:00
|
|
|
Traffic to this zone is passed against the entries in this
|
|
|
|
file that have the <emphasis role="bold">dst</emphasis>
|
2010-09-16 18:40:28 +02:00
|
|
|
option.</para>
|
|
|
|
</listitem>
|
|
|
|
</orderedlist>
|
|
|
|
</note>
|
2011-05-18 17:30:01 +02:00
|
|
|
|
|
|
|
<para>In Shorewall 4.4.20, the <emphasis
|
|
|
|
role="bold">whitelist</emphasis> option was added. When <emphasis
|
|
|
|
role="bold">whitelist</emphasis> is specified, packets/connections
|
|
|
|
that match the entry are not matched against the remaining entries
|
|
|
|
in the file.</para>
|
2011-05-22 01:25:38 +02:00
|
|
|
|
|
|
|
<para>The <emphasis role="bold">audit</emphasis> option was also
|
|
|
|
added in 4.4.20 and causes packets matching the entry to be audited.
|
|
|
|
The <emphasis role="bold">audit</emphasis> option may not be
|
|
|
|
specified in whitelist entries and require AUDIT_TARGET support in
|
|
|
|
the kernel and iptables.</para>
|
2010-09-16 18:40:28 +02:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2006-11-16 01:16:15 +01:00
|
|
|
</variablelist>
|
|
|
|
|
2010-09-07 00:29:20 +02:00
|
|
|
<para></para>
|
2006-11-16 01:16:15 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Example</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>Example 1:</term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>To block DNS queries from address 192.0.2.126:</para>
|
|
|
|
|
|
|
|
<programlisting> #ADDRESS/SUBNET PROTOCOL PORT
|
|
|
|
192.0.2.126 udp 53</programlisting>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>Example 2:</term>
|
|
|
|
|
|
|
|
<listitem>
|
2006-11-20 18:52:52 +01:00
|
|
|
<para>To block some of the nuisance applications:</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
|
|
|
|
<programlisting> #ADDRESS/SUBNET PROTOCOL PORT
|
|
|
|
- udp 1024:1033,1434
|
|
|
|
- tcp 57,1433,1434,2401,2745,3127,3306,3410,4899,5554,6101,8081,9898</programlisting>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>FILES</title>
|
|
|
|
|
|
|
|
<para>/etc/shorewall/blacklist</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See ALSO</title>
|
|
|
|
|
2006-11-22 05:09:09 +01:00
|
|
|
<para><ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/blacklisting_support.htm">http://www.shorewall.net/blacklisting_support.htm</ulink></para>
|
2006-11-22 05:09:09 +01:00
|
|
|
|
2011-09-26 19:16:52 +02:00
|
|
|
<para><ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/configuration_file_basics.htm#Pairs">http://www.shorewall.net/configuration_file_basics.htm#Pairs</ulink></para>
|
2011-09-26 19:16:52 +02:00
|
|
|
|
2006-11-16 01:16:15 +01:00
|
|
|
<para>shorewall(8), shorewall-accounting(5), shorewall-actions(5),
|
2010-11-24 00:01:20 +01:00
|
|
|
shorewall-hosts(5), shorewall_interfaces(5), shorewall-ipsets(5),
|
|
|
|
shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5),
|
|
|
|
shorewall-netmap(5), shorewall-params(5), shorewall-policy(5),
|
2012-01-09 16:19:10 +01:00
|
|
|
shorewall-providers(5), shorewall-proxyarp(5), shorewall-rtrules(5),
|
2010-09-13 22:23:32 +02:00
|
|
|
shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5),
|
|
|
|
shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5),
|
2013-12-29 00:35:08 +01:00
|
|
|
shorewall-mangle(5), shorewall-tos(5), shorewall-tunnels(5),
|
2010-09-13 22:23:32 +02:00
|
|
|
shorewall-zones(5)</para>
|
2006-11-16 01:16:15 +01:00
|
|
|
</refsect1>
|
2008-07-04 16:16:40 +02:00
|
|
|
</refentry>
|