Copyright © 2004, 2005 Thomas M. Eastep
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
2005-04-10
Table of Contents
Shorewall can produce a wide variety of error messages when a problem is detected with your configuration. This article attempts to explain the cause of and cures for some of these messages.
Some error messages are produced by the /sbin/shorewall utility. These messages are detailed in this section.
This means that you have specified a restore file name with a "/". Restore files must be simple file names with no slashes.
The files /usr/share/shorewall/firewall
and/or /usr/share/shorewall/version
do not
exist.
The named file in /var/lib/shorewall
exists but is not executable.
You have specified either save
or
restore-base
as the name of a restore file --
those names are reserved for use by Shorewall.
During processing of a shorewall save command, the iptables-save command failed.
The shorewall start and shorewall
restart commands create a file called
/var/lib/shorewall/restore-base
which forms the
basis for creating a restore file using shorewall
save. This error message is issued when shorewall
save is not able to find that file.
The program /usr/share/shorewall/firewall
is
responsible for parsing the Shorewall configuration files and for creating
and changing the Netfilter configuration. Some of the error messages
generated by this program are listed below.
The zone named in the message is defined to be associated with
an interface in /etc/shorewall/interfaces
yet
it also has an entry for that same interface in
/etc/shorewall/hosts
.
The zone named in the ZONE column of the listed record from
/etc/shorewall/interfaces
or
/etc/shorewall/hosts
is not defined in
/etc/shorewall/zones
.
The named interface has two entries in
/etc/shorewall/interfaces
.
The interface name contains a colon (":") or is "+". If the name includes a ":", you probably need to read this article.
The <interface> name listed in the
<record> from
/etc/shorewall/hosts
was not defined in
/etc/shorewall/interfaces
.
The named interface appears in /etc/shorewall/hosts and
appears as a bridge port (after a colon) but is also defined in
/etc/shorewall/interfaces
.
You have specified the ipsec
option in an /etc/shorewall/hosts
record but
your kernel and/or iptables is missing policy match support. That
support in turn requires a set of ipsec-netfilter patches in order
to work correctly.
The named zone appears in the /etc/shorewall/policy file but not in the /etc/shorewall/zones file.
You have specified DETECT_DNAT_ADDRS=Yes in /etc/shorewall/shorewall.conf and Shorewall is unablee to determine the IP address of the named <interface>. Be sure that the interface is started before starting Shorewall or set DETECT_DNAT_ADDRS=No.
The listed <zone> name appears in
the GATEWAY ZONE column of the listed
<record> from
/etc/shorewall/tunnels
but is not defined in
/etc/shorewall/zones
.
Your /etc/shorewall/ipsec file is non-empty but your kernel and/or iptables do not include policy match support. That support in turn requires a set of ipsec-netfilter patches in order to work correctly.
The named <interface> appears in a
record in /etc/shorewall/maclist
yet that
interface's record in /etc/shorewall/interfaces
does not specify the maclist option
and no record in /etc/shorewall/hosts
that
names that interface includes the maclist option.
You have specified the maclist option for this interface but the command ip list show <interface> fails.
The interface appears in a configuration file but is not
defined in /etc/shorewall/interfaces
.
You have set BRIDGING=Yes in
/etc/shorewall/shorewall.conf
but it appears
that your kernel and/or iptables do not have physdev match
support.
You have BRIDGING=No in
/etc/shorewall/shorewall.conf
and the
<interface> given in a rule does not
match an entry in
/etc/shorewall/interfaces
.
In earlier Shorewall versions, the ORIGINAL DEST column allowed following the original destination IP address with ":" and an address to use as the source of the forwarded connection request. Now that /etc/shorewall/masq supports qualification of SNAT rules by protocol and port, this feature is no longer required and has been deimplemented.
The SOURCE column has the firewall zone name immediately followed by "!". This syntax is use to exclude a subzone and Shorewall currently doesn't support subzones of the firewall zone.
Netfilter (and hence Shorewall) does not allow qualification of a rule by destination source IP address.
The named <action> will be ACCEPT+ or NONAT. These actions are inforced in part in the PREROUTING nat chain where the destination interface is not yet known (because the packet has not yet been routed). As a result, the DESTINATION column may not contain an interface name.
The <rule> specifies a server address that is different from the ORIGINAL DEST address and/or it specifies a server port that is different from the destination port but the ACTION is neither DNAT[-] nor REJECT[-].
The SOURCE column is of one of the forms <zone>:, :<qualifier> or :.
In DNAT[-] and REDIRECT[-] rules, you can have a SOURCE of the form <zone>:<net1>!<net2>. This means <net1> in the <zone> zone except for <net2>. This syntax is not available with other ACTIONs.
The USER/GROUP column may only have and entry if the SOURCE is the firewall zone.
The DEST column is of one of the forms <zone>:, :<qualifier> or :.
The zone given in the SOURCE column was not defined in
/etc/shorewall/zones
.
The zone given in the DEST column was not defined in
/etc/shorewall/zones
.
If the policy from zone z1 to zone z2 is NONE that means that Shorewall sets up no infrastructure to handle traffic from z1 to z2. Consequently, you cannot have any rules that control traffic from z1 to z2.
The ACTION column contains an action that is not one of the
built-in actions and it is not defined in
/etc/shorewall/actions
or in
/usr/share/shorewall/actions.std
.
You have specified <interface> in
the SUBNET column of /etc/shorewall/masq
which
means that Shorewall is supposed to determine the network(s) routed
through that interface. To do that, Shorewall issues the command
ip addr ls dev <interface> and that command
failed. This usually means that you are trying to start Shorewall
before the <interface> is brought
up.
There is no policy defined in
/etc/shorewall/policy
for connections from zone
<z1> to zone
<z2>.
This sections describes some of the more common warnings generated by Shorewall.
This means that the interface named in the SUBNET column of
/etc/shorewall/masq
has the default route. This
almost always means that you have the contents of the INTERFACE and
SUBNET columns reversed.
This warning alerts you to the fact tha <zone> is
defined in /etc/shorewall/zones
but has no
corresponding entries in
/etc/shorewall/interfaces
or in
/etc/shorewall/hosts
.
By far the most asked about iptables error message is:
This almost always means that you are trying to use a Shorewall feature that your iptables and/or kernel do not support. Beginning with version 2.2.0, Shorewall follows this message with a copy of the iptables command that is failing. Most commonly, the problem is that one of the match types (keyword following "-m" in the command) isn't supported by your iptables/kernel. The output of "shorewall check" shows you what your iptables/kernel support:
gateway:~# shorewall check
Loading /usr/share/shorewall/functions...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Shorewall has detected the following iptables/netfilter capabilities:
NAT: Available
Packet Mangling: Available
Multi-port Match: Available
Extended Multi-port Match: Available
Connection Tracking Match: Available
Packet Type Match: Not available
Policy Match: Available
Physdev Match: Available
IP range Match: Available
Verifying Configuration...
...