Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 14:26:13 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Guido van Rooij <guido@gvr.org>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: IPFW or IPFILTER?
Message-ID:  <20011016142613.D4437@blossom.cjclark.org>
In-Reply-To: <20011016212713.A6881@gvr.gvr.org>; from guido@gvr.org on Tue, Oct 16, 2001 at 09:27:14PM %2B0200
References:  <20011014180756.A17546@adv.devet.org> <200110141616.f9EGG5x37636@lurza.secnetix.de> <20011016212713.A6881@gvr.gvr.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 16, 2001 at 09:27:14PM +0200, Guido van Rooij wrote:
> On Sun, Oct 14, 2001 at 06:16:05PM +0200, Oliver Fromme wrote:
> >  > IIRC ipfilter does not allow '_any_ ICMP' in such a case: if you send an
> >  > 'ICMP echo' with keep-state then only 'ICMP echo reply' packets will be
> >  > allowed to pass through.
> > 
> > That's bad, because you usually want to see other types of
> > ICMP replies, too, such as TTL exceeded, host unreachable,
> > communication prohibited etc.
> > 
> 
> Of course that is allowed in the UDP and TCP cases. However, in the case of
> ICMP request packets, you will never get back an ICMP error, because
> the protocol forbids sending ICMP errors for ICMP packets.
> To quote the rfc:
>    To avoid the infinite regress of messages about messages
>    etc., no ICMP messages are sent about ICMP messages.

That is not true. An ICMP error is never sent in response to an ICMP
_error_ message. You will get various ICMP error messages in response
to something like a ping. ICMP-based traceroutes count on this
fact. RFC1122 explictly states,

         An ICMP error message MUST NOT be sent as the result of
         receiving:

         *    an ICMP error message, or

         *    a datagram destined to an IP broadcast or IP multicast
              address, or

         *    a datagram sent as a link-layer broadcast, or

         *    a non-initial fragment, or

         *    a datagram whose source address does not define a single
              host -- e.g., a zero address, a loopback address, a
              broadcast address, a multicast address, or a Class E
              address.

What types are "ICMP error messages" is defined earlier in the RFC,

  ICMP messages are grouped into two classes.

         *
              ICMP error messages:

               Destination Unreachable   (see Section 3.2.2.1)
               Redirect                  (see Section 3.2.2.2)
               Source Quench             (see Section 3.2.2.3)
               Time Exceeded             (see Section 3.2.2.4)
               Parameter Problem         (see Section 3.2.2.5)

         *
              ICMP query messages:

                Echo                     (see Section 3.2.2.6)
                Information              (see Section 3.2.2.7)
                Timestamp                (see Section 3.2.2.8)
                Address Mask             (see Section 3.2.2.9)

It is allowed, and even expected, that ICMP error messages will be
generated in response to problematic ICMP query messages.
-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011016142613.D4437>