2006-11-15 22:05:32 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-02-06 23:34:12 +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-15 22:05:32 +01:00
|
|
|
<refentry>
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>shorewall-hosts</refentrytitle>
|
|
|
|
|
|
|
|
<manvolnum>5</manvolnum>
|
2014-01-16 17:32:57 +01:00
|
|
|
|
|
|
|
<refmiscinfo>Configuration Files</refmiscinfo>
|
2006-11-15 22:05:32 +01:00
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>hosts</refname>
|
|
|
|
|
|
|
|
<refpurpose>Shorewall file</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
2017-06-17 00:01:41 +02:00
|
|
|
<command>/etc/shorewall[6]/hosts</command>
|
2006-11-15 22:05:32 +01:00
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>This file is used to define zones in terms of subnets and/or
|
|
|
|
individual IP addresses. Most simple setups don't need to (should not)
|
|
|
|
place anything in this file.</para>
|
|
|
|
|
|
|
|
<para>The order of entries in this file is not significant in determining
|
2007-01-18 18:14:40 +01:00
|
|
|
zone composition. Rather, the order that the zones are declared in <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5) determines
|
|
|
|
the order in which the records in this file are interpreted.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<warning>
|
|
|
|
<para>The only time that you need this file is when you have more than
|
|
|
|
one zone connected through a single interface.</para>
|
|
|
|
</warning>
|
|
|
|
|
|
|
|
<warning>
|
2007-01-14 23:34:51 +01:00
|
|
|
<para>If you have an entry for a zone and interface in <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5)
|
|
|
|
then do not include any entries in this file for that same (zone,
|
|
|
|
interface) pair.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</warning>
|
|
|
|
|
|
|
|
<para>The columns in the file are as follows.</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2008-07-10 15:33:54 +02:00
|
|
|
<term><emphasis role="bold">ZONE</emphasis> -
|
2006-11-22 19:36:16 +01:00
|
|
|
<emphasis>zone-name</emphasis></term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
2007-01-18 18:14:40 +01:00
|
|
|
<para>The name of a zone declared in <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5). You
|
|
|
|
may not list the firewall zone in this column.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2008-07-10 15:33:54 +02:00
|
|
|
<term><emphasis role="bold">HOST(S)</emphasis> -
|
2007-05-26 13:02:58 +02:00
|
|
|
<emphasis>interface</emphasis>:{[{<emphasis>address-or-range</emphasis>[<emphasis
|
2006-11-22 19:36:16 +01:00
|
|
|
role="bold">,</emphasis><emphasis>address-or-range</emphasis>]...|<emphasis
|
2011-06-20 19:59:14 +02:00
|
|
|
role="bold">+</emphasis><emphasis>ipset</emphasis>|<emphasis
|
|
|
|
role="bold">dynamic</emphasis>}[<emphasis>exclusion</emphasis>]</term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
2007-01-14 23:34:51 +01:00
|
|
|
<para>The name of an interface defined in the <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5)
|
|
|
|
file followed by a colon (":") and a comma-separated list whose
|
|
|
|
elements are either:</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<orderedlist numeration="loweralpha">
|
|
|
|
<listitem>
|
2007-01-18 18:14:40 +01:00
|
|
|
<para>The IP <replaceable>address</replaceable> of a
|
|
|
|
host.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>A network in CIDR format.</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>An IP address range of the form
|
|
|
|
<emphasis>low.address</emphasis>-<emphasis>high.address</emphasis>.
|
|
|
|
Your kernel and iptables must have iprange match support.</para>
|
|
|
|
</listitem>
|
|
|
|
|
2006-11-22 19:36:16 +01:00
|
|
|
<listitem>
|
|
|
|
<para>The name of an <emphasis>ipset</emphasis>.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
2011-06-20 19:59:14 +02:00
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>The word <option>dynamic</option> which makes the zone
|
|
|
|
dynamic in that you can use the <command>shorewall add</command>
|
|
|
|
and <command>shorewall delete</command> commands to change to
|
|
|
|
composition of the zone.</para>
|
|
|
|
</listitem>
|
2006-11-15 22:05:32 +01:00
|
|
|
</orderedlist>
|
2006-11-25 19:06:11 +01:00
|
|
|
|
|
|
|
<blockquote>
|
|
|
|
<para>You may also exclude certain hosts through use of an
|
2007-01-14 23:34:51 +01:00
|
|
|
<emphasis>exclusion</emphasis> (see <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-exclusion.html">shorewall-exclusion</ulink>(5).</para>
|
2006-11-25 19:06:11 +01:00
|
|
|
</blockquote>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2010-11-24 00:01:20 +01:00
|
|
|
<term><emphasis role="bold">OPTIONS</emphasis> (Optional) -
|
|
|
|
[<emphasis>option</emphasis>[<emphasis
|
2006-11-22 19:36:16 +01:00
|
|
|
role="bold">,</emphasis><emphasis>option</emphasis>]...]</term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>A comma-separated list of options from the following list. The
|
|
|
|
order in which you list the options is not significant but the list
|
2013-05-03 18:19:45 +02:00
|
|
|
must have no embedded white-space.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2012-03-12 23:14:35 +01:00
|
|
|
<term><emphasis role="bold">blacklist</emphasis></term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
2012-03-12 23:14:35 +01:00
|
|
|
<para>Check packets arriving on this port against the <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-blacklist.html">shorewall-blacklist</ulink>(5)
|
2012-03-12 23:14:35 +01:00
|
|
|
file.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-03-12 23:14:35 +01:00
|
|
|
<term><emphasis role="bold">broadcast</emphasis></term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
2012-03-12 23:14:35 +01:00
|
|
|
<para>Used when you want to include limited broadcasts
|
|
|
|
(destination IP address 255.255.255.255) from the firewall to
|
|
|
|
this zone. Only necessary when:</para>
|
|
|
|
|
|
|
|
<orderedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>The network specified in the HOST(S) column does not
|
|
|
|
include 255.255.255.255.</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>The zone does not have an entry for this interface
|
|
|
|
in <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5).</para>
|
2012-03-12 23:14:35 +01:00
|
|
|
</listitem>
|
|
|
|
</orderedlist>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-03-12 23:14:35 +01:00
|
|
|
<term><emphasis role="bold">destonly</emphasis></term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
2012-03-12 23:14:35 +01:00
|
|
|
<para>Normally used with the Multi-cast 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).</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-03-12 23:14:35 +01:00
|
|
|
<term><emphasis role="bold">ipsec</emphasis></term>
|
2006-11-15 22:05:32 +01:00
|
|
|
|
|
|
|
<listitem>
|
2012-03-12 23:14:35 +01:00
|
|
|
<para>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 <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5)
|
|
|
|
file then you do NOT need to specify the 'ipsec' option
|
2012-03-12 23:14:35 +01:00
|
|
|
here.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis role="bold">maclist</emphasis></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Connection requests from these hosts are compared
|
|
|
|
against the contents of <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall-maclist.html">shorewall-maclist</ulink>(5).
|
|
|
|
If this option is specified, the interface must be an Ethernet
|
2012-03-12 23:14:35 +01:00
|
|
|
NIC or equivalent and must be up before Shorewall is
|
|
|
|
started.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis
|
|
|
|
role="bold">mss</emphasis>=<replaceable>mss</replaceable></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>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
|
|
|
|
<replaceable>mss</replaceable>.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis role="bold">nosmurfs</emphasis></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>This option only makes sense for ports on a
|
|
|
|
bridge.</para>
|
|
|
|
|
|
|
|
<para>Filter packets for smurfs (packets with a broadcast
|
|
|
|
address as the source).</para>
|
|
|
|
|
|
|
|
<para>Smurfs will be optionally logged based on the setting of
|
2007-01-14 23:34:51 +01:00
|
|
|
SMURF_LOG_LEVEL in <ulink
|
2014-01-16 17:32:57 +01:00
|
|
|
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5).
|
|
|
|
After logging, the packets are dropped.</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-03-12 23:14:35 +01:00
|
|
|
<term><emphasis role="bold">routeback</emphasis></term>
|
2008-02-26 01:09:28 +01:00
|
|
|
|
|
|
|
<listitem>
|
2012-03-12 23:14:35 +01:00
|
|
|
<para>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.</para>
|
2008-02-26 01:09:28 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2008-01-23 00:58:06 +01:00
|
|
|
<varlistentry>
|
2012-03-12 23:14:35 +01:00
|
|
|
<term><emphasis role="bold">tcpflags</emphasis></term>
|
2008-01-23 00:58:06 +01:00
|
|
|
|
|
|
|
<listitem>
|
2012-03-12 23:14:35 +01:00
|
|
|
<para>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.</para>
|
2008-01-23 00:58:06 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2006-11-15 22:05:32 +01:00
|
|
|
</variablelist>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
2008-01-11 00:53:13 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>Example 1</term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>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 'vpn'.<programlisting>#ZONE HOST(S) OPTIONS
|
|
|
|
vpn ppp+:192.168.3.0/24</programlisting></para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
2006-11-15 22:05:32 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>FILES</title>
|
|
|
|
|
|
|
|
<para>/etc/shorewall/hosts</para>
|
2017-06-17 00:01:41 +02:00
|
|
|
|
|
|
|
<para>/etc/shorewall6/hosts</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See ALSO</title>
|
|
|
|
|
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
|
|
|
|
2017-06-17 02:11:43 +02:00
|
|
|
<para>shorewall(8)</para>
|
2006-11-15 22:05:32 +01:00
|
|
|
</refsect1>
|
2009-02-06 23:34:12 +01:00
|
|
|
</refentry>
|